I am trying to write to bluetooth running the SPPLE Demo Lite on the MSP-EXP430F5529 outside of the callback function. Is this possible? I'm used the spp_data_write function but that didn't work.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am trying to write to bluetooth running the SPPLE Demo Lite on the MSP-EXP430F5529 outside of the callback function. Is this possible? I'm used the spp_data_write function but that didn't work.
We are currently trying to use Classic BT. We are connecting alternately with an Android smart phone, and a PC using a BT dongle. In both cases we are running Blueterm.
The unchanged sample project works fine. We then wanted to perform SPP_Data_Write(), (e.g. to send a message if a button is pressed,) but this only works from within the SPP_Event_Callback() function. Calling it from outside this function does not work, and I can imagine why, so we tried to do something like set a flag and send the data from within the callback when it sees the flag set, but we are not sure how to force the callback to run. Ideally we would like a method to send data over SPP whenever and from wherever we need.
The next thing I may need some help with is guidance on how to change this app to work on a MSP430F5219 device.
Thank you,
Angelo
Angelo,
It is certainly possible to call SPP Data Write outside of the callback functions. Are you logging the return value when you call it outside the callback? If not you need to do this to determine what errors the function may be returning (BTErrors.h will tell you the specific error code).
As for the hardware porting the release contains a PDF with hardware porting guidelines that you can use to guide you in the porting process to move to the MSP430F5219.
Tim
**Attention** This is a public forum