Android 4.4.2/5.1.1: HDP problems - unable to connect to Bloodpressure device

61 views
Skip to first unread message

Kenneth Thorman

unread,
Jul 17, 2017, 4:28:21 PM7/17/17
to android-platform

(This was previously asked in a fairly quite forum at https://github.com/andengineering/A-D-HDP-Android-Demo/issues/8 )


We are experiencing problems connecting to the Bloodpressure device on Android 5.1.1 and on some Lenovo 4.4.2 using BT

We have a quite few medical devices connected to our Android app. Most of these devices are using a proprietary SDK to connect to the device, but 2 devices are not

  • AnD Bloodpressure device
  • AnD Precision Scale device

Both of these devices are using Android HDP (Android implementation of the Continua standard). All proprietary devices/SDKs work on Android 5.1.1. The HDP Bloodpressure device does not (I am not sure if the Precision Scale currently works or not since I do not have one currently in house for testing)

It works on other Android versions, and it does not seem specifically related to the kernel version shipped with the different devices.

We are getting this error in the logcat log

E/BluetoothHealth(14202): Could not bind to Bluetooth Health Service with Intent { act=android.bluetooth.IBluetoothHealth }

which when you do a Google search it indicate that the error is from this class

https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothHealth.java#31


/**
 * Public API for Bluetooth Health Profile.
 *
 * <p>BluetoothHealth is a proxy object for controlling the Bluetooth
 * Service via IPC.
 *
 * <p> How to connect to a health device which is acting in the source role.
 *  <li> Use {@link BluetoothAdapter#getProfileProxy} to get
 *  the BluetoothHealth proxy object. </li>
 *  <li> Create an {@link BluetoothHealth} callback and call
 *  {@link #registerSinkAppConfiguration} to register an application
 *  configuration </li>
 *  <li> Pair with the remote device. This currently needs to be done manually
 *  from Bluetooth Settings </li>
 *  <li> Connect to a health device using {@link #connectChannelToSource}. Some
 *  devices will connect the channel automatically. The {@link BluetoothHealth}
 *  callback will inform the application of channel state change. </li>
 *  <li> Use the file descriptor provided with a connected channel to read and
 *  write data to the health channel. </li>
 *  <li> The received data needs to be interpreted using a health manager which
 *  implements the IEEE 11073-xxxxx specifications.
 *  <li> When done, close the health channel by calling {@link #disconnectChannel}
 *  and unregister the application configuration calling
 *  {@link #unregisterAppConfiguration}
 *
 */
  • All other BT devices with proprietary SDKs are working.
  • We do not know if this is happening also for the AnD precision weight (also a Continua device)
  • It does happen all the time on AnD Bloodpressure device (Continua)
  • It happens on multiple kernels
    • Samsung View 18" , version 3.10.61-5944662, Android 5.1.1
    • Huawei M2, version 3.10.74-g72cda65, Android 5.1.1
    • Sony X Smartphone Version 3.4.0 - perf - gbe52486, Android 5.1.1

I have been searching high and low on Google and not really come up with anything useful


This is with all the lowest level of debugging logging that I can set using logcat

D:\Android\android-sdk\platform-tools>adb logcat bt-btm:V bt-l2cap:V bt-btif:V BluetoothMapService:V BluetoothManagerServvice:V BluetoothHealth:V *:S
--------- beginning of system
--------- beginning of main

This below logline is displayed as soon as the Activity that starts the bluetooth connection to the device is displayed on the screen

E/BluetoothHealth(30083): Could not bind to Bluetooth Health Service with Intent { act=android.bluetooth.IBluetoothHealth }

These below lines show up in the log when the measurement it showing on the Bloodpressure device display, no values are visible on the tablet or phone

W/bt-btm  (10164): btm_acl_role_changed: BDA: 00-09-1f-80-99-17
W/bt-btm  (10164): btm_acl_role_changed: New role: 0
W/bt-btm  (10164): btm_acl_created hci_handle=11 link_role=1  transport=1
W/bt-btm  (10164): btm_acl_created hci_handle=11 link_role=0  transport=1
W/bt-l2cap(10164): L2CAP - st: CLOSED evt: 10
W/bt-l2cap(10164): L2CAP - st: TERM_W4_SEC_COMP evt: 7
W/bt-l2cap(10164): L2CA_ErtmConnectRsp()  CID: 0x0046  Result: 0  Status: 0  BDA: 00091f809917  p_ertm_info:0x00000000
W/bt-l2cap(10164): L2CAP - st: W4_L2CA_CON_RSP evt: 22
W/bt-l2cap(10164): L2CAP - st: CONFIG evt: 24
W/bt-l2cap(10164): L2CAP - st: CONFIG evt: 14
W/bt-l2cap(10164): L2CAP - st: CONFIG evt: 25
W/bt-l2cap(10164): L2CAP-Upper layer Config_Rsp,Local CID: 0x0046,Remote CID: 0x0040,PSM: 1,our MTU present:1,our MTU:768
W/bt-l2cap(10164): L2CAP - st: CONFIG evt: 15
W/bt-l2cap(10164): L2CAP-peer_Config_Rsp,Local CID: 0x0046,Remote CID: 0x0040,PSM: 1,peer MTU present: 0,peer MTU: 672
W/bt-btm  (10164): btm_read_remote_version_complete: BDA: 00-09-1f-80-99-17
W/bt-btm  (10164): btm_read_remote_version_complete lmp_version 4 manufacturer 10 lmp_subversion 64399
W/bt-btif (10164): info:x10
W/bt-l2cap(10164): L2CA_SetDesireRole() new:x0, disallow_switch:0
E/bt-btm  (10164): Ignoring RNR as the state is not BTM_SEC_STATE_GETTING_NAME
W/bt-l2cap(10164): L2CA_DisconnectRsp()  CID: 0x0046
W/bt-l2cap(10164): L2CAP - st: W4_L2CA_DISC_RSP evt: 28
E/bt-btm  (10164): btm_sec_disconnected - Clearing Pending flag
W/bt-l2cap(10164): L2CA_SetDesireRole() new:x0, disallow_switch:0
D/BluetoothMapService(10164): onReceive
D/BluetoothMapService(10164): onReceive, action android.bluetooth.device.action.ACL_DISCONNECTED


I am really not sure on how to move in in finding a workaround for this problem. It only seems to happen on certain devices/Android/kernel software versions.


Any help would be greatly appreciated


Thank you in advance.


Regards

Kenneth




Reply all
Reply to author
Forward
0 new messages