I have been using the XIAO MG24 as an NCP (Network Co Processor) with Zigbee2MQTT (on Windows) to test various Zigbee devices, created with Arduino and the XIAO ESP32-C6, as well as with (Silicon Labs) Simplicity Studio 5 to test Zigbee devices for the XIAO MG24.
If there are interested parties, I will outline the steps to set up a suitable Zigbee NCP (Network Co Processor) for the XIAO MG24 for use with Zigbee2MQTT.
Edit> Just a quick additional note I forgot to mention. There is NO NEED for any soldering of wires and use of (SWD) programming adapters. Everything is done via the USB interface.
I will also add a simple test application for the XIAO MG24 to join the Zigbee2MQTT “Coordinator” and interact with the “dashboard”.
2 Likes
Hello @grobasoz,
I am developing a simple magnetic event Thing that will send a reed switch state message over an existing Zigbee network [Zig-a-zig-ah/Raspberry Pi/Zigbee2MQTT]. I have a working prototype for the XIAO-ESP32-C6, but it currently uses Wi-Fi. I’ve yet to connect the MG24 to the Wi-Fi, but would prefer to jump straight to Zigbee.
The “Getting Started” documentation for the C6 contains an example Zigbee sketch for the Arduino IDE, but there is no equivalent for the MG24.
In short, I’d be very interested in your “simple test application” for the MG24 if you are still willing to share.
Thanks in anticipation,
Rob.
Hi @Robertics - I have a simple test app in my github repository but you may need to do some slight changes to get it working on Macs or Linux as I’m using Windows most of the time (fastest toy).
Let me know if you have any issues getting things to work.
Unfortunately there isn’t Zigbee development for the 'MG24 using Arduino (yet?) so if you want to create your own application, you’ll need to use the Simplicity Studio development platform.
This can be quite daunting at first but I find it easier to use than the development tools from other vendors. If you decide to go ahead with that, I can help if you get stuck.
There’s a “bootcamp” for those starting with new development, and despite being a little “outdated” is a good starting point.
Happy coding 
Hello @grobasoz,
Thanks for your prompt reply and this most helpful information.
The method looks like it will do the job but it will take me a while to learn the tools and get up to speed. Baby steps required.
In the meantime, I will contact Silicon Labs to check if they have a date for a suitable update of the Arduino libraries. One never knows!
Thanks again. I’ll let you know how it goes.
Rob.
Hi Rob.
There is an open issue on the Silabs github repository for this and it has been up for 8 months now.
I did ask a while ago and they said that there were no plans for it. Wouldn’t hurt to ask again.
I think the issue would be the tight integration with the Studio component and code generation requirements.
Looking at how tricky it is to implement new Zigbee code for the ESP32’s (and non Arduino with other vendors ) I can’t see a suitable solution for Silabs.
They have done it for Matter however, so it may be possible?
Hi grobasoz, firslty thak you for your nice work on the XIAO MG24 module. I am trying to compile an NCP coordinator with simplicity but there is something weid in the radio behaviour. Not sure the default settings are ok. I have tested your versions (the one without antenna) and the one with UFL external antenna enabled. The first is running quite smoothly, the second one is behaving like mines. If you use ember-zli and scan the network you will get some ERROR on some channels randomly. Might it be the antenna not working properly? Have you used PB5 and PB4? Help would be appreciated
Thank you and welcome 
Unfortunately I can’t get ember-zli to run with the NCP I created for the MG24 as it (ember-zli) doesn’t support that NCP version (16).
I did create an older version of NCP for testing and used the same settings as with the repository and the results are below.
These are my default settings for Zigbee2MQTT.
With a route table of 32 as well.
Here are some more scans, with my (own custom) MG21 and with a SparkFun Thing Plus Matter (MG24).
Hi thank you, indeed it was the external antenna hardware faulty. So now it is working. However in the seed XIAO MG24 I had to power the antenna switch by setting PB5 high and then PB4 will select the antenna: 0 = internal 1= external. Working fine with Z2M but the LQI is not so high, investigating.
Hi again, what are your UFL setting white seed? THKS in advance
This is the White Seeed Antenna I use.
The settings for UFL on the XIAO MG24 are (Outputs) PB05=1, PB04=1.
Hi Grobasoz, I made some progresses, project NCP in simplicity is done. PB04 and PB05 working fine - tested both internal and externa antenna. Also I have powerd the orange led at startup just to see the module alive. I have added the token manager so you can rewrite the zigbee address of the coordinator EUI64 using ember-zli. Then I was able to switch from my ITEAD Dongle-e to the MG24 without repairing all the devices. Unfortunately the average LQI is lower than the ITEAD one with al the devices around so I do think there should be a setting to be optimized for the radio module. Any idea? (Ihave order another antenna just in case…)
Great work 
I have generally steered clear of using EUI64 changes for NCP “transfer” as while it is a very useful option, there are potential security risks.
I prefer to have a “Coordinator” or “Commissioning Device” that can manage the transfer of devices from one network to another.
With regard to the LQI - I have noticed the XIAO MG24 has a lower LQI than other similar devices but that could have been for certification purposes.
I’ll check using my Spectrum Analyzer when I get some spare time (will have to create RF node tests for that).
Hi, do you mean that the shown LQI is lower (more realistic) than the actual one reported by other devices?
That has been my “observation” not backed up by actual lab testing and results.
You could do some checking of the CTune settings to see if improvements can be made, but I generally only resort to that with my custom boards.
The XIAO MG24 should already have the best setting in place.
@grobasoz Thank you for the explanation. Working fine so far, I will see if I can create a kind of benchmark setup using some end devices (do not have any RF instrument).