abandonware / node-bluetooth-hci-socket

MIT License
42 stars 47 forks source link

rework the disconnect / connect workaround #28

Closed splitice closed 2 years ago

splitice commented 2 years ago

I didnt build the original patch (https://github.com/noble/node-bluetooth-hci-socket/pull/39), I just fixed bugs (EINTR during connect) and brought the patch forward and rebased on abandonware fork

Seems to work though. 1 day testing with two devices, including one that failed on nearly every connect after the first.

And relates to #9

rzr commented 2 years ago

Is anyone against merging this ?

splitice commented 2 years ago

Do note that originally it's claimed this works because it forces the kernel to flush "book keep" (delayed work?). I'm a little concerned it might actually works because it delays the connection success (until after the disconnect is processed).

Maybe @sandeepmistry cand describe the patch in more detail