Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding support for Zephyr Bluetooth HCI USB/UART #51

Open
olsky opened this issue Sep 27, 2023 · 11 comments
Open

adding support for Zephyr Bluetooth HCI USB/UART #51

olsky opened this issue Sep 27, 2023 · 11 comments

Comments

@olsky
Copy link

olsky commented Sep 27, 2023

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

image

@Apollon77
Copy link

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

@stoprocent
Copy link

stoprocent commented Oct 20, 2023

Have a look at my pull request #52 and look at the README

@olsky
Copy link
Author

olsky commented Oct 20, 2023

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!

@stoprocent
Copy link

stoprocent commented Oct 20, 2023

@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.

@olsky
Copy link
Author

olsky commented Oct 20, 2023

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! :)

@olsky
Copy link
Author

olsky commented Nov 7, 2023

hi @stoprocent!
any updates?

@stoprocent
Copy link

Have a look here: abandonware/noble#317

@Apollon77
Copy link

@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.

@stoprocent
Copy link

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.

@olsky
Copy link
Author

olsky commented Nov 8, 2023

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 ?

@stoprocent
Copy link

@olsky Added support for usb dongle: https://github.com/stoprocent/node-bluetooth-hci-socket/tree/main/misc/nrf52840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants