FiPy OTAA join not working

  • Hi,
    I have the following code running on two LoPy boards without any problem

    from network import LoRa
    import socket
    import time
    import ubinascii
    lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.US915, adr=False, public=True)
    for channel in range(0, 72):
    for channel in range(0, 8):
        lora.add_channel(channel, frequency=902300000 + channel*200000, dr_min=0, dr_max=3)
    app_eui = ubinascii.unhexlify('ADA4DAE3AC12676B')
    app_key = ubinascii.unhexlify('11B0282A189B75B0B4D2D8C7FA38548B')
    lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0)
    while not lora.has_joined():
        print('Not yet joined...')
    s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
    s.setsockopt(socket.SOL_LORA, socket.SO_DR, 2)
    s.setsockopt(socket.SOL_LORA, socket.SO_CONFIRMED, True)
    while True:
        s.send(bytes([0x01, 0x02, 0x03]))

    I recently got two FiPy boards but, when I try to run the exact same code, they are unable to join to the network because they get stuck in

    while not lora.has_joined():
        print('Not yet joined...')

    I'm using LoRa Server as network server, so I checked the application logs and the join request messages don't even appear. Does anyone know what could be happening?

    Thanks in advance.

  • @rskoniec

    • By "same setup" I mean same firmware as the LoPy boards (1.18.1.r1), same code running on the boards, same gateway (Multitech Conduit), same network server (LoRa Server) and they are registered to the same application with the same configuration.
    • The FiPy are connected to Expansion Boards 3.0, but they don't have anything connected to its pins.

  • @ftorres

    • What do you mean by same setup - same f/w, same hardware setup (connected devices)?
    • Do you have something connected to the FiPy (especially to pins P5, P6, P7 - these are used by LoRa/Sigfox radio). Details in FiPy Pinout Diagram

  • @thinginnovations Yes, I am (it is a Multitech Conduit). As I said in the first post, I'm using two LoPy boards with the same code and setup and they are working fine, but when I try it with the FiPy boards I can't make it work, so I'm clueless.

  • Are you within range of a gateway?

Log in to reply

Pycom on Twitter