Re: Query regarding Bluetooth Controller Porting


Pankaj Singh <PANKAJ.SINGH@...>
 

Hi Carles,

Thanks for sharing the information. We are planning to use uart-H4 protocol and it’s a dual mode controller.

My understanding is that H4tl module on controller side will be interacting with Zephyr BT host over uart and hence there needs to be zephyr based hci driver needed in the controller as well. Please correct me if my understanding is wrong. The hci driver needs to register via bt_hci_driver_register(const struct bt_hci_driver *drv) to send/receive payload with zephyr bt host.
Zephyr Host -> custom controller payload flow :
bt_send() -> struct bt_hci_driver: h4_send() -> h4: net_buf_put() -> uart_tx_queue -> hci driver controller: struct bt_hci_driver drv: send() ->h4 custom controller for further processing.

Controller -> host payload flow :
H4 of custom controller -> hci driver controller: bt_buf_get_rx() -> bt_recv() -> bt_dev.rx_queue -> bt host: hci_rx_thread().

-thanks

-----Original Message-----
From: Cufi, Carles <Carles.Cufi@nordicsemi.no>
Sent: Wednesday, December 9, 2020 3:14 PM
To: kumar.gala@linaro.org; Pankaj Singh <PANKAJ.SINGH@onsemi.com>; devel@lists.zephyrproject.org
Cc: users@lists.zephyrproject.org
Subject: RE: [Zephyr-users] Query regarding Bluetooth Controller Porting

[External Email]: This email arrived from an external source - Please exercise caution when opening any attachments or clicking on links.

+ devel list

Pankaj,

If you are using a dual-chip solution, then as long as you controller complies with standard HCI there is no "porting" to do whatsoever.
In order to better understand what you need, can you let us know which transport do you plan on using (UART/H4, 3-wire/H3 or SPI) and whether it is a single-mode or dual-mode controller?

Unless your controllers has special requirements it should all be a matter of configuring the right Kconfig options and Devicetree nodes.

Carles

-----Original Message-----
From: users@lists.zephyrproject.org <users@lists.zephyrproject.org> On
Behalf Of Kumar Gala via lists.zephyrproject.org
Sent: 08 December 2020 15:08
To: Pankaj Singh <PANKAJ.SINGH@onsemi.com>
Cc: users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Query regarding Bluetooth Controller
Porting

You may want to ask this question on the devel list.
(devel@lists.zephyrproject.org)

- k

On Dec 8, 2020, at 12:02 AM, Pankaj Singh <PANKAJ.SINGH@onsemi.com>
wrote:

Hi,

We want to port our custom Bluetooth controller to run on Zephyr
RTOS
(not using the default zephyr ble controller support). I went through
the Bluetooth documentation
https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.p
rotection.outlook.com_-3Furl-3Dhttps-253A-252F-252Fdocs.zep&d=DwIGaQ&c
=MHZppzMdXMt3JYjCV71UsQ&r=D1ATefx54IThv9ORLOcugPTkb_DOEyRHRjojSRtEnrU&
m=ZO-WCaqOoEicxTN4fmmF7-u-hHTdbZr5jne77OIy4Jw&s=QnUBxuLAcWGdBjnd5kZF9a
QHR7Sye63KYcAkpY4B_NQ&e=
hyrproject.org%2Flatest%2Fguides%2Fbluetooth%2Findex.html&amp;data=04%
7C01
%7Ccarles.cufi%40nordicsemi.no%7Cc35438a7065845415d0708d89b82c771%7C28
e5af
a2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637430333288501659%7CUnknown%7CTW
FpbG
Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%
3D%7
C1000&amp;sdata=6J8jWeiNRxk3NPbnu1uQq0g01EaUG8wCYsQK58AFk6w%3D&amp;res
erve
d=0
,https://urldefense.proofpoint.com/v2/url?u=https-3A__eur03.safelinks.
protection.outlook.com_-3Furl-3Dhttps-253A-252F-252Fdocs.ze&d=DwIGaQ&c
=MHZppzMdXMt3JYjCV71UsQ&r=D1ATefx54IThv9ORLOcugPTkb_DOEyRHRjojSRtEnrU&
m=ZO-WCaqOoEicxTN4fmmF7-u-hHTdbZr5jne77OIy4Jw&s=8zzMc7KWKKqqJAICGpPLCZ
SdvQVNjcruY_9-MvJourM&e=
phyrproject.org%2Flatest%2Fguides%2Fbluetooth%2Fbluetooth-
arch.html&amp;data=04%7C01%7Ccarles.cufi%40nordicsemi.no%7Cc35438a7065
8454
15d0708d89b82c771%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C6374303
3328
8501659%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
JBTi
I6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=pzOa7iuR0SSOR59u4s5VE3LgNF5M
eoXR ku7XtLCnOWo%3D&amp;reserved=0. The link’s talks about Bluetooth
host in detail and it was helpful. We want to use Dual Chip
configuration mode (use Zephyr Bluetooth host + custom Bluetooth
controller support) .

From link it talks about various host only build configuration
o CONFIG_BT =y
o CONFIG_BT_HCI =y
o CONFIG_BT_CTLR =n


My query is in order to port custom controller what steps, build
configuration we need to take care of. If there is a link/document
that helps to describe porting of custom Bluetooth controller to
Zephyr it will be helpful.

-thanks



Join users@lists.zephyrproject.org to automatically receive all group messages.