noble / node-bluetooth-hci-socket

MIT License
154 stars 185 forks source link

Add support for Intel BLE Adapter #31

Closed urish closed 8 years ago

urish commented 8 years ago

Should fix #3. Tested on 3 both Dell and Toshiba PCs with internal Intel BLE adapter, both running Windows 10.

sandeepmistry commented 8 years ago

@urish thanks!

urish commented 8 years ago

Thank you Sandeep!

Two things I noted so far:

  1. The adapter can't scan and connect at the same time, similar to sandeepmistry/noble#165. It seems like in some cases, you even need to set a small timeout between the stopScanning() and the connect() calls.
  2. When connected to a device, terminating the process with Ctrl+C and starting it again seem to fail. I haven't investigated much, but seems like reinstalling the WinUSB driver with Zadig revives the adapter.
urish commented 8 years ago

@sandeepmistry any chance for a new release? I hope to use it in a workshop I'm running next week :-)

Thanks!

sandeepmistry commented 8 years ago

I've published v0.5.0 to npm with your changes.

The adapter can't scan and connect at the same time, similar to sandeepmistry/noble#165. It seems like in some cases, you even need to set a small timeout between the stopScanning() and the connect() calls.

Interesting, I still haven't figured out if this is due to different interpretations of the HCI spec. and firmware implementation.

What if you pass a callback into noble.stopScanning() then call connect()?

When connected to a device, terminating the process with Ctrl+C and starting it again seem to fail. I haven't investigated much, but seems like reinstalling the WinUSB driver with Zadig revives the adapter

Please create a new issue, when you have more details for this. Btw, noble attempts to listen for Ctrl-C here.

urish commented 8 years ago

Thank you so much for publishing the new version!

I will try the thing with the stopScanning() callback and report back.

Any ideas how to investigate the 2nd issue other than setting DEBUG=*? Perhaps some way to compile libusb with additional debug output?

sandeepmistry commented 8 years ago

You're welcome!

Any ideas how to investigate the 2nd issue other than setting DEBUG=*? Perhaps some way to compile libusb with additional debug output

Not too sure about this, I'm not a full-time Window's user. Could you share more details on what you mean by "starting it again seem to fail"? Let's start a new issue to track this :)

urish commented 8 years ago

Alright, I will try to gather additional details and open a second issue