node-bluetooth-serial-port icon indicating copy to clipboard operation
node-bluetooth-serial-port copied to clipboard

Support lap for inquiry scan

Open Niels-Be opened this issue 8 years ago • 1 comments

I have a use case where a device listens on a custom iac code. Would be nice if this library could support this. It is as easy as setting the 4th parameter in the hci_inquiry call. Currently we just pass NULL there (defaults to giac). https://github.com/eelcocramer/node-bluetooth-serial-port/blob/a93c883eb7fea02b705d295f53ddc776e5a21ab0/src/linux/DeviceINQ.cc#L192

for a reference implementation see hci tool: https://github.com/RadiusNetworks/bluez/blob/e11bfba10cc15cf74f8a657fad018aece4a5bde9/tools/hcitool.c#L658

I can make a pull request if I get some hints on where to expose this in the node API. Maybe as optional argument to BluetoothSerialPort.inquire ?

Niels-Be avatar Dec 07 '17 09:12 Niels-Be

Hi,

Yes an optional argument sounds like a good option for this.

You can add the option to the struct to pass it into the native code.

I hope this helps.

eelcocramer avatar Dec 07 '17 11:12 eelcocramer