Control API

This section describes the communication protocol between the control system and the BTI

The BTI Configurator does use the same protocol, see its debug window for more information

Caution

Please use >80ms between each command sent

Connection TCP (NGTC-BTI is server), Port 20108
Command Format AT+ Command {=Param1{, Param2{, Param3…}}}<CR><LF>
Reply Format <CR><LF>+reply {=Param1{, Param2{, Param3…}}} <CR><LF>

<CR> stands for “carriage return”, corresponding hex is 0x0D
<LF> stands for “line feed”, corresponding hex is 0x0A

Notice

Command Format Details

All commands start with “AT”, end with <CR><LF>
If a command has a parameter, the parameter is behind the “=”
If a command has multiple parameters, the parameters must be separated by “,”

Notice

Reply Format Details

All replies start with <CR><LF> and end with <CR><LF>
If a reply has a parameter, the parameter is behind the “=”
If a reply has multiple parameters, the parameters must be separated by “,”
The interface will always report the execution result using “OK” for success or “ERROR” for failure

Examples

Read BTI’s Bluetooth name

Communication Command Parameter Example
Request AT+NAME<CR><LF>
AT+NAME<CR><LF>
Reply #1 <CR><LF>+NAME=NGTC-BTI<CR><LF>
Reply #2 <CR><LF>OK<CR><LF>

Set BTI’s Bluetooth name

Communication Command Parameter Example
Request AT+NAME=Parameter<CR><LF>
NGTC-BTI
AT+NAME=NGTC-BTI<CR><LF>
Reply <CR><LF>OK<CR><LF>