I have an application that needs to have the core bluetooth framework integrated. I also need to add a button on the programs page that when pressed with send each of the 256 characters one at a time
I looked through the command set for the dongle and it turns out that the asterisk “*”, ASCII 0x2A, is not used as a single-byte command, so it will only appear in the data as a parameter in a multi-byte command. This makes it a relatively good choice for an “escape” character. So my example given on the phone appears to be a reasonable implementation, based on what I know so far:
The 0x2A character will be used to indicate a “special” character.
0x2A 0x2A (“**”) will be sent in place of each intended 0x2A byte.
0x2A 0x30 (“*0”) will be sent in place of a hex 0x00 byte.
0x2A 0x41 (“*A”) will be sent in place of a hex 0x0A byte.
0x2A 0x44 (“*D”) will be sent in place of a hex 0x0D byte.
All other values (0x01-0x09, 0x0B, 0x0C, 0x0E-0x29, 0x2B-0xFF) will be sent normally.
The 0x0A character does appear to make it through the path, but since it’s part of the sequence sent with each command, I think there would be less potential for confusion if we escape that character too.
Here’s the document from NovaComm that shows all the modules settings. In particular, I thought the following commands might be of interest:
AD Bluetooth Address of module
AP GAP appearance characteristic
CC Peripheral preferred connection parameter characteristic
NM GAP Name
Here are the default values for them (at least using the module in my eval kit). These values were read while paired with the iNova_BLE app on the iPad:
I’d suggest we would change the NM parameter to perhaps “iLightz_BLE”.
In addition, I will use the DT command to send data, and received data is presented to me in an RT message.