Remote Console/Debugging
Logicrom provide in-built remote debugging console that runs over a TCP socket.
A remote console session can be initiated by sending rdbg command. Device opens up a TCP socket to the server and port provided in the command. When device is connected to server, it sends a message describing its identity in following format.
$RDBG,[UID],[IMEI]#[CR][LF]
Where UID is device unique ID, and IMEI is module’s IMEI.
After the identity string, login prompt is shown. Once logged in, complete command line interface is available for device interaction.
Example Usage
To add remote debug command to system:
#include <remotedbg.h>
remote_debug_enable();
Command Line Usage
# Initate remote debug
$ rdbg=<IP/domain>,<port>
# close remote session
$ rdbg=close
API Reference
Header File
Source: include/remotedbg.h
#include <remotedbg.h>
Functions
-
void remote_debug_enable(void)
Initialize and enable Remote debugging
This will also add rdbg command to firmware
Usage of rdbg:
rdbg=[IP],[Port]
Where IP can be domain name or IP of server to connect Port is server port to connect
Once connected, remote server will be greeted with device parameter message in following format
$RDBG,[Module UID],[IMEI]#[CR][LF]
and followed by a login prompt.
