• I'm new at LoRa and it's specifications so I am in need if some help.
    I joined the LoRa network from KPN and now I want to send data to it. I managed to send it once using the OTAA join example in the documentation, but now I keep getting ENETDOWN when trying to send without the join clause.

    This is my config.

    from network import LoRa
    import socket
    import time
    import ubinascii
    lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868)
    s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    s.setsockopt(socket.SOL_LORA, socket.SO_DR, 5)
    data = s.recv(64)

    Any ideas?

    Btw. Using lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0) and then has_joined is still returning false.

  • @hanselsen Unless you save the LoRa state, you can't send anything until you have successfully joined after a reset.

    When/how do you check has_joined? It can take a few seconds for the join to be successful, so you can't check right after the join call, you usually need to run a loop that checks and sleeps until joined.

    Beyond that, do you see the join on the network side?

Log in to reply

Pycom on Twitter