Command Protocol

This page describes the underlying commands exposed by the modem.

Commands List

Command Format

A command always consists of a request sent by the host MCU, and corresponding response sent back by the Blecon modem.

All data is sent in little endian.

The structure of a request is:

The structure of a response is:

The response data field is only present when the command executed successfully (error code 0).

Error codes

Commands Details

Attention

Check communication with the Blecon modem.

Request Id: 0x100

Request field: Empty

Response field: Empty

Protocol Version

Get the modem's command protocol version.

Request Id: 0x101

Request field: Empty

Response field:

Get Identity

Retrieve the Blecon Device Identifier.

Request Id: 0x102

Request field: Empty

Response field:

Get Device URL

Retrieve the Blecon Device URL used for device connection. This is the same URL exposed by the modem via NFC.

Request Id: 0x103

Request field: Empty

Response field:

Get Info

Get information about the modem's firmware & state.

Request Id: 0x104

Request field: Empty

Response field:

Status

Get information about the modem's status.

All event bits are set on a specific event, and cleared when read.

Request Id: 0x200

Request field: Empty

Response field:

Connection Initiate

Request a connection to the Blecon network. Once the connection is available, a connection event is raised.

Request Id: 0x201

Request field: Empty

Response field: Empty

Connection Terminate

Close the current connection to the Blecon network, or stop requesting for one. Issuing this command clears all connection, response and error events.

Request Id: 0x202

Request field: Empty

Response field: Empty

Outgoing Queue Push

Queue a frame to send to the Blecon network. This command will succeed if the queue is not full and the modem connected to the network.

Request Id: 0x203

Request field:

Response field: Empty

Outgoing Queue Space

Get number of free slots in the outgoing queue.

Request Id: 0x204

Request field: Empty

Response field:

Incoming Queue Pop

Dequeue an incoming frame received from the Blecon network. This command will succeed if the queue is not empty.

Request Id: 0x205

Request field: Empty

Response field:

Incoming Queue Count

Get the number of frames queued in the incoming queue.

Request Id: 0x206

Request field: Empty

Response field:

Incoming Queue Clear

Clear all frames in incoming queue.

Request Id: 0x207

Request field: Empty

Response field: Empty

Announce

Announce the device to nearby hotspots, so that any Blecon hotspot in range can identify the device in order to connect it to a network, or manage it.

Request Id: 0x208

Request field: Empty

Response field: Empty

Last updated