Ok so I have a python program that has a callback function that runs when the coordinator receives data from my MicroPython upload on the router device. The PS is enabled on the router device (autorun flashed firmware upon start-up).
I’m using an imported transmit micropython example through my Pycharm plugin.
So when I run my python program and then run the micropython program, the message from the micropython on the router module successfully sends a message to the coordinator, as confirmed by printing out the message on my python program’s Run window. So that is good!
I see this in my REPL with the first successful upload/run of the flashed firmware program:
soft reboot
Loading /flash/main.mpy…
Running bytecode…
Sending data to COORD
Data sent successfully
MicroPython v1.11-1443-g5fad4cf on 2020-04-16; XBee3 Zigbee with EFR32MG
Type “help()” for more information.
>>>
the problem is that once I do this… and then press the reset button on my flash uploaded router module, instead of a successful auto-run-upon-start-up transmission I get this in my REPL:
>>>
Loading /flash/main.mpy…
Running bytecode…
Traceback (most recent call last):
File “/flash/main.py”, line 48, in
File “/flash/main.py”, line 41, in find_device
OSError: [Errno 7107] ENOTCONN
MicroPython v1.11-1443-g5fad4cf on 2020-04-16; XBee3 Zigbee with EFR32MG
Type “help()” for more information.
>>>
I was hoping to instead witness a successful “micropython autoruns on start-up” type of scenario… even when I unplug the device and plug it back in it doesn’t seem to auto-run the program.
Again, the first micropython upload/run was successful. But after that when I unplug and plug back in I don’t get another successful transmission, thereby failing to autorun upon start-up.
What am I not understanding here?
thanks!