BleuIO’s new firmware version 2.2.0 allows changing the output format
May 13, 2022A new AT command has been added that allows the user to see detailed response for every AT commands. This level of details can be helpful for troubleshooting problems as it explains the different error codes, disconnection reason codes and event codes. For that reason, users can take advantage of verbose mode for troubleshooting purposes and turn it off when it’s not needed.
This new mode changes the output to a more structured and unified format which includes command IDs for all command-related messages. The command-related outputs are more easily separatable from the event outputs. The idea is to make the BleuIO output more consistent, easier to use in scripts and generate more useful error messages.
The command to turn this new feature on and off is: ATV1 (on) ATV0 (off).
List of response format and code list is given below.
Response Format
Response Types | Descriton | Format |
---|---|---|
C | Command response. Assign a response index. | {“C”:Command Index,”cmd”:”command“}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
A | Acknowledgement response. | {“A”:Command Index,”err”:error code in hex,”errMsg”:”Error Message String“}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
R | Reply response. Different reply data for different commands. Not all commands have reply data. | {“R”:Command Index,Reply data}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
E | End response. Signify end of the command. | {“E”:Command Index,”nol”:number of lines belonging to this command (excluding scan responses))}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
S | Scan data response. | {“S”:Command Index,”rssi”:rssi value,”addr”:”mac address“,(if available)”name”:”device name”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
SF | Scan find data response. | {“SF”:Command Index,(if AT+SHOWRSSI turned on)“rssi”:rssi value,”addr”:”mac address“,”type”:advertising type,”data”:”data in hex”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
ST | Scan target response. | {“ST”:Command Index,(if AT+SHOWRSSI turned on)“rssi”:rssi value,”addr”:”mac address“,”type”:advertising type,”data”:”data in hex”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
SE | Scan ended response. | {“SE”:Command Index,”action”:”scan completed”}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
Events | Event response. Different event response data for different events. All events have event response data. | {event code:”Connection Index in hex if any otherwise 0xFFFF“,Event response data}[Carriage Return] (ascii:\r\n hex:0x0A and 0x0D) |
Error Code List
Error Code | Description |
---|---|
0x00 | Success |
0x01 | Generic failure |
0x02 | Already done |
0x03 | Operation already in progress |
0x04 | Invalid parameter |
0x05 | Not allowed |
0x06 | Not connected |
0x07 | Not supported |
0x08 | Not accepted |
0x09 | Busy |
0x0A | Request timed out |
0x0B | Not supported by peer |
0x0C | Canceled by user |
0x0D | Encryption key missing |
0x0E | Insufficient resources |
0x0F | Not found |
0x10 | No credits available on L2CAP CoC |
0x11 | MTU exceeded on L2CAP CoC |
0x12 | Insufficient bandwidth |
Event Code List
Event Code | Description |
---|---|
256 | Connection established |
258 | Disconnection event |
260 | Advertising operation completed |
263 | Connection parameters updated |
264 | Pairing request |
265 | Pairing completed |
266 | Security request from peer |
268 | Passkey request |
269 | Security level changed indication |
271 | Set security level failed |
272 | Connection parameters update completed |
273 | Data length changed |
276 | Numeric request |
278 | Long Term Key missing |
279 | SPS Service Event |
768 | Service found during browsing procedure |
769 | Browsing procedure completed |
770 | Service found during discovery |
771 | Included service found during discovery |
772 | Characteristic found during discovery |
773 | Characteristic descriptor found during discovery |
774 | Discovery completed |
775 | Read attribute value completed |
776 | Write attribute value completed |
777 | Value notification received |
778 | Value indication received |
Disconnection Reason Code List
Status Code | Description |
---|---|
0x08 | Connection timeout |
0x13 | Remote User terminated connection |
0x14 | Remote device terminated connection due to low resources |
0x15 | Remote device terminated connection due to power off |
0x16 | Connection terminated by local host |
0x1F | Unspecified error |
0x3D | Connection terminated due to MIC failure |
List of AT commands and their sample output can be found at Our Getting Started Guide.