noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.13k stars 449 forks source link

how to specify which BLE device to control #370

Closed bluetiger30 closed 6 years ago

bluetiger30 commented 6 years ago

Hi , I have 2 BLE devices available on my raspberry pi :

pi@raspberrypi:~ $ sudo hciconfig
hci1:   Type: Primary  Bus: USB
        BD Address: 5C:F3:70:7C:6E:52  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN
        RX bytes:882 acl:0 sco:0 events:36 errors:0
        TX bytes:386 acl:0 sco:0 commands:36 errors:0

hci0:   Type: Primary  Bus: UART
        BD Address: B8:27:EB:F1:7E:33  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN
        RX bytes:654 acl:0 sco:0 events:33 errors:0
        TX bytes:419 acl:0 sco:0 commands:33 errors:0

how can I specify in bleno which device I'm interested in ? or can you please guide me to where you set the hci address in the library code? or how can I pass it the id ?

encku commented 6 years ago

You can check README.md :

README.md#multiple-adapters