Navigation

    Welcome to the Pycom forum

    Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tags
    3. oserror
    Log in to post

    • C

      oserror: enoent, Try to use LORAWAN with OTAA method to send data to TTN server.
      FiPy • fipy lora lorawan oserror oserror enonet • • Chandan Verma  

      2
      0
      Votes
      2
      Posts
      17
      Views

      J

      @Chandan-Verma can you clarify which example you are using, which region you are in, and where exactly the error happens (the full log/trace would be useful)?
    • M

      OSError: [Errno 11] EAGAIN problems
      LoPy • lopy lopy4 oserror • • M m  

      8
      0
      Votes
      8
      Posts
      111
      Views

      G

      Hi, I compiled a firmware for you to use on a Lopy4 (here) to check the EAGAIN error cause. For a case without error, it will output the following: Pycom MicroPython 1.20.2.r4 [v1.20.1.r2-357-g6153b01d3-dirty] on 2021-01-18; LoPy4 with ESP32 Type "help()" for more information. >>> Running selected lines >>> >>> Not yet joined... Not yet joined... Not yet joined... Joined b'' [TASK_LoRa] CMD TX [LoRaMAC] returning status 0 > Pycom MicroPython 1.20.2.r4 [v1.20.1.r2-357-g6153b01d3-dirty] on 2021-01-18; LoPy4 with ESP32 Type "help()" for more information. >>> You should be able to use the script you already wrote, but if you want to use the example I used: from network import LoRa import socket import time import ubinascii # Initialise LoRa in LORAWAN mode. # Please pick the region that matches where you are using the device: # Asia = LoRa.AS923 # Australia = LoRa.AU915 # Europe = LoRa.EU868 # United States = LoRa.US915 lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868) # create an OTAA authentication parameters, change them to the provided credentials app_eui = ubinascii.unhexlify('') app_key = ubinascii.unhexlify('') #uncomment to use LoRaWAN application provided dev_eui dev_eui = ubinascii.unhexlify('') # join a network using OTAA (Over the Air Activation) #uncomment below to use LoRaWAN application provided dev_eui #lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0) lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0) # wait until the module has joined the network while not lora.has_joined(): time.sleep(2.5) print('Not yet joined...') print('Joined') # create a LoRa socket s = socket.socket(socket.AF_LORA, socket.SOCK_RAW) # set the LoRaWAN data rate s.setsockopt(socket.SOL_LORA, socket.SO_DR, 5) # make the socket blocking # (waits for the data to be sent and for the 2 receive windows to expire) s.setblocking(False) # send some data s.send(bytes([0x01, 0x02, 0x03])) # make the socket non-blocking # (because if there's no data received it will block forever...) s.setblocking(False) # get any data received (if any...) data = s.recv(64) print(data)
    • N

      Failure on urequests library OSError: no available NIC
      Issues & Bugs • oserror urequests urequest.py get requests • • nervencid  

      2
      0
      Votes
      2
      Posts
      106
      Views

      M

      Hi, Did you check whether your WiPy is connected to wifi? If WiPy is not connected to wifi, you can receive oserror. After being sure that your WiPy connected to wifi, please try your code. Best,
    • J

      How to Find Port Number to connect to WiFi Network using socket.connect(). OSError: [Errno 104] ECONNRESET
      MicroPython • pycom wipy3.0 socket wlan oserror • • jc_serg  

      2
      0
      Votes
      2
      Posts
      169
      Views

      robert-hh

      @jc_serg If you are looking for a ping.py script: there is one here: https://gist.github.com/91cc8979e33e82af6d99ec34c38195fb.git
    • K

      lte OSError
      GPy • gpy oserror • • kjm  

      1
      0
      Votes
      1
      Posts
      183
      Views

      No one has replied

    • G

      LoPy to LoPy over WIFI, socket Exception <class 'OSError'> -1
      LoPy • lopy lopy4 wifi oserror wifi send data • • goro  

      3
      0
      Votes
      3
      Posts
      283
      Views

      G

      Indeed we have the "socket.accept ()" method in the first LoPy, but the problem was in the pointing address to the other LoPy which was wrong. It's already solved, thank you!
    • J

      OSerror with rgbled
      Comments & Feedback • lopy pymakr oserror rgbled • • johnmcdnz  

      3
      0
      Votes
      3
      Posts
      512
      Views

      S

      import time time.sleep(2) import pycom pycom.heartbeat(False) print('main MAC1') print('LED test') print (0xffffff) pycom.rgbled(0x0) Try this code. This should run perfectly fine.
    • K

      OSError: -29312
      MicroPython • oserror urequests • • kjm  

      2
      0
      Votes
      2
      Posts
      250
      Views

      M

      Where did you get the urequests library from? You'll need to check the source code and search for that error code.
    • G

      <class 'OSError'> Avialable Interfaces are down
      LoPy • lopy lopy4 oserror interfaces • • goro  

      15
      0
      Votes
      15
      Posts
      1351
      Views

      M

      @johand After I've set IP for HTTP server wlan.ifconfig(id=1, config=('192.168.4.10', '255.255.255.0', '192.168.4.1', '192.168.4.1')) i've tried to read IP address of HTTP Server and that was the problem, it's keep returning me '0.0.0.0'. IP address was set properly to '192.168.4.10' but function returns '0.0.0.0'. print('Network config:', wlan.ifconfig()) Network config: ('0.0.0.0', '0.0.0.0', '0.0.0.0', '0.0.0.0') Thank you for your help. @pigamonte I've managed to do it with 1.18.2.
    • M

      OSError -80 in ussl?
      WiPy 2&3 • wipy oserror ussl • • Martinnn  

      2
      0
      Votes
      2
      Posts
      391
      Views

      M

      And one more: File "urequests.py", line 54, in request OSError: [Errno 9] EBADF which might be #define EBADF 9 /* Bad file number */ I have a gc.collect() after the upload, but no .close on the connection. Adding this now to see how things go. -- Martin
    • W

      Socket errors
      LoPy • wifi pycom oserror • • Wendfrey  

      1
      0
      Votes
      1
      Posts
      479
      Views

      No one has replied

    • S

      EMSGSIZE error
      LoPy • lopy lora lorawan error oserror • • SameerChouksey  

      2
      0
      Votes
      2
      Posts
      714
      Views

      J

      @sameerchouksey do you know if the network is sending MAC commands to the device? If so there could be acknowledgements to send back, which would reduce the max available packet size. Not sure if those ACKs have priority over the payload though.
    • J

      HTTP Post with urequests OSError: -1
      Comments & Feedback • oserror http post json urequest.py • • jimpower  

      8
      0
      Votes
      8
      Posts
      2472
      Views

      J

      @livius Thanks for your help, the gc.collect() has worked and the loop has remained stable for a few hours now.
    • S

      MQTT: OSError: -1 from line 160, in wait_msg
      WiPy 2&3 • wipy mqtt oserror • • semireg  

      2
      1
      Votes
      2
      Posts
      1096
      Views

      D

      @semireg We'll have a look to see if there's a bug in the socket implementation.
    • J

      List of OSErrors
      MicroPython • wipy micropython oserror • • JonahT  

      3
      0
      Votes
      3
      Posts
      1272
      Views

      T

      See my answer regarding oserror from tls in the post: https://forum.pycom.io/topic/2164/lopy-http-post-request-oserror/9
    • D

      LoPy HTTP POST request: OSError!
      LoPy • lopy oserror ssl http post urequest.py • • Devang Sharma  

      11
      0
      Votes
      11
      Posts
      2963
      Views

      V

      Same problem happened to me. @ahmedkalnaggar solution solved, memory is not being freed properly.
    • A

      urequests with ussl causes an OSError
      MicroPython • oserror urequests post • • ahmedkalnaggar  

      6
      1
      Votes
      6
      Posts
      2290
      Views

      D

      @this-wiederkehr You've got the point. I've tried this and finally, it works without any error. Thanks a lot.
    • 1 / 1