abandonware / node-bluetooth-hci-socket

MIT License
43 stars 48 forks source link

rework the disconnect / connect workaround #28

Closed splitice closed 3 years ago

splitice commented 3 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 3 years ago

Is anyone against merging this ?

splitice commented 3 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