Serial Redirection Agent

IoT-LAB MQTT Serial agent

Serial agent provides access to the nodes serial link.

Serial agent base topic:

{prefix}/iot-lab/serial/{site}

Every topics from serial agent topics start by this topic prefix

param prefix:configured prefix
param site:site where the agent is run

Topics Summary

  Topic Type
Serial agent
{prefix}/iot-lab/serial/{site}
  {serialagenttopic}/error/ Error
  {serialagenttopic}/ctl/stopall Request
Node
  {serialagenttopic}/{archi}/{num}/ctl/stop Request
Line redirection
  {serialagenttopic}/{archi}/{num}/line/ctl/start Request
  {serialagenttopic}/{archi}/{num}/line/ctl/stop Request
  {serialagenttopic}/{archi}/{num}/line/data Channel
Raw redirection (not implemented for the moment)

Serial Agent global topics

Error Topic

Asynchronous error messages are posted to error topic. Failure on requests are not duplicated here.

  • {serialagenttopic}/error/

For format see: Error topic

Stop all redirections

Stop all started serial redirections.

stopall request:
Topic: {serialagenttopic}/ctl/stopall
Message Topic Payload
Request {topic}/request/{clientid}/{requestid} empty
Reply {topic}/reply/{clientid}/{requestid} empty or error_msg

Node topics

Stop redirection

Stop given node serial redirection whatever the mode was.

stop request:
Topic: {serialagenttopic}/{archi}/{num}/ctl/stop
Message Topic Payload
Request {topic}/request/{clientid}/{requestid} empty
Reply {topic}/reply/{clientid}/{requestid} empty or error_msg

Line redirection topics

Topics to access to the node serial port redirection in ‘line’ mode. The redirection must first be started in line mode to have the line output.

Data received from the node is split on newlines characters with newlines stripped.

As newlines characters are not used in multibytes utf-8 characters, each line remains, if it was, a valid utf-8 string. On invalid utf-8 strings sent by the node, the data will also be invalid in the topic.

Start redirection in line mode

Start one node serial redirection in line mode.

line/start request:
Topic: {serialagenttopic}/{archi}/{num}/line/ctl/start
Message Topic Payload
Request {topic}/request/{clientid}/{requestid} empty
Reply {topic}/reply/{clientid}/{requestid} empty or error_msg

Stop line redirection

Equivalent to Stop redirection added here for completeness.

line/stop request:
Topic: {serialagenttopic}/{archi}/{num}/line/ctl/stop
Message Topic Payload
Request {topic}/request/{clientid}/{requestid} empty
Reply {topic}/reply/{clientid}/{requestid} empty or error_msg

Line redirection

Serial redirection sends text lines with newline characters removed (\n).

One message is received per line, and when sending a message, the newline character is automatically added.

Text line serial redirection
Topic: {serialagenttopic}/{archi}/{num}/line/data
Message Topic Payload
Output {topic}/out UTF-8 text line
Input {topic}/in UTF-8 text line

Raw redirection topics

Note

RAW redirection not implemented for the moment