OSError: [Errno 11] EAGAIN
wstallwood last edited by
Is there any reference to what OS Error numbers actually equate to ?
I am receiving an intermittent OSError: [Errno 11] EAGAIN during LoRaWAN send's but there is only a scattering of information in the forums and no concise answer to what these errors actually mean.
Daniel mentioned here https://forum.pycom.io/topic/502/socket-send-msg-timeout that it might be due to a Duty Cycle limitation but I wasn't aware there was any active duty cycle control on the lopy, if there is then that's good news but we need to be able to trap it not just crash out.
seb last edited by
in order to catch an error without crashing you can just wrap the call with:
try: s.send(data) except OSError as e: if e.args == 11: # EAGAIN error occurred, add your retry logic here
A list of what all the error numbers mean can be found in this file: https://github.com/pycom/pycom-micropython-sigfox/blob/5bed5e9a84bb1abfc4d59476f3f62b38920c5eda/py/mperrno.h
Onto why this error occurs, having a look at the lora source code you can find that this error is raised here:
This error is raised if send_lorawan returns zero, which can happen for two reasons, the message was added to the queue (which is what I believe you are refering to with the duty cycle limiting) or there was a