node-bluetooth-hci-socket
node-bluetooth-hci-socket copied to clipboard
adding support for Zephyr Bluetooth HCI USB/UART
can the Bluetooth HCI from Zephyr RTOS be supported?
https://docs.zephyrproject.org/latest/connectivity/usb/device/usb_device.html
There are options for USB and UART, when flashed whey report PID: 0x00b and for H4 pid: 0x00c The Vid is: 0x2fe3
I would say: Try to add it manually in https://github.com/abandonware/node-bluetooth-hci-socket/blob/master/lib/usb.js#L30 and if it works provide a PR for it. Thank you. I think verifying this without such a device this is impossible
Have a look at my pull request https://github.com/abandonware/node-bluetooth-hci-socket/pull/52 and look at the README
I tried to add it manually, but no luck (with both zephyr builds hci and hci h4). start sequence went ok, but no reply. the pr from @stoprocent looks good, I will test it out. thanks!
@olsky I have taken a little bit different approach. Instead of fighting compiling Noble and Bleno and HCI for every native platform I left it to https://github.com/serialport/node-serialport these guys :)
We are using NRF USB dongles extensively on many OSes and then we only set BLUETOOTH_HCI_SOCKET_UART_PORT
to point it to the right serial port.
It's also very easy then to have X number of independent BLE dongles plugged into one machine.
I like your approach, with bleno and noble I had problems.
maybe not a nodejs directly, but we use nodered, after several "hangs" the decision was to use HCI.
thank you for pointing this! :)
hi @stoprocent! any updates?
Have a look here: https://github.com/abandonware/noble/issues/317
@stoprocent why not making a PR with the relevant code changes. Else I can also try to sync that parts from your repo ... most of the Github action changes are needed to be taken over in a first place because that's maybe more discussion.
I sent @olsky a ticket to read the story behind an update to use this code. Also still there is no update from @rzr and udpates are happening since a week and it fits perfectly in what I was saying that changes are taking too long. I will make PRs but that requires changes. If I will invest time into changes I would love some input like to which level we should integrate for now. I will still run my forks tho because I relay on this with my production code. I will only switch to abanadonware when it's all integrated so i have UART support and precompiled binaries for all the platforms.
I would vote for these changes and would offer testing with nrf52 hardware. @stoprocent the point is valid, if you invest time -- you expect the follow up...
maybe in first place a check if in general that change is ok: @Apollon77 ?
@olsky Added support for usb dongle: https://github.com/stoprocent/node-bluetooth-hci-socket/tree/main/misc/nrf52840