-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Incorporate BlueKitchen BTstack as an alternative stack to NimBLE for ubluetooth module #5672
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
Incorporate BlueKitchen BTstack as an alternative stack to NimBLE for ubluetooth module #5672
Conversation
Dumb question: what's the advantage over nimble? |
Dual stack (i.e. BT Classic) |
In addition to dual stack it's also qualified with the Bluetooth SIG. It should also be noted that it's free only for non-commercial use. For commercial use you must purchase a license from BlueKitchen: http://bluekitchen-gmbh.com/ |
@mringwal FYI |
6d57f24
to
91ddc6b
Compare
Is pairing and bonding planned for this new stack? |
@dmazzella pairing and bonding is certainly planned for nimble, I can't see why it wouldn't also be implemented here too (eventually). I believe pairing already works, just bonding isn't set up yet. @dpgeorge FYI nimble is also Bluetooth SIG pre-certified. https://cwiki.apache.org/confluence/display/MYNEWT/RN-NimBLE-1.1.0
|
Oh, great, thanks for the info. Note that the controller seems to be qualified only for nRF52, but what we want is the host part. That looks to have an older QDID here: https://launchstudio.bluetooth.com/ListingDetails/59050 |
Often the QDID's are listed as To get some more QDID codes to use you can go here and search for https://launchstudio.bluetooth.com/ListingDetails/82155 from before covers off the layers
While this controller cert mentions nrf52 in the description I believe that doesn't matter for the certification, this should cover its use on any pre-certified radio hardware. Though the listing of PHY in this does give me pause, I think the This newer testing of the host looks quite relevant too,
Of note it says: I believe to get your end product certified you need to pay for your BT SIG membership, then download and run their certification application and follow its wizard. This will involve punching in any QDID's that cover off your radio, controller/low level layers and host stack and it'll tell you how much if any extra testing you need to do. |
Here's my quick summary (off-topic): There's a free Bluetooth SIG membership and a paid one ($8000 USD/year). With the free one, each declaration (QDID) costs $8000 USD, while it's $4000 with the paid (if you list more than 2 designs a year, the paid membership pays off). With such a declaration, you list a "Design", which usually consists of a Bluetooth Host Subsystem (aka the Bluetooth Host Stack) and a Bluetooth Controller. You can then add any number of actual devices to that QDID, as long as they use the same stack and Bluetooth Controller. If you can refer to already listed stacks / controllers, you can reference them without additional testing. You may also ask your local Bluetooth Qualification Consultant (BQC)... :) |
f58a34f
to
4b12c54
Compare
What would be needed to try this with the MP unix port e.g. with USB Bluetooth dongle? I can take care of the BTstack configuration, but it needs to link against libusb and the BTstack setup seems to be confined to the STM32 realm. (no hurry, just curious here). |
@mringwal I picked up a USB dongle this morning and tested it with the btstack examples (e.g. le_counter, gap_le_advertisements), so should be fairly easy to make this work in the Unix port. Will update soon. Thanks for the really quick turnaround on bluekitchen/btstack#272 ! |
@jimmo excellent. for usb, the default config is to find a suitable usb bluetooth dongle and use it for. For other, e.g. UART bluetooth modules, more config would be needed. I guess the config could be done via optional parameters or additional python method calls. (but this really can wait, usb is the dominant use case on desktops) |
The bluetooth stack has its own dedicated polling function, see mod_bluetooth_nimble_poll_wrapper().
Move extmod/modbluetooth_nimble.* to extmod/nimble. And move common Makefile lines to extmod/nimble/nimble.mk (which was previously only used by stm32). This allows (upcoming) btstack to follow a similar structure. Work done in collaboration with Jim Mussared aka @jimmo.
f8299fa
to
c68d43b
Compare
This makes a cleaner separation between the: driver, HCI UART and BT stack. Also updated the naming to be more consistent (mp_bluetooth_hci_*). Work done in collaboration with Jim Mussared aka @jimmo.
For use by other stacks, if they need it. Work done in collaboration with Jim Mussared aka @jimmo.
Work done in collaboration with Jim Mussared aka @jimmo.
Work done in collaboration with Jim Mussared aka @jimmo.
Work done in collaboration with Jim Mussared aka @jimmo.
Work done in collaboration with Jim Mussared aka @jimmo.
Work done in collaboration with Jim Mussared aka @jimmo.
c68d43b
to
ecee6f2
Compare
This adds support for BTstack as a bluetooth stack. From the user's point of view, use of the
ubluetooth
module should be transparent and not depend on the stack being used.Work done in collaboration with @jimmo.