upvote
This looks very interesting. Thanks for sharing!
reply
> bus corruption when the radio was saturated

How do you even diagnose this?

reply
The initial approach was to run BLE and Wi-Fi simultaneously. Provisioning sometimes worked. It seems like there was some interference. Then switched to run BLE with Wi-FI off. When I got Wi-Fi credentials, switched BLE off, and turned Wi-Fi on. It still had some issues. Turned out when slowed down SPI bus, it started working. Only tested with Home Assistant and have to fork and patch rs-matter-embassy
reply
re: wifi/ble together

That sounds like the crate didn't have coexistence enabled or the defaults were really odd - so much boring stuff to write about BLE/WiFi Coex, but the short is "the default settings" are pretty good for low bandwidth IoT devices.

I'll peek at the code out of interest :)

reply
What OP says

> Turned out when slowed down SPI bus, it started working.

reeks of either RF interference issues or power rail issues. Power is not the strongest domain of anything RPi so that's where I'd look first.

reply
Use a digital storage scope, many of them can directly decode protocols like SPI . Then a lot of trial and error to figure out when exactly the issue happens and what else is happening around that time.
reply