'''{{Main|Mobile Medical Device Integration}} == Our task:'''==
* To integrate bluglu device into the Mobile Medical Device Integration project to enable the project's functionality of connecting blood glucose devices.
=* The current task is to implement the connectivity between bluglu and Android devices. [[File:bluglu_MMDI.jpg|thumb|center]] == Current Work == ''' Adding multiple manufacturer support to MMDI'''* Rebuild our Mobile Medical Device Integration project to support multiple Bluetooth servers and Issue Bluetooth clients.** Before we started the current task, our project supports only a Bluetooth server instance which is used to receive measurements from A&D blood pressure meter and weight scale.** So at beginning, we tried to update our project to support multiple Bluetooth servers because we asserted that the bluglu device work the same way as A&D devices. The bluglu device communication protocol specification (UDCP) does mention what work mode it takes.** Based on the further info from UHN, we knew that bluglu device work as slave, which means blugle device works as Bluetooth server. Therefore, we started to add Bluetooth client support for our project in order to be able to communicate with bluglu devices.** The last stage of this part of work is to reconstruct the MMDI project to refine the program structure due to both Bluetooth server and client sharing several general parts. ''' Probing Bluetooth communication process between bluglu and Android devices '''* We've know the paring process (see the documentation below) based on the info from UHN.* Based on experiments, it seemed that the Android have been able to connect to bluglu device using fixed Bluetooth port number (#3).** Usually, Android device's Bluetooth implementation requires Bluetooth server use a random port number for the Bluetooth communication.** Based on experiments, we found the bluglu device uses a fixed port/channel number (#3) for the communication (need to get confirmation from UHN).** We tried to use Java reflection to realize (our Bluetooth client's) using fixed port #3 to communicate with bluglu device. It seemed connected.** But we are not sure the connection is on the right way because the next step doesn't work. * we are stuck when trying to communicate with bluglu using Android device (see issues below). ==Current Issues ==* How to connect to bluglu device?** We use the fixed port/channel number (#3) and the default application UUID (00001101-0000-1000-8000-00805f9b34fb) to connect to blugle device's server socket. Is this right process?* Android device cannot communicate with bluglu after connected.** After Android connected to bluglu device using the way above, the Android device Bluetooth client socket immediately obtained a packet (0x80001a100001ff460013f9ec7bc4953c11d2984e525400dc9e09) from the bluglu device. However, after this point, no matter what command is sent to the bluglu device, the Android device cannot receive any response.* We are new to bluglu device. We couldn't understand the communication process based on the UHN Device Communication Protocol specification (UDCP).** Here is a sample page of the UDCP: [[File:UDCP_SamplePage.jpg|thumb|center]]** We hope we can get more description or some code examples to show the communication process. Here is an example (a RE-232 communication protocol (part) between a Blood Glucose meter and personal computer). [[File:Communication_Process.jpg|thumb|center]]
=== About Bluglu Device ===
'''Bluglu device'''
* bluglu device is a Medical Device Data Interface Adapter, which can attach to the OneTouch® UltraMini® Blood Glucose Meters and converts the UART serialized data into Bluetooth. Bluglu device is a in-house product of Toronto University Health Network. Bluglu is built around an 8-bit microcontroller and includes a Bluetooth module, an Apple specific co-processor, LED status inducators, a micro-USB connector (for battery charging), and various passive components combined on a dual-layer printed circuit board.
[[File:Bluglu_Main_Components.jpg|thumb|center]]
''' Features'''
* Dimensions: 58cm x 35cm x 12cm
'''UDCP Documentation'''
* UHN Device Communication Protocol Specification (UDCP): a sample page only [[UDCP-page3File:UDCP_SamplePage.jpg|thumb|center]]
* Command Explanation:
** Device commands can be issued from the host to request data such as the the battery level. Device commands do not get passed to the sensor that is attached to the bluglu (glucose meter).
** Raw commands are sent from the host to bluglu. Bluglu will then strip out the actual raw packet and pass that to the sensor that is attached.
*
1. HTC A7275 (Android version 2.3.3).
2. MOTOROLA XT885 (Android version 4.04).
3. MOTOROLA MB860 (Android version 2.2.1).
==Test Case 1==