2

Trying to connect an Android phone to a somewhat unusual, nonstandard BLE device (a blood pressure monitor). Data points:

  • My program connects and reads other BLE devices fine.
  • My program sees the device in a BLE scan, but won't connect. Instead I get an immediate "Disconnected" status with a generic GATT_ERROR (status code 0x85).
  • Nordic's Android BLE scanner app will connect and read/write the device.
  • The device uses an unknown Service (FFF0) with one characteristic (FFF1) for notifications from the device and another (FFF2) to write commands to it.
  • The TI BLE packet sniffer software seems to indicate that no connection request is ever sent to the device.

Here's what I've observed with the Nordic scanner app: When you turn the device on, it advertises and the app can connect to it. If you then enable Notifications on FFF1, you receive a byte 0xA5; this is per the device spec, which says it sends this byte every 500 ms. The (rather rudimentary) docs say this is "waiting for the connection" but obviously it is already connected. If you then write the specified "start" command string to FFF2, it starts taking a reading and appears to perform correctly.

The Nordic app can connect; why can't mine?

Update: have verified that the Nordic app works on the same Android phone that is running my program.

Robert Lewis
  • 1,847
  • 2
  • 18
  • 43
  • I wrote a new test program using the `RxAndroidBle` library and found that I could connect to the device, but only if the `autoConnect` flag was `true`. I have read that BLE devices are inconsistent: some work better with the flag `true`, others with it `false`. Now trying to retrofit this to my original program. – Robert Lewis May 08 '18 at 22:19
  • Without `autoConnect`, the program kept failing with an "already connected" error. With `autoConnect`, I still see this error message but it corrects itself and successfully connects. – Robert Lewis May 08 '18 at 22:24
  • If it's "already connected" can you get the connected device from the bluetooth adapter, or does the list return no devices? Also, it might help to provide some of your implementation on how you're handling the device scanning/connecting. – Submersed May 09 '18 at 15:09

0 Answers0