Open main menu

CDOT Wiki β

Changes

Phonegap Healthcare Adapter Backlog

No change in size, 12:32, 27 November 2012
Summary of Bluetooth communication test between Android and A&D BTP devices
** Use the right Bluetooth service name and application UUID (00001101-0000-1000-8000-00805f9b34fb).
** Set the Android device to 'discoverable' state for the first medical measurement even through it should not be necessary for a paired device.
** About the issue of "Android Bluetooth server works only after rebooting the Android device". This is a tough issue which costs us weeks to address. Based on the searches on the Internet, we have concluded that the medical devices use the fixed RFCOMM port number - #1 to communicate with Bluetooth servers. But beginning with Android 2.0, Android Bluetooth API uses '''random''' RFCOMM channel/port numbers for SPP and does not allow developers to set the port number manually any more. This conclusion is "confirmed" by the documentation in the A&D Blackberry code from NexJ, which states that port #1 must be used to build Bluetooth server socket. Eventually, we found the real reason which causes the communication problem: when . When the Android application exits by clicking the "back" or "home" button, the application becomes inactive but its Bluetooth server thread keeps receiving signals from medical devices. So newly started applications cannot receive data. Therefore, "A&D BTP devices use fixed port# for SPP" could be right for the early products. But current market products of the A&D BTP series (UC-321PBT and UA-767PBT) are SDP conformable and are able to use any RFCOMM port number provided by Bluetooth server.
** The data transmission process needs to dealing with invalid data generated by medical devices. In the tests, we found that the medical devices sometimes send out invalid measurement data and inappropriate process to these data will cause exceptions and therefore interrupt the Bluetooth communication, leading to these invalid measurement records accumulated within medical device's storage (up to 40 records). In these cases, each time a new measurement is made, all the old invalid records will be sent to the Bluetooth server before the new one is sent, causing poor performance even communication failure. The solution for this issue is that the Bluetooth server accepts these invalid data instead of giving exceptions to interrupt the communication process.
1
edit