Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    OSError: [Errno 11] EAGAIN

    Scheduled Pinned Locked Moved LoPy
    lopy oserror
    2 Posts 2 Posters 2.7k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wstallwood
      last edited by

      Hi

      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.

      1 Reply Last reply Reply Quote 0
      • sebS Offline
        seb
        last edited by

        @wstallwood said in OSError: [Errno 11] EAGAIN:

        https://forum.pycom.io/topic/502/socket-send-msg-timeout

        Hi,

        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[0] == 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:
        https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlora.c#L2082

        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 LORA_STATUS_ERROR.

        1 Reply Last reply Reply Quote 1

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom