Closed gandm closed 7 years ago
This is a zip file that contains a small app that recreates the issue (well it does for me!) as well as my modified firmware image. You'll need to modify the ssid and password to join a wlan in the appropriate file.
The root cause seems to be that the alarm timer fires at the anticipated interval and then slightly delayed (probably due to the wlan.scan()
) followed by a burst of LoRa sends many times in a second, which causes the EAGAIN error over and over until it settles.
Please include the following information when submitting a bug report:
LoPy + PyCom expansion board
(sysname='LoPy', nodename='LoPy', release='1.7.3.b1', version='1e46e72-dirty on 2017-06-18', machine='LoPy with ESP32', lorawan='1.0.0') plus some small printf mods below
Exact steps to cause this issue
importing this class and running the classes
start()
method runs a timer every 5 seconds that invokes_sendData()
Also using a modified version of the sigfox repo
modlora.c
code below to give some additional information via printf's. No other changes made.Should send an incrementing Ping number every 5 seconds. It works mostly by occasionally gets a number of EAGAIN errors which fire repeatedly and very rapidly until the system becomes stable and starts ping again.
Questions:
Why does my timer fire more rapidly than 5 seconds that causes Queue full? Why is the queue full? I only issue a single send but the modlora code keeps firing. Also, why does my try: except: clause keep firing?
OSError [Errno 11] EAGAIN, time=
messages are emitted by my python except clause.The issue seems to be worse if I run a wlan.scan() on another timer every 30 seconds.