question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IDE no longer able to connect. No service matching UUID found on device.

See original GitHub issue

Hi,

First of all, thanks for your work on this software.

Please note this may not be an issue with the Espruino software, but something lower in the stack.

The issue:

I was writing/pushing/testing code onto the BangleJS from the Espruino Web IDE when the connection dropped between the IDE and BangleJS.

I attempt to reconnect the Espruino Web IDE to the BangleJS, but I get a “Connection Failed” error in the console, and the following information in the Settings->Console:

Connecting… Set Slow Write = true Connecting to Bangle.js 42f5 BT> Device Name: Bangle.js 42f5 BT> Device ID: BYfxEVPBkeAIzXRROotySA== Connected to BLE BT> Connected BT> ERROR: NotFoundError: No Services matching UUID 6e400001-b5a3-f393-e0a9-e50e24dcca9e found in Device. BT> Disconnected (gattserverdisconnected) ERROR: [notify_error] Connection Failed. Connection Failed.

Hardware/Software information

Espruino:

  • Hardware: BangleJS
  • Firmware version: 2v05 (I tried it with 2v08 too)

Development PC information:

  • OS: Debian unstable/sid
  • Kernel version: 5.9.0 (I tried 5.2.0 as an alternative)
  • Bluetooth hardware: CSR 4.0 (according to dmesg, “CSR8510 A10”)
  • BlueZ version: 5.55
  • Chromium version: 83.0.4103.116

Things tried

  • Tried to connect from the web browser IDE (failed)
  • Tried with a different Linux kernel booted (5.2.0). Also unsuccessful
  • Tried it with a different version of the BangleJS firmware (2v05 and 2v08 – both failed)
  • Tried to “clear” browser configuration (i.e. rm -rf ~/.config/chromium ~/.cache/chromium). Failed.
  • I suspected it might be something deeper in the stack (e.g. bluetooth config being cached?), so I created a new Linux user on the same PC, and tried connecting, that failed too.
  • Powering down/restarting the PC and BangleJS watch (power cycle the BT hardware). Unsuccessful.

What worked:

  • I tried from my other computer. The same software stack (i.e. Debian unstable). It worked. I could pair and push code to the same BangleJS.

What changed recently:

  • I’ve been using this setup weekly for the last 10 months (originally with other Espruino hardware), and it’s been okay up until now.
  • Latest changes include: upgrading firmware to 2v08, upgrading kernel to 5.9.0

Debugging information

Based on my limited understanding of Bluetooth, it appears that the service UUID does exist (run on the PC experiencing issues):

$ sudo bluetoothctl [bluetooth]# connect F3:CA:1F:3A:42:F5 Attempting to connect to F3:CA:1F:3A:42:F5 [CHG] Device F3:CA:1F:3A:42:F5 Connected: yes Connection successful [CHG] Device F3:CA:1F:3A:42:F5 Connected: yes Connection successful [CHG] Device F3:CA:1F:3A:42:F5 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device F3:CA:1F:3A:42:F5 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [NEW] Primary Service (Handle 0x1a7d) /org/bluez/hci0/dev_F3_CA_1F_3A_42_F5/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [NEW] Secondary Service (Handle 0x1a7d) /org/bluez/hci0/dev_F3_CA_1F_3A_42_F5/service000b 6e400001-b5a3-f393-e0a9-e50e24dcca9e Nordic UART Service [NEW] Characteristic (Handle 0xd8ab) /org/bluez/hci0/dev_F3_CA_1F_3A_42_F5/service000b/char000c 6e400003-b5a3-f393-e0a9-e50e24dcca9e Nordic UART RX [NEW] Descriptor (Handle 0x6da0) /org/bluez/hci0/dev_F3_CA_1F_3A_42_F5/service000b/char000c/desc000e 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [NEW] Characteristic (Handle 0xd8ab) /org/bluez/hci0/dev_F3_CA_1F_3A_42_F5/service000b/char000f 6e400002-b5a3-f393-e0a9-e50e24dcca9e Nordic UART TX [CHG] Device F3:CA:1F:3A:42:F5 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Device F3:CA:1F:3A:42:F5 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Device F3:CA:1F:3A:42:F5 UUIDs: 6e400001-b5a3-f393-e0a9-e50e24dcca9e [CHG] Device F3:CA:1F:3A:42:F5 ServicesResolved: yes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
the-real-edcommented, Oct 22, 2020

I found the issue and solution. Thanks for all your help.

The short version is, remove the Bluetooth cache file for the controller/device combination as follows: sudo rm /var/lib/bluetooth/<Controller MAC>/cache/<Device MAC> For my combination of controller and BangleJS this was: sudo rm /var/lib/bluetooth/00\:1A\:7D\:DA\:71\:13/cache/F3\:CA\:1F\:3A\:42\:F5 Note: depending on how the cache files are generated, it might be a good idea to stop the bluetooth service first via: sudo systemctl stop bluetooth.service Then after deleting the cache file, start it back up with: sudo systemctl start bluetooth.service

The longer version (for anybody that might stumble across this): I stopped the Bluetooth service: sudo systemctl stop bluetooth.service And brought it up in debug mode: sudo bluetoothd -nd After attempting to connect to the device from the IDE, I noticed this in the debug log:

bluetoothd[132414]: src/device.c:gatt_debug() start: 0x0001, end: 0x0009, uuid: 00001800-0000-1000-8000-00805f9b34fb
bluetoothd[132414]: src/device.c:gatt_debug() start: 0x000a, end: 0x000a, uuid: 00001801-0000-1000-8000-00805f9b34fb
bluetoothd[132414]: src/device.c:gatt_debug() start: 0x000b, end: 0xffff, uuid: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
bluetoothd[132414]: src/device.c:gatt_service_removed() start: 0x000b, end: 0xffff

Searching for “gatt_service_removed” I came across a mailing list post that discusses “link keys”. Some more searching on “bluez remove link key”, I came across this post that informed me of /var/lib/bluetooth/ (the path of the cache file explains why creating a new Linux user on the troublesome PC led to the same issue). After some backing up/deleting directories I figured out the solution above.

Again, thanks for your time. Much appreciated. All the best.

0reactions
the-real-edcommented, Oct 22, 2020

Was this the case for you as well as that poster?

It was an issue for me, but I didn’t read the links I posted thoroughly enough to determine if they tried/experienced the same thing 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

No services matching UUID help · Issue #513
I am getting the same error message while trying to get the battery service (0x180F) of a Tacx Heart Rate Belt. nRF Connect...
Read more >
"No Services matching UUID found in Device" error when ...
Now, whenever I try to connect to the watch from anything (Web IDE, Apps Loader) I get an error saying " ERROR: NotFoundError:...
Read more >
Web Bluetooth API Error: No Services matching UUID
I'm playing with the Web Bluetooth API and I'm trying to get the current battery level of my device (Xiaomi MyBand, BLE device)...
Read more >
Wio Terminal Bluetooth Tutorial
Find out the BLE device and connect it, then you will see the UUID and MAC address. You can sent or revice the...
Read more >
BLE - Getting started help - #18 by kkeng
Hello. I've been struggling to understand how to do what I think is a simple thing with BLE on the Particle units. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found