Hi All,
We are using a custom hardware design that uses a MSP430F5438A as it's MCU and a PAN1326 for a Bluetooth module. We are using SSP profile to communicatie with a Android app, on a 4.4 Android phone.
For most situations the communication is fine and it can run with no problems, but we have a specific usecase that gets a (what is seems like) a random disconnect after some time.
The use case is thet we send a event to the Android phone that has a size of 32 bytes, the phone then response with a simple ack. The user then send a event on the phone to the device that is also 32 bytes and the device sends a similar simple ack back. We also send keep alive. check if alive messages from the phone to the device on regular intevals (say every 4 seconds). These keep alive messages are replyed by the device with a simple ack,
No for the problem, when we exectute this flow, it can run for 15 miniuts to two hours or sow, but we get a disconnection event on the device( via the SPP callback, remote close port) and on the phone. When a disconnect event happens then first the communication is broken on one way( the communication from the phone to the device). This can be seen when there is no communication received on the device anymore, we can still send data from the device to the phone (we have checked this by sending data to the phone when a disconnect happens).
The phone tries to reconnect to the device, the device runs the RFCOMM server. But we can only restore the connection when powercycling/restarting the device.
We use some custom settings when setting up the bluetooth connection on the device side:
UART baud rate: 9600;
RX and TX buffer: 512 size in bytes;
Date frame window size: 220 size in bytes.
We have this problem for quite some time now, and have tried a lot of things, does anybody have a idea or tip? Could this be a UART problem beteen the MCU and the PAN chip, and how do we verify this/restore the uart or bluetooth connection without restarting the device? If we need to supply more information please say so.