ARC Bluetooth LE stack bugs?

241 views
Skip to first unread message

Nathan Anderson

unread,
Mar 8, 2017, 4:49:22 AM3/8/17
to Chromium OS dev
I've hardly seen any discussion on this, and I've looked...if I missed something, I apologize, and please point me to it.

Are there known issues currently with ARC when it comes to its interactions with the Chrome OS/Chromium OS BT stack?  I can't seem to make it work with any Bluetooth LE devices.  Typically, an app attempting to communicate with a BLE device will cause an initial pairing to take place, but then appear to fail to communicate with it after that.

In looking for answers, I have managed to stumble across questions by developers who can not get their own Android apps that work fine on real Android OS to run on Chromium OS under ARC.  One such post over on SO (http://stackoverflow.com/questions/41972045/android-app-which-interacts-with-ble-devices-not-working-on-chromebook) suggests that the problem is that when the BT stack is asked to return the list of services that the device advertises, under ARC the function call (gatt.getServices) returns an empty list.  I can at least confirm that in my experience, if I am running and watching bluetoothctl in a crosh terminal while running something like Bluetooth LE Scanner (https://play.google.com/store/apps/details?id=com.macdom.ble.blescanner&hl=en), I do see bluetoothctl spit out the list of services, so the device is being asked and the underlying Chrome OS BT stack is aware of it, but Bluetooth LE Scanner under ARC shows a blank list.  (Confirmed it works fine on an actual Android device.)  Which probably explains why when I go to try and use the actual app that goes with the device, it fails to "connect" to the device.

I see a small handful of posts on various forums (some from the same guy) asking the same or similar questions, but no forthcoming answers.  Most of them have been posted within the last 30 days or so:


Is this a known issue that is already on somebody's radar, and if not, where can I go to raise it formally?

Thanks,

-- Nathan

Nathan Anderson

unread,
Mar 8, 2017, 4:51:32 AM3/8/17
to Chromium OS dev
I should mention that just last night I tried it on the latest dev channel release (58.something released March 3) and the same problem still is evident.

-- Nathan

Puthikorn

unread,
Mar 8, 2017, 6:17:40 PM3/8/17
to Chromium OS dev
What is your chromebook model and version in chrome://version and is it Android M or N?
There is a known issue that Android M BLE is a bit flaky. But I can't reproduce this on my side using newest ChromeOS.

Please send feedback via alt-shift-i if it is not working.

Thanks

Nathan Anderson

unread,
Mar 8, 2017, 7:31:42 PM3/8/17
to Chromium OS dev
Thanks for the response!

Chromebook is an Acer Chromebook 14 CB3-431.

58.0.3027.0
Platform 9331.0.0 (Official Build) dev-channel edgar
ARC 3778028

Appears to be Android M (6.0.1).  Can the Android running in the ARC++ container be updated to N?

Interestingly, the nRF app does give me some results.  I will play with this a bit more and compare to the results I get from running the same app on a phone and follow up.

I did find https://bugs.chromium.org/p/chromium/issues/detail?id=653310 which it looks like you're the owner of.  Interestingly, one of the BLE devices having trouble with is a Fitbit (Blaze).  The other device I can confirm acts similarly is the newer version of the Sphero toy (models updated to use BLE instead of BR/EDR, which includes the SPRK+ and BB-8 models).  Is it possible that the bug in question is misnamed and applies more widely than to Fitbit?

Thanks again,

-- Nathan

Puthikorn Voravootivat

unread,
Mar 8, 2017, 8:10:51 PM3/8/17
to Nathan Anderson, Chromium OS dev
Android version in ARC++ container is tied to ChromeOS version and device model. Some device already have Android N in R58 or R59.
It is not possible to upgrade just the Android in the container.

Also the fitbit bug you mentioned is already fixed in October so this is not related.

Thanks



--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-dev/Ci0N6QJo6lY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dev+unsubscribe@chromium.org.

Nathan Anderson

unread,
Mar 9, 2017, 1:03:06 PM3/9/17
to Chromium OS dev
Here is some additional information after further testing:

Taking a BLE edition Sphero as an example, on an actual Android device, both BLE Scanner and nRF Connect are in agreement that this device advertises 6 services: 

Generic Access (0x1800)
Generic Attribute (0x1801)
Device Information (0x180A)
+ 3 Custom/Unknown services (128-bit UUID)

On Android M running on ARC++ on a CB3-431, BLE Scanner shows no profiles, while nRF Connect shows 5.  The Generic Access (0x1800) one is missing from the list while all others are present.  My understanding is that Generic Access service is mandatory per the spec, so perhaps BLE Scanner also gets back a list of profiles that omits 0x1800, and when it is not present, it gets confused and simply renders a blank list as a result, while nRF Connect at least reports all of the services that are returned to it.

Another thing to note is that sometimes an Android app running on ARC++ will be unable to perform a BLE scan.  No devices show up.  This happens for both BLE Scanner and nRF Connect.  When this happens, it can be worked around in one of two ways:

1) Click the status area on the shelf, click on Bluetooth.
2) Start a crosh shell, go to bash, 'sudo bluetoothctl', issue 'scan on'.

Basically, when underlying Chrome OS starts a Bluetooth scan, all of a sudden the running Android app begins to get scan results back.  It seems to me to be a bug, though, that you have to "wake up" Bluetooth on Chrome OS manually before Android apps start working.  Not sure if this is related to the missing service though.

I will "Report an issue" with these findings.

-- Nathan
To unsubscribe from this group and all its topics, send an email to chromium-os-d...@chromium.org.

Nathan Anderson

unread,
Mar 9, 2017, 2:10:55 PM3/9/17
to Chromium OS dev
I forgot to mention that I also tried out yesterday's R59 canary build for this machine...

59.0.3033.0
9348.0.0 (Official Build) canary-channel edgar
ARC 3791709

...and at least for this model, Android N is still not included, so I was unable to test that.  Furthermore, BLE access in Android M ARC++ behaved identically in this canary build (as I would expect, just confirming).

There were new, unrelated ARC problems in this canary build (notably, Android apps would not repaint/refresh, so they would appear "frozen" even though they were actually running...if you minimized and the restored the app window to force a repaint, then it would show whatever changes should have been painted while it was live; so, click a button, minimize, restore, click another button, minimize, restore, etc.), so I have reverted back to dev.

-- Nathan

Puthikorn Voravootivat

unread,
Mar 9, 2017, 5:48:59 PM3/9/17
to Nathan Anderson, Chromium OS dev
Thanks for the testing. I filed a bug for this.

Nathan Anderson

unread,
Mar 9, 2017, 6:03:52 PM3/9/17
to Chromium OS dev
Awesome, thanks.  Let me know if there is anything more I can do / tests I can run that would be helpful.

-- Nathan

Michael

unread,
Apr 3, 2017, 7:52:28 AM4/3/17
to Chromium OS dev
Hi Nathan and Puthikorn, 

Thanks @Nathan for researching and posting your findings.

I'm also looking to get BLE app running on ChromeOS. We have a Unity app that runs fine on Android 4.4+ which uses BLE scanning to find our custom devices. So far it's been unsuccessful. Have you found out anything more that could be useful in getting this to work?

Cheers, 

Michael

Puthikorn Voravootivat

unread,
Apr 3, 2017, 2:19:39 PM4/3/17
to Michael, Chromium OS dev
Hi Michael

Please try the following
- Update ChromeOS to dev channel and test again.

If it's not working after that, please add a comment in http://crbug.com/700585 with your device version in chrome://version

Thanks.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Chromium OS dev" group.
To unsubscribe from this topic, visit https://groups.google.com/a/chromium.org/d/topic/chromium-os-dev/Ci0N6QJo6lY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to chromium-os-dev+unsubscribe@chromium.org.

Michael

unread,
Apr 4, 2017, 8:10:33 AM4/4/17
to Chromium OS dev, m...@samlabs.com
Thanks Puthikorn, 

I tried the app on Acer R13 chromebook running ChromeOS beta channel and it works!

Do you know of any pitfalls that might cause the ble connections to fail? What I see in my app is that the connection completes then disconnects immediately.

I'll try to get hold of the source code and see what they're doing differently.

Cheers, 

Michael
To unsubscribe from this group and all its topics, send an email to chromium-os-d...@chromium.org.

Puthikorn Voravootivat

unread,
Apr 4, 2017, 4:37:58 PM4/4/17
to Michael, Chromium OS dev
Don't know about why your app wouldn't work but the nRF connect app has a dump down
might be useful.

Thanks

To unsubscribe from this group and all its topics, send an email to chromium-os-dev+unsubscribe@chromium.org.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages