[STM32] Observing malformed Advertisement Reports on STM32WB55

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
kt-work
Posts: 3
Joined: Tue Feb 23, 2021 1:55 pm

[STM32] Observing malformed Advertisement Reports on STM32WB55

Post by kt-work » Thu May 12, 2022 9:08 am

Hi,

I have been observing erroneous data when receiving BLE Advertisements with our micropython setup. Our data shows RSSI and general data errors at an interval of ~5h. Now I looked a bit closer and found that LE Advertisement reports have fairly frequently wrong RSSI data.

If I print the data passed to ble_hs_hci_evt_le_adv_rpt() I get:
LeAdvRpt: 020100004312b5d1d8ea1d0201061916f7fd011219cae292db59043e1f020100012792f34bfb591302

The associated data entering through mp_bluetooth_nimble_hci_uart_process() looks almost identical:
> 04
> 3e
> 29
> 02
> 01
> 00
> 00
> 43
> 12
> b5
> d1
> d8
> ea
> 1d
> 02
> 01
> 06
> 19
> 16
> f7
> fd
> 01
> 12
> 19
> ca
> e2
> 92
> db
> 59
> 04
> 3e
> 1f
> 02
> 01
> 00
> 01
> 27
> 92
> f3
> 4b
> fb
> 59
> 13
> 02

I run this on our proprietary hardware using a STM32WB55VGQ6. Our Wireless FW version is the HCI variant of 1.11.1.0.1. The micropython version is 1.18 .

First I would like to know whether our wireless FW is the correct version, and whether you have seen similar issues and maybe how to fix them. I hope you can help.

Best Regards,

Kilian

kt-work
Posts: 3
Joined: Tue Feb 23, 2021 1:55 pm

Re: [STM32] Observing malformed Advertisement Reports on STM32WB55

Post by kt-work » Thu May 12, 2022 11:04 am

Adding to my previous post I found that the hci/ipcc interface yields apparently correct HCI data when I added HCI_TRACE 1 and Debug_printf to rfcore.c. The data that arrives in the Nimble BLE stack however contains parts of two advertisement reports. I marked them bold and italic.



[ 875062] <HCI_EVT(04:3e:1f:02:01:04:00:30:f5:0a:f4:d9:7c:13:0b:09:49:44:31:5f:42:43:30:45:41:41:06:ff:9a:08:01:80:6b:a8)
[ 875074] <HCI_EVT(04:3e:27:02:01:00:00:26:36:e2:42:4b:e6:1b:02:01:06:06:ff:57:07:a2:2c:01:10:09:50:20:50:52:4f:58:49:52:20:30:30:30:30:31:34:c0)
[ 875088] <HCI_EVT(04:3e:13:02:01:04:00:26:36:e2:42:4b:e6:07:06:ff:57:07:f2:bd:0b:c0)
[ 875097] <HCI_EVT(04:3e:2b:02:01:03:01:48:50:15:01:87:3a:1f:1e:ff:06:00:01:09:20:02:bd:6b:03:94:fb:24:a3:2d:96:cf:49:19:47:61:95:d2:15:9a:8a:77:e3:24:af:af)
[ 875112] <HCI_EVT(04:3e:2b:02:01:03:01:4b:b9:04:01:13:33:1f:1e:ff:06:00:01:09:20:02:af:49:64:f6:f6:fb:60:83:36:90:b9:bb:1e:db:c4:75:66:42:44:4d:42:27:21:b4)
[ 875127] <HCI_EVT(04:3e:2b:02:01:03:01:8b:9c:a8:1c:03:54:1f:1e:ff:06:00:01:09:20:02:56:40:47:3d:8d:ca:82:95:12:54:75:a4:55:66:cf:ef:65:48:97:6a:bf:08:24:ad)
[ 875143] <HCI_EVT(04:3e:2a:02:01:00:01:0a:c6:b1:a1:bd:74:1e:02:01:1a:1a:ff:4c:00:0c:0e:00:2c:6e:7f:04:67:1d:bc:64:b3:ae:63:93:18:10:05:45:1c:fe:33:f6:9e)
[ 875158] <HCI_EVT(04:3e:24:02:01:00:00:db:68:4c:93:7a:18:18:02:01:06:03:02:1d:18:03:19:80:0c:07:1b:db:68:4c:93:7a:18:04:16:1d:18:01:bf)
[ 875171] <HCI_EVT(04:3e:13:02:01:04:00:db:68:4c:93:7a:18:07:06:09:42:46:36:30:30:bf)
[ 875180] <HCI_EVT(04:3e:2b:02:01:03:01:4b:b9:04:01:13:33:1f:1e:ff:06:00:01:09:20:02:af:49:64:f6:f6:fb:60:83:36:90:b9:bb:1e:db:c4:75:66:42:44:4d:42:27:21:b4)
[ 875195] <HCI_EVT(04:3e:2b:02:01:03:01:48:50:15:01:87:3a:1f:1e:ff:06:00:01:09:20:02:bd:6b:03:94:fb:24:a3:2d:96:cf:49:19:47:61:95:d2:15:9a:8a:77:e3:24:af:af)
LeAdrfcore: IPCC_C1_RX_IRQHandler
vRpt: 020103018b9ca81c03541f1eff0600010920025640473d8dca8295043e1f0201040030f50af4d97c130b09
LeAdvRpt: 020100002636e2424be61b02010606ff5707a22c011009502050524f58495220303030303134c0
LeAdvRpt: 020104002636e2424be60706ff5707f2bd0bc0


I started an issue on github: https://github.com/micropython/micropython/issues/8663

Post Reply