We are using the MSP-EXP430F5438 demo board
and using the Bluetopia Stack version 1.4
We are having trouble using the Bluetopia stack via SPP for bluetooth low energy.
We need to send binary data via "SPP" bluetooth low energy.
Our code base: A modified (smaller version) of SPPLEDemo_Lite project from
CC256x MSP430 Bluetopia SDK v1.4 R1.
We are using the following call:
SPP_Data_Write(BluetoothStackID,SerialPortID, index, buffer);
This call does not work when we send binary data in the buffer:
//===================================================
// More details:
//===================================================
Regarding:
"SPP_Data_Write(BluetoothStackID,SerialPortID, index, buffer)"
What is being sent as "buffer" in the above call is 36 bytes that look like this:
0xFA, (We call this "Start of frame data")
0x20, (Packet size = 32, the middle 32 bytes)
0x00, (Sequence # could be 0-255, but now = 0)
0x00, (Pkt type, could be 0-255, but now = 0)
Data, (= 30 bytes of binary data)
0xAA, (CRC byte0 but now = 0xAA)
0xAA, (CRC byte1 but now = 0xAA)
So what happens ??
Bluetooth stack malfunctions badly if
the data packet is sent as shown above.
We believe that our software design is actually very close to working
here is why:
If instead of binary codes > 127 being sent, we make all bytes
< 128 decimal (Valid ASCII) in this same buffer, then the program works great and we
can pair with any Android tablet and use "blueterm" to see what is sent.
In some cases we can get the packet to send if we have at some of the bytes as ASCII,
(mixed ASCII and binary) but we need to know which bytes must not be > 127 in
order for the packet send to work. Presently we are just guessing and experimenting.
There is no documentation we can find that tells us the rules or why sending binary
can cause the program to fail.
Nevertheless the basic problem seems to be with the Bluetopia since
we can not even pair if all of the data bytes in the packet are binary
as in the original format mentioned previously.
The program is totally unable to connect in this case.
What are the rules for what kind of bytes can be in this "buffer" to be send by:
SPP_Data_Write(BluetoothStackID,SerialPortID, index, buffer); ???
Thanks for any assistance, or suggestions as to who to contact.
"BlueDog Consultant"