I am trying to send binary data over BT SPP and it seems like the chip can only do ASCII even when I am in data mode. The binary data I am trying to send is the MODBUS protocol.
Firmware version : BX310x.2.6.3
Communication : UART, 115200, 8 data bits, No parity, 1 stop bit, hardware flow control enabled (AT&K3)
AT command sequence:
AT+RST OK AT+SRBTSYSTEM? +SRBTSYSTEM: 2 OK AT+SRBTCPROFILES? +SRBTCPROFILES: 1 OK AT+SRBTSTATE? +SRBTSTATE=1,2 OK // After this, the remote device discovers the module and requests to open a SPP connection. Here are the notifications I get: +SRBTPAIR: “6c:00:6b:73:20:c0”, 1 +SRBTCFG: 1,0, “6c:00:6b:73:20:c0”,SPP,0 +SRSPPCNX:1,1,129 // Once I receive the +SRSPPCNX notification, I set the SPP connection to data mode: AT+SRSPPSTART=1 CONNECT
I don’t have a console log for the data bytes, but I have a logic analyzer that shows the data bytes being sent to the UART port of the BT module. I have attached a screenshot with timestamps
As for AT+SRSPPSND command, the reference manual states that it only supports ASCII. I need to be able to send the full unsigned 8-bit range of binary data 0-255. This isn’t possible unless we send individual digits encoded in ASCII. While this may be ok for newer applications that can parse ASCII, it will not be a drop-in replacement for existing applications that accept binary only. I think this limits the applications with this chip by a lot and a firmware fix for this should not be too difficult.