I'm trying to interface a bluetooth dongle. It works with the software tools they provide. the "Hello" command is supposed to loop-back. The command is 4 bytes as follows: 00 00 00 01 One concern is that three of those values are NULL, and some Qt data types and functions will terminate at NULL. The code below compiles and the value returned to written is 4; however, no response is read. Suggestion please.
const char cmdHello[] = {0x00, 0x00, 0x00, 0x01};
written = btSerial.write(cmdHello, 4);
bytesRead = btSerial.read(inData, 2);
const char cmdHello[] = {0x00, 0x00, 0x00, 0x01};
written = btSerial.write(cmdHello, 4);
bytesRead = btSerial.read(inData, 2);
To copy to clipboard, switch view to plain text mode
Bookmarks