Hardware: xbee3 and grove PCB from Xbee Zigbee Mesh Kit, 802.15.4 FW with latest FW 2012.
Set-up: Simple uPy test code flashed into a radio end node and radio coordinator. End node test code just infinite loop using transmit() in a try-except sending some dummy data every 100ms. I am not doing any handling of errors in except, just a dummy variable assignment so an error doesn’t lock-up the uPY code. Coordinator in transparent mode with dummy variable assignment in infinite loop to keep radio running. Radios within a few feet on test bench, antennas attached, stable power supply for grove PCBs.
Settings: CH fixed (no A1,A2 auto channel), fixed ID, CA=0, CE set accordingly, A1=4 and A2=4 for auto association, sleep modes off, DH/DL and MY set properly. Coordinator always set as AP=0 and tried AP=0,1,2,4 on end nodes. Also ACKs enabled or disabled. In short no problem getting network up and running.
Problem: Data flows as expected from end node to coordinator but after 30 minutes to an hour (approximately) the data flow stops. The 30 minute mark is by far the most common. Repeated this test from power-up many times and is reproduceable. Press reset button on grove end node and up and running again and problem repeats and here the coordinator is never resetted ie button nor power-down.
Questions: In this overall set-up, is it expected to run longer than I’m experiencing before a glitch or since RF’ing is not perfect this is fairly normal? I understand I’ll need to handle errors in the except to keep things running many hours. Just looking to get settings in the best condition to reduce try-except errors due to “bad settings”. Any ideas on initial radio settings to test out? Playing with AP and ACKs and collision related settings seem to not change the outcome.
Is there something running in the FW (or uPY) that does “things” periodically on the many minutes time frame as a possible cause?
When AP is in one of the modes (0,1,2,4) does transmit() function in and of itself change the “frame” accordingly meaning say in AP=1 not escape frame is used but in AP=2 the escape framing is used.
Side question: When using autochannel in A1 and A2, as the network runs does the FW periodically change channels (say rescans periodically to stay on a “good” channel) or is it that once association/discovery is completed and autochannel selected the operating channel that all radios will remain on that channel.
Thank you a whole bunch as once figure this problem out my real project is ready to go. This is the only problem left. (yes real project problem identical and I narrowed it down to the test code here)