noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.12k stars 447 forks source link

Example echo disconnects with error 22 #383

Closed Domvel closed 6 years ago

Domvel commented 6 years ago

The example "Echo" on Raspberry PI with bleno 0.5.0 disconnects after about 30 seconds with Error 22 GATT CONN TERMINATE LOCAL HOST. And no services / characteristics are visible (discovered). Is this a known issue?

don commented 6 years ago

I'd try disabling bluetoothd, it can cause problems with services not showing up.

sudo service bluetooth stop

Then manually start the bluetooth

sudo hciconfig hci0 up

If the disconnect keeps happening, run btmon to get detailed log of the communication

sudo btmon

If you're still not seeing all the services, apps like nRF Connect have an "Refresh Services" option which should overwrite any cached data.

I was not able to duplicate this on a Raspberry Pi 3 B+. An iPhone 7 (11.3.1) and Nexus 5X (8.1.0) stayed connected.

don commented 6 years ago

@Domvel is this still an issue?

Domvel commented 6 years ago

Not more followed.