2022-01-27 02:36 AM
2022-01-27 06:29 AM
Hi @MMate.3 ,
If you want to use BlueNGR-2 (DTM) and zephyr :
At first, I confirm BlueNRG-2 (flashed with DTM) is not supported by default with zephyr but for sure fully compliant.
By default this zephyr file is designed to support BlueNRG-MS network behavior but overall behavior is similar to BlueNRG-2 flashed with DTM.
This, BlueNRg-MS is not build in LL_ONLY mode and can not be reflashed. This implies two steps in zephyr bluetooth spi project that are no more needed whiel adressing BlueNRG-2 DTM (LL_ONLY) :
Those two upper steps are no more needed with BleuNRG-2 is you rebuilt your DTM image in LL_ONLY mode and could be cleaned from zephyr spi driver.
About SPI protocol with BleuNRG-2 DTM , no big changes vs BlueNRg-MS ( see file attached extracted from BlueNRg-2 SDK documentation)
Regards,
Sebastien
2022-01-27 07:02 AM
Hi Sebastien,
thanks for the confirmation that Zephyr is compliant with bnrg2/dtm.
My BlueNRG-2 is flashed with DTM fw I build (prebuild fw binaries did not work for me)
So only "big" difference is that I am using UART while BlueNRG-MS is using SPI (probably to simplify things as its fw cannot be changed as it is case of BlueNRG-2).
The problem which persist is that GATT services are added and handled using the VS ACI calls contrary to HCI standard. And switch to LL mode did not make much differences for me.
To summarize it, so far I am able to:
One thing I've noticed is the handler values for basic GAP, GATT services (0x1 .. 0xb) are not properly initialized in the Zephyr/BLE srtack, but that is probably because these declarations are static and stored on the host flash).
Hoping that I will be able to solve this and thing I am very close to the solution, but still missing some important pieces.
Regards,
M.
2022-02-01 09:02 AM
Can you please share Zephyr project configuration?
Usually it is called prj.conf and it is placed in the Zephyr application folder.
2022-02-18 04:37 AM
Hi Sebastien,
I can confirm that enabling LL_MODE via VS command, or build the DTM with LL_ONLY solved the issue with connecting the BlueNRG2 to Zephyr BLE stack.
There was a bug in my hci_uart driver which in case of ACL packages read from the uart fifo directly instead of ring buffer serviced in the ISR.
I will pull request the driver into a main Zephyr tree. Meantime I can provide the files in case if anyone will be interested.
Thanks for your help and support.
M
2022-02-21 01:54 AM
Hi @MMate.3 ,
Thanks for this feedback and your support to Zephyr community !
Indeed, "package read" management is slightly different with UART vs SPI implementation usually used.
There is no BLE functional differences between DTM-SPI and DTM_UART : same HCI commands set. All you can do with SPI is possible over UART.
The big difference between DTM UART and DTM SPI is the power management. Using DTM SPI, BlueNRG-2 will enter automatically sleep mode. The SPI_CS line is used to wake-up BlueNRG-2. And SPI_IRQ line is raised up by BlueNRG-2 to inform host MCU there is some data to be read on BlueNRG-2 side by host MCU.
Using DTM_UART, BlueNRg-2 cortex-M0 core is always active.
Regards,
Sebastien.
2023-04-04 05:44 AM
Hi,
I am trying to configure a simple sample/periodic_adv in my steval_stwinkt1 board with Zephyr SDK.
I compiled correctly, but the application raise an error with the rx_thread,
I attach the image with the error.
Could you help me?
I configured the steval_stwinkt1.dts by myself, and I can run other applications, like hts2221 temperature and humidity sensor application.
Here the error that I mentioned before.
Thanks! :grinning_face: