Other Parts Discussed in Thread: MSP430F5438A, CC2560, MSP430BT5190
Hello All,
First, a little background on my project. I am making a device that is designed to be an accessory for an iPhone, iPod Touch, or iPad. I am using the Bluetooth interface to make the accessory connection between my device and the iPhone, iPod Touch, or iPad.
I've ported the Mindtree Bluetooth protocol stack/demo program to my hardware and I believe I have successfully ported the code. However, I am having intermittent issues with the system. First, periodically I get 0x2652 error result codes (RFCOMM_ERR_ID | RFCOMM_L2CAP_CONNECT_FAILED) returned to me in my appl_spp_notify_cb routine as a result of my BT_spp_connect call. More often than not, the connection succeeds, but it does fail on occasion and I'd like to know what could be causing this. Whenever my connection succeeds, the Bluetooth communications link between my device and the iPhone seem to be rock solid.
When I do get the 0x2652 error result code, sometimes the system crashes in the BT_hci_disconnect call within the appl_spp_notify_cb routine. I've placed breakpoints in the code on that call and I always get there, but when I place the break point on the line following that call, I never hit the break. I've checked the inputs to that function, in particular, the handle value, and it is properly set. So, I am at a loss as to what would be causing this crash.
Interestingly, the system works fairly reliably with the IPhone connection. However, when the device I am attempting to connect to is the iPod Touch, the connection always fails with the 0x2652 error and always crashes in the spot I've described above. I don't have source to the BT_hci_disconnect call, so I really cannot debug this any further. I am fairly certain that this must be a problem with my stuff, but I am at a loss as to how to dig any deeper to find this issue on my own.
Any suggestions for how to proceed would be greatly appreciated.
Thanks in advance,
Chris Ingraham