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

    OS Error 113 when trying to get outside of LAN

    Scheduled Pinned Locked Moved MicroPython
    3 Posts 2 Posters 1.3k 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.
    • A Offline
      AgriKinetics
      last edited by

      Hi,

      I hope someone can help here with a possible reason for the LoPy (in WiFi STA mode) not being able to access the Internet.

      If I run this very simple bit of code from the Python IDLE it works no problem, but, the same code on all of our 5 LoPy's generates an error OSErr 113 on the 'connect'.

      import socket

      s = socket.socket()
      a = ('176.58.119.26',80)
      s.connect(a)

      We have set the DNS Server address which is now retained using the wlan.ifconfig() properly under 0.9.1.b1 firmware (although using getaddrinfo on micropython.org came back with an address of '6.0.0.0').

      As mentioned, if we try the code on a PC on the same LAN there is no problem at all with connections.

      1 Reply Last reply Reply Quote 0
      • D Offline
        daniel
        last edited by

        What happens if you don't set the dns address?

        1 Reply Last reply Reply Quote 1
        • A Offline
          AgriKinetics
          last edited by

          That works fine with DSN address set to '0.0.0.0' thank you @daniel

          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