chrvadala / node-ble

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
https://www.npmjs.com/package/node-ble
MIT License
315 stars 46 forks source link

Only able to write 20 bytes. #11

Closed DonkDH closed 2 years ago

DonkDH commented 4 years ago

I'm using a, Raspberry Pi Zero when I try to write a string of 21 characters to a characteristic the application just hangs and hangs the receiving device as well. Where as if I send a string that 20 characters it sends perfectly. So the weird thing is that if I use the gatttool console interface I can send significantly longer strings to that same characteristic.

Any ideas would be much appriciated, Thanks

xalopp commented 2 years ago

Prior to the Raspberry Pi OS based on Debian Bullseye, BlueZ was shipped in version 5.50. This version had a issues when writing a message exceeding the MTU size via D-Bus. GattTool is directly using the Bluetooth stack without D-Bus, that's why this tool worked fine.

Using the latest Raspberry Pi OS (based on Debian Bullseye) will fix that issue, because BlueZ is shipped with version 5.55 with includes the D-Bus fixes.