Calling startNotifications() and getting "GATT Error: Not supported"

2,771 views
Skip to first unread message

Neil Kolban

unread,
Jun 25, 2017, 5:42:47 PM6/25/17
to web-bluetooth
I have written a JS app that runs in the latest Chrome which, when it gets a characteristic from the Peripheral exposed service, performs a startNotifications() call upon it.  This results in an error reported in the console of:

Uncaught (in promise) DOMException: GATT Error: Not supported.

I am relatively confident that I have flagged the Peripheral as supporting both READ and NOTIFY and am at a loss to make progress on how to diagnose further.

I have run from a clean start and captured the Chrome debug log for Web Bluetooth here:


We can see the error at the end of the trace.

My Chrome release is Version 59.0.3071.109 (Official Build) (64-bit) and I am running on Linux.

Giovanni Ortuño

unread,
Jun 25, 2017, 7:54:16 PM6/25/17
to Neil Kolban, web-bluetooth
Hi,

From the logs:

[26198:26198:0625/163549.396783:ERROR:bluetooth_remote_gatt_characteristic.cc(162)] Found 0 client characteristic configuration descriptors.

You also need a CCC Descriptor for notifications to be enabled.

Gio


--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetoot...@chromium.org.
To post to this group, send email to web-bl...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/web-bluetooth/32b237d6-5d05-4337-866e-64e10166721a%40chromium.org.

Neil Kolban

unread,
Jun 25, 2017, 10:02:00 PM6/25/17
to web-bluetooth, kol...@kolban.com
Thank you sir.  I wasn't familiar with the "CCC Descriptor" but I think what we mean is the "Client Characteristic Configuration"  descriptor.... see:


I had assumed that descriptors for characteristics were optional and that the "Notify" Property of the characteristic itself would have defined whether notifications were enabled or disabled.   Thank you for the excellent response.  I'll study on how to add descriptors to my ESP32 BLE device and test once added.


Neil Kolban

unread,
Jun 29, 2017, 7:53:55 PM6/29/17
to web-bluetooth, kol...@kolban.com
I added a Client Characteristic Configuration but continued to see the same issue on Linux.  When I looked at the trace some more, I continued to not see the descriptor.  However, when I looked on Android using a BLE scanner, I did see the descriptor.  I moved my testing over to  Android and a Chrome Book and all works as desired ... however on my BlueZ based Linux system, the descriptor is not showing up in the Chrome trace.  I'll continue to examine.

François Beaufort 🇫🇷

unread,
Jun 30, 2017, 3:07:37 AM6/30/17
to Neil Kolban, web-bluetooth
Which version of Bluez do you use?

On Fri, Jun 30, 2017 at 1:53 AM, Neil Kolban <kol...@kolban.com> wrote:
I added a Client Characteristic Configuration but continued to see the same issue on Linux.  When I looked at the trace some more, I continued to not see the descriptor.  However, when I looked on Android using a BLE scanner, I did see the descriptor.  I moved my testing over to  Android and a Chrome Book and all works as desired ... however on my BlueZ based Linux system, the descriptor is not showing up in the Chrome trace.  I'll continue to examine.

--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetooth+unsubscribe@chromium.org.

To post to this group, send email to web-bl...@chromium.org.

Neil Kolban

unread,
Jun 30, 2017, 9:20:19 AM6/30/17
to web-bluetooth, kol...@kolban.com, fbea...@google.com
I am running 5.43-0uubuntu1

This is the default with a 17.04 Ubuntu distribution.

Neil Kolban

unread,
Jul 4, 2017, 5:42:10 PM7/4/17
to web-bluetooth, kol...@kolban.com, fbea...@google.com
I continue to study this area.  On the concept of requiring that my BLE peripheral have a suitable Client Characteristic Configuration  Descriptor (UUID: 0x2902) ... if I may ask ... where is that fact documented (assuming it is)?

I've also been running some tests using my BLE device (an Espressif ESP32) against some Linux Bluetooth tools (gatttool).  In my BLE device code, I tested by creating a service and a characteristic that does not add a Client Characteristic Descriptor.   When I run gatttool and connect to my BLE device, I start to see the arrival of the BLE notifications being published by the device.

As best I can understand, the Client Characteristic Descriptor is an "optional" descriptor associated with a characteristic and can be used to dynamically enable/disable notifications.  For example, if I have an application that wishes to prevent itself being woken up by notifications from the peripheral, it may remotely change the descriptor property to indicate that the peripheral should stop making notifications.  If the descriptor is not present on the BLE device then the application would not be able to suspend the notification from the device.

If this story is correct (and that is a big iff) then I am thinking that it is too restrictive to have Web Bluetooth require the Client Characteristic Descriptor.

Jeffrey Yasskin

unread,
Jul 5, 2017, 12:20:09 AM7/5/17
to Neil Kolban, web-bluetooth, François Beaufort
On Tue, Jul 4, 2017 at 2:42 PM, Neil Kolban <kol...@kolban.com> wrote:
> I continue to study this area. On the concept of requiring that my BLE
> peripheral have a suitable Client Characteristic Configuration Descriptor
> (UUID: 0x2902) ... if I may ask ... where is that fact documented (assuming
> it is)?

Bluetooth 5.0 (https://www.bluetooth.com/specifications/adopted-specifications),
section 3.G.3.3.1.1 Characteristic Properties, says:
"Notify
0x10
If set, permits notifications of a Characteristic Value without
acknowledgment using the procedure defined in Section 4.10. If set,
the Client Characteristic Configuration Descriptor shall exist.

Indicate
0x20
If set, permits indications of a Characteristic Value with acknowl-
edgment using the procedure defined in Section 4.11. If set, the
Client Characteristic Configuration Descriptor shall exist."

3.3.3.3 Client Characteristic Configuration then says that
notifications and indications cannot be sent unless the appropriate
bit in CCCD is set, and that all bits default to 0.

HTH,
Jeffrey

morgan...@gmail.com

unread,
Nov 22, 2017, 12:50:39 AM11/22/17
to web-bluetooth, kol...@kolban.com, fbea...@google.com
Curious if any work around has been found for this issue. I'm still seeing it running....
Version 62.0.3202.89 (Official Build) Built on Ubuntu , running on Ubuntu 17.10 (64-bit)
5.46-0ubuntu3

And like @Kolban I am certain NOTIFY bit is set. 

and with nRF Connect I can subscribe and receive notifications.

Giovanni Ortuño

unread,
Nov 22, 2017, 12:58:59 AM11/22/17
to morgan...@gmail.com, web-bluetooth, kol...@kolban.com, fbea...@google.com
Logs would be really useful to understand what's going on. Instructions at https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs

--
You received this message because you are subscribed to the Google Groups "web-bluetooth" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-bluetoot...@chromium.org.

To post to this group, send email to web-bl...@chromium.org.

phta...@gmail.com

unread,
Feb 7, 2018, 8:24:13 AM2/7/18
to web-bluetooth
I have the same problem on ubuntu 16.04 using bluez 5.45
However, on MacOS notifications work fine.
The code I am using came from section 5 of the Web Bluetooth Series on bluetooth.org 
It seems likely that the application code is OK, given its provenance.
Paul
Reply all
Reply to author
Forward
0 new messages