cordova-plugin-ble-central: Invalid UUID
I’m struggling while trying to write to some characteristics on a ble device. I’ve successfully written to 1 characteristic in the past, but I’ve been running into this error when I try to write to multiple characteristics in succession. I’m running each write as a callback for the previous ones, so that should be fine. I’ve attached the console output. One problem that I noticed is that it isn’t printing out the characteristics even though I used JSON.stringify on the device object. My repo is here:
with the important file in js/index.js
What exactly is going wrong? Thanks! Any help would be appreciated.

I/chromium(16493): [INFO:CONSOLE(173)] "CLICKED!", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "onEnable", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "Connection error: [object Object]", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "CONNECTION SUCCESSFUL", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "{ I/chromium(16493): "id": "C0:98:E5:00:F8:02", I/chromium(16493): "advertising": {}, I/chromium(16493): "rssi": -64, I/chromium(16493): "advertisement": { I/chromium(16493): "serviceUuids": [ I/chromium(16493): "FEAA" I/chromium(16493): ], I/chromium(16493): "serviceData": [ I/chromium(16493): { I/chromium(16493): "uuid": "FEAA", I/chromium(16493): "data": { I/chromium(16493): "0": 16, I/chromium(16493): "1": 186, I/chromium(16493): "2": 2, I/chromium(16493): "3": 103, I/chromium(16493): "4": 111, I/chromium(16493): "5": 111, I/chromium(16493): "6": 46, I/chromium(16493): "7": 103, I/chromium(16493): "8": 108, I/chromium(16493): "9": 47, I/chromium(16493): "10": 112, I/chromium(16493): "11": 75, I/chromium(16493): "12": 105, I/chromium(16493): "13": 76, I/chromium(16493): "14": 87, I/chromium(16493): "15": 53 I/chromium(16493): } I/chromium(16493): } I/chromium(16493): ], I/chromium(16493): "flags": 6 I/chromium(16493): } I/chromium(16493): }", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "created buffer", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "started write", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "error: Invalid UUID: E528A411FF4F3089D44F7CB505ABA641", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "error: Invalid UUID: E528A411FF4F3089D44F7CB505ABA641", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "error: Invalid UUID: E528A411FF4F3089D44F7CB505ABA641", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "error: Invalid UUID: E528A411FF4F3089D44F7CB505ABA641", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173) I/chromium(16493): [INFO:CONSOLE(173)] "error: Invalid UUID: E528A411FF4F3089D44F7CB505ABA641", source: https://rawgit.com/lab11/eink/master/software/summon/plugins/cordova-plugin-console/www/console-via-logger.js (173)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- rev74: https://github.com/don/cordova-plugin-ble-central/issues/270#issuecomment-230790264 — committed to lab11/eink by ColeHud 8 years ago
That error is from Android, the plugin is just passing the error along to you. The MTU for a characteristic is usually 20 bytes. The peripheral need to support large characteristics, some only support 20 bytes. iOS and Android will chunk data and send blob requests for larger characteristics. iOS and new Android devices are pretty solid up to the max of 500 bytes. With older android versions/devices I’ve seen them fail with over 100 bytes.
If the app that works runs on your Android phone, they might be formatting the data different or chunking the data different. Try enabling the HCI debug log in Android settings and see what’s happening.
My coworker informed me that the screenshots aren’t up to par, so here’s the output in text form.
UUIDs aren’t valid without the dashes
A peripheral object is passed to the success callback for
ble.connect. If you log that objectconsole.log(JSON.stringify(peripheral)you’ll get a list of the characteristics and properties. Make sure your code matches the details from the peripheral.