Home/Support/Support Forum/Receive Simple Descriptor Request during network join in MicroPython?

Receive Simple Descriptor Request during network join in MicroPython?

0 votes
When using in API mode (e.g. AP=1 or 2 and AO=3 or 7) I can receive and handle Simple Descriptor Requests during network join on the UART to e.g. offer some ZCL cluster ids to the coordinator.

Is there any way to also do this in MicroPython? xbee.receive() seems to not return any of these frames. From Zigbee sniffing, the initial handshake then seems to be handled completely by the XBee module itself and the first thing I get from xbee.receive() is a Node Descriptor Reponse from the coordinator that has apparently been requested by the XBee module...

Module used is an XB3-24.

Thanks,
Felix
asked Aug 6 in MicroPython by felixstorm New to the Community (2 points)
edited Oct 22 by felixstorm

Please log in or register to answer this question.

4 Answers

0 votes
I'm wondering about the complexity of implementing enough of the ZDO/ZDP and ZCL protocols from MicroPython for this to work reliably. If you want to use ZCL clusters, maybe it makes sense to have the XBee handle the Zigbee protocol layer and provide access to data you store in a dict from MicroPython?

If this is for a product (versus just experimentation or a one-off) you should contact Digi sales with a feature request of what your requirements are.
answered Aug 7 by TomCollins Veteran of the Digi Community (1,453 points)
0 votes
I agree about the complexity issue, although I think that MicroPython should be ok with handling some standard stuff (basically only "read attributes" for 1 or 2 ZCL clusters).

I am generally open to any kind of solution, but for an XBee to be recognized at all in today's Zigbee environments, I would at least need to be able to support the "Basic" cluster so that a gateway is able to read the "ManufacturerName" and "ModelIdentifier" attributes from it.

@TomCollins - How would could I connect the XBee to my MicroPython dict in a way that is not Digi proprietary?

Thanks,
Felix
answered Aug 7 by felixstorm New to the Community (2 points)
0 votes
Have you gotten anywhere with this? I am trying to do something similar to comply with the Zigbee Home Automation specification. I don't receive the requests for endpoints or descriptors. I have been working off some code that was meant to run externally but I can't get the same functionality through the microPython interfaces.
Thanks,
Brian
answered Oct 14 by Brian Haupt New to the Community (1 point)
0 votes
@Brian - unfortunately not. I basically dropped the XBee3 for the project and utilized a different ZigBee chip using C++.

Kind regards,
Felix
answered Oct 14 by felixstorm New to the Community (2 points)
@Felix
I'm sorry to hear that as the XBee3 seems like the perfect fit for what I'm trying to do.... do you mind if I ask what you switched to?  If you don't want to post it here feel free to send me a private message (assuming this forum supports that).

Thanks,
Brian
@Brian - I have not yet made a final decision, but I've taken a closer look at the NXP JN516x product line. Unfortunately there does not seem to exist any chip where you would find a lot of 3rd party examples publicly, but at least their own examples seem to be ok and there are one or two other places on the web with examples too (e.g. http://peeveeone.com/?tag=light-link). Also, it's easy to integrate their own compiler toolchain with other IDEs - I've basically installed it in a VM and then copied the toolchain and the SDK to my dev machine and use them with VSCode.

But I am open for other solutions - do you by chance have other suggestions? Ideally I would be looking for something (at least partly) open source usable with Arduino libraries, but I could not find anything close.

XBee3 in MicroPython would have really been a good fit, but without being able to implement at least some custom clusters to get HA support it's of no help. Quite a pity that there seems to be only a minor quirk to their MicroPython libraries missing to be able to use the XBee3 for such an enormous amount of new applications...

Felix
@Felix,  I am working with Digi support right now.  I am trying to achieve connection on a home automation network.  Are you trying for ZLL or ZLO?  
Searching for other alternatives last night I found an interesting module from Microchip.  They talk about ZLO among other profiles.  I think you can find them if you search for "Microchip Zigbee".  I am not sure if it still requires an external micro-controller or not.
I will let you know what comes out of the support group as I think this is still the right hardware platform for what I am trying to achieve.
Brian
@Brian, thanks for your reply. I just noticed that I actually put the wrong request description in the post and edited it just now - I need to receive (and be able to answer) the "Simple Descriptor Request".

I am primarily targeting ZigBee HA (or ZLL), but would need to also handle a few ZDO requests to be able to offer profile and device ids and some ZCL clusters to a standard coordinator.

Have you been able to get any further with Digi support on this? I also still think that an XBee3 would be the right hardware platform, but if the firmware prevents using it this way then it's just no going to work ;-)

Thanks,
Felix
@Felix.  That is exactly what I am trying to do.  It has been submitted to the engineers at this point but no promise of when it might make it on the to do list.  I was told they work in two week sprints but don't know when this issue will make it into a sprint.  They suggested I start with an external processor at this point using the XBee3 in API mode.... sad thing is that I would probably never migrate back to micropython at that point.  Kind of defeats the purpose of having micropython in the product.  Now I have to go find an arduino library or write one myself.... was looking forward to learning micropython.  I suppose I could use a pyboard for easier future porting back to XBee3.
If you want to email me directly you can... address is my name with dots and the middle initial 'G' in the form first.g.last at gmail.com (replace first and last from my username....I don't like typing out my email address in forums for the bots to find).  I'd still be interested in hearing more about the direction you are going.
@Brian - thanks for keeping up on this with Digi. Please let me know if you get any further feedback from them. You can also contact me directly at firstname.lastname (take my username here and insert the dot) at gmx.de

And your thoughts about an external processor are pretty similar to mine - I had even been looking around for an XBee library for MicroPython, but then dumped the idea again since everything I found was targeted at regular Python and porting it to MicroPython seemed like too big of a challenge for a first MicroPython project ;-)
...