Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnecting instantly after sucessful connection #30

Open
Toshimonster opened this issue Oct 23, 2021 · 13 comments
Open

Disconnecting instantly after sucessful connection #30

Toshimonster opened this issue Oct 23, 2021 · 13 comments

Comments

@Toshimonster
Copy link

Currently running dietpi.

Everything works, except when I try to connect; It works for ~3s and disconnects.
Btmon shows this as a Remote User Terminated Connection

Any idea how I can find out what is giving this disconnect request?

Logs are running the echo example.

Bleno Debug=* enviroment dump
https://pastebin.com/PiMkBNH8

btmon dump
https://pastebin.com/EUnikR9E

Any help would be greatly appreciated, been at a loss for a very long time now, and it seems google does not contain any solutions.

@NXTminxu
Copy link

I had the same problem. Is anyone know how to fix it?
I tested on RPI CM4 and RPI 3 B+.
Nodejs v14.18.1 and Nodejs v17.0.1

@Toshimonster
Copy link
Author

I had the same problem. Is anyone know how to fix it? I tested on RPI CM4 and RPI 3 B+. Nodejs v14.18.1 and Nodejs v17.0.1

Are you running stock raspberrian?

@rzr
Copy link

rzr commented Oct 29, 2021

can you try earlier version and bissec it?

@Toshimonster
Copy link
Author

can you try earlier version and bissec it?

What do you mean by this?

@rzr
Copy link

rzr commented Oct 29, 2021

find where regression has been introduced good luck

@Toshimonster
Copy link
Author

find where regression has been introduced good luck

what?
Why would BLE use regression and bissectors, unless your talking about something else?

@rzr
Copy link

rzr commented Oct 29, 2021

@Toshimonster
Copy link
Author

https://git-scm.com/docs/git-bisect

well yes, but this isn't a versioning issue

@Toshimonster
Copy link
Author

(earlier version doesn't work)

@Toshimonster
Copy link
Author

Would appreciate any help, as although I know about bluez, the custom implementation is all brand new to me and I'm struggling to realise where this starts.
Otherwise I'm going to have to implement another form of GATT server, eg via python, but IMHO that gets rid of the point of writing in node in the first place!

@Toshimonster
Copy link
Author

While I prefer the interface in this library, if anyone else is having a similar issue another similar library exists at
https://github.com/Emill/node-ble-host
which does not have this issue.

@xuminready
Copy link

xuminready commented Nov 4, 2021

I had the same problem. Is anyone know how to fix it? I tested on RPI CM4 and RPI 3 B+. Nodejs v14.18.1 and Nodejs v17.0.1

Are you running stock raspberrian?

Yes, I tested several Raspberry Pi OS (from 2018 to latest release), all have the same issue. Although bleno works fine on PC with USB BLE dongle. I guess it's not Raspberry Pi OS issue. It's a bug on node-bluetooth-hci-socket v0.5.3-8. (https://github.com/abandonware/node-bluetooth-hci-socket/pull/32]

I rollback to v0.5.3-7, everything works fine for me.

npm install bleno@npm:@abandonware/bleno
npm install @abandonware/bluetooth-hci-socket@0.5.3-7

@MeanHat
Copy link

MeanHat commented Nov 10, 2021

Thanks @xuminready - this fix also worked for me when using FortiusANT on RPi0. Greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants