Skip to content

Commit 55247bf

Browse files
committed
docs: Add remote debugging documentation
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 68ca76e commit 55247bf

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

docs/book/api/system/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ System
1010
System Calls <syscall>
1111
FOTA API <fota>
1212
Command Processor & Command Line Interface <command_proc>
13+
Remote Console/Debugging <rdbg>
1314
Message Queue <messageq>

docs/book/api/system/rdbg.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Remote Console/Debugging
2+
========================
3+
4+
Logicrom provide in-built remote debugging console that runs over a TCP socket.
5+
6+
A remote console session can be initiated by sending *rdbg* command. Device
7+
opens up a TCP socket to the server and port provided in the command. When
8+
device is connected to server, it sends a message describing its identity
9+
in following format
10+
11+
::
12+
13+
$RDBG,[UID],[IMEI]#[CR][LF]
14+
15+
16+
Where UID is device unique ID, and IMEI is module's IMEI.
17+
18+
After the identity string, login prompt is shown. Once logged in, complete
19+
command line interface is available for device interaction.
20+
21+
22+
Example Usage
23+
--------------
24+
25+
To add remote debug command to system:
26+
27+
.. code-block:: c
28+
29+
#include <remotedbg.h>
30+
31+
remote_debug_enable();
32+
33+
Command Line Usage
34+
^^^^^^^^^^^^^^^^^^
35+
36+
.. code-block:: bash
37+
38+
# Initate remote debug
39+
$ rdbg=<IP/domain>,<port>
40+
41+
# close remote session
42+
$ rdbg=close
43+
44+
45+
API Reference
46+
-------------
47+
48+
.. include:: /inc/remotedbg.inc

include/remotedbg.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,21 @@ extern "C" {
1212

1313
/**
1414
* Initialize and enable Remote debugging
15+
*
1516
* This will also add rdbg command to firmware
17+
*
1618
* Usage of rdbg:
19+
*
1720
* rdbg=[IP],[Port]
21+
*
1822
* Where IP can be domain name or IP of server to connect
1923
* Port is server port to connect
2024
*
21-
* Once connected, remote server will be greeted with device parameter message in following format
25+
* Once connected, remote server will be greeted with device parameter
26+
* message in following format
27+
*
2228
* $RDBG,[Module UID],[IMEI]#[CR][LF]
29+
*
2330
* and followed by a login prompt.
2431
*/
2532
void remote_debug_enable(void);

0 commit comments

Comments
 (0)