Porting Host-only build with HCI SPI to another RTOS #stm32 #nrf52840 #hci #spi


Carles Cufi
 

If ST Micro uses custom HCI commands to create services then it means they are running both Host and Controller.

 

For a platform-neutral Host that can work with any standard HCI device (including Zephyr), check out nimBLE:

https://github.com/apache/mynewt-nimble

 

Carles

 

From: users@... <users@...> On Behalf Of valens.dsilva via lists.zephyrproject.org
Sent: 29 July 2022 01:10
To: users@...
Subject: Re: [Zephyr-users] Porting Host-only build with HCI SPI to another RTOS #stm32 #nrf52840 #hci #spi

 

Hi Carles,

I should be hitting Group Reply so the thread is captured. Apologies :)

Regarding the second question I think you are likely confusing layers. GATT services are in the Host, not in the Controller. So your 700 byte limit must be in the Host, which likely means that whatever IC you were connecting via SPI to was running both Host and Controller. 

it seems ST Micro (for their BlueNRG chipsets) uses custom HCI Vendor commands (ogf 0x3F) to create services so they are running a hybrid Host and Controller in their BlueNRG chipsets. Is there an open source BLE host that works with Zepher's HCI? 

Thanks


valens.dsilva@...
 

Hi Carles,

I should be hitting Group Reply so the thread is captured. Apologies :)

Regarding the second question I think you are likely confusing layers. GATT services are in the Host, not in the Controller. So your 700 byte limit must be in the Host, which likely means that whatever IC you were connecting via SPI to was running both Host and Controller. 
it seems ST Micro (for their BlueNRG chipsets) uses custom HCI Vendor commands (ogf 0x3F) to create services so they are running a hybrid Host and Controller in their BlueNRG chipsets. Is there an open source BLE host that works with Zepher's HCI? 

Thanks


Carles Cufi
 

Hi there,

 

I am unclear as to what you are asking exactly, but I’ll give it a go.

 

If your question is whether porting Zephyr code to another RTOS is easy, the answer is: generally it is not, because even if you get the basics running the devil is in the details and corner cases. I would certainly not recommend porting the Zephyr BLE Host or Controller to another RTOS, I’d recommend instead using a BLE stack designed for portability instead of tight coupling.

 

Regarding the second question I think you are likely confusing layers. GATT services are in the Host, not in the Controller. So your 700 byte limit must be in the Host, which likely means that whatever IC you were connecting via SPI to was running both Host and Controller. That is not a configuration that Zephyr supports natively, because it needs a custom RPC-like layer between the application and the host/controller IC.

 

Carles

 

From: <users@...> on behalf of "valens.dsilva via lists.zephyrproject.org" <valens.dsilva=revivalanalytics.com@...>
Reply-To: "valens.dsilva@..." <valens.dsilva@...>
Date: Tuesday, 26 July 2022 at 22:46
To: "users@..." <users@...>
Subject: [Zephyr-users] Porting Host-only build with HCI SPI to another RTOS #nrf52840 #hci #spi #stm32

 

Of the 3 layers running on the Host (App, BLE Host and HCI driver) in the dual chip configuration what is the difficulty in porting each layer over to Microsoft's ThreadX? My host micro will eventually be running Micrsoft's ThreadX RTOS (with CMSIS2 OS abstraction). 

My application is defined below:

My project is a host micro (STM32) and a nRF52840 (controller mode) to implement a peripheral. The configuration is the dual chip configuration.


My previous project was STM32 Host and BlueNRG-M0 (BLE controller over HCI SPI) but was abandoned due to the 700 byte size limit on Gatt services and characteristics.

I have gotten the hci_spi (controller build) running on the nRF52840. I am currently running the peripheral_hr sample on my host micro to test out if I can run all my services and characteristics with this solution.

Since ST provides a HCI SPI driver interface to their BLUENRG module could this be reused for the nRF52840? 

Thanks
Valens


valens.dsilva@...
 

Of the 3 layers running on the Host (App, BLE Host and HCI driver) in the dual chip configuration what is the difficulty in porting each layer over to Microsoft's ThreadX? My host micro will eventually be running Micrsoft's ThreadX RTOS (with CMSIS2 OS abstraction). 

My application is defined below:

My project is a host micro (STM32) and a nRF52840 (controller mode) to implement a peripheral. The configuration is the dual chip configuration.


My previous project was STM32 Host and BlueNRG-M0 (BLE controller over HCI SPI) but was abandoned due to the 700 byte size limit on Gatt services and characteristics.

I have gotten the hci_spi (controller build) running on the nRF52840. I am currently running the peripheral_hr sample on my host micro to test out if I can run all my services and characteristics with this solution.

Since ST provides a HCI SPI driver interface to their BLUENRG module could this be reused for the nRF52840? 

Thanks
Valens