1,234
edits
Changes
no edit summary
{{Admon/obsolete}}
[[Category: NexJ_Express]]
[[category: NexJ Express PhoneGap]]
*** For the blood pressure meter, pairing can be set but data transmission is unstable. The reason could be: The A&D medical device always forces one to use RFCOMM port/channel 1 for the connection; but the Android device will choose the next available channel.
=== Summary of Bluetooth communication test between Android and A&D PBT Series 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, it is not required.** About the issue of "Android Bluetooth server (for some medical sensors) work works only after rebooting the Android device". This is the first a tough issue we met which costs us weeks to address. Based on the tests. After search searches on the Internet, We condemned we have concluded that the medical devices uses 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 SDP process and this does not allow developers to set the port number manually any more. This conclusion was is "confirmed" by the documentation in the A&D Blackberry code from NexJ, which ask to the states that port #1 must be used to build Bluetooth server socket. This conclusion could be right form A&D early products. But A&D BTP series current market products (at least UC-321PBT and UA-767PBT) are DSP conformable and use any RFCOMM port number provided by Bluetooth serverEventually, we found the real reason which causes the communication problem. The reason of "Android Bluetooth server worked only after rebooting When the Android device" is: when the application exited exits by click clicking the "back" or "home" button, it became the application becomes inactive but its '''Bluetooth server thread kept ''' keeps receiving signals from medical devices. So the newly started applications could not cannot receive data. Therefore, the issue of "A&D medical PBT devices use fixed Bluetooth port#for SPP communication" is actually not could be right for the early products. But current market products of the caseA&D BTP series (UC-321PBT and UA-767PBT) are SDP conformable and are able to use any RFCOMM port number provided by a Bluetooth server.** Unreadable The data from transmission process needs to deal with '''invalid data''' generated by medical devices may affect the Bluetooth communication. In the tests, we have found out that the medical devices sometimes send out invalid measurement data. An inappropriate process of unreadable for these data from medical devices will cause exceptions and therefore interrupt the Bluetooth communication. As a result, leading to these invalid measurement records are accumulated within the medical device's memory storage (up to 40 records). Each Thus, each time a new measurement is made, unreadable all the old invalid records will be sent to the Bluetooth server firstbefore the new one is sent, causing poor performance and these records will cause the even communication failure. The solution for this issue is that the Bluetooth server accepts these wrong invalid data instead of giving exceptions to interrupt the communication process.** To make sure get right readings from UA-767PBT devices, then let applications one of the success way is to deal with these invalid dataread the bytes from datainputstream one by one until appropriate length is reached.