TTN code for LoPy does not work on LoPy4



  • Hello,
    Moving from a LoPy to a LoPy4. My code connects to the things network in Europe (868 Mhz).
    I attached the antenna from my LoPy to the LoPy4 according to the specsheet: https://pycom.io/wp-content/uploads/2017/11/lopy4Specsheet17.pdf
    (its in a different place from the original LoPy).

    My code works fine on the LoPy, but not on the LoPy4; The device does not send a join message to the gateway.
    I can retrieve the device EUI, have added that to the TTN network, but no joy.
    Do i need to explicitly set the 868MHz radio in software? If so, how?



  • Hello,

    The problem with this particular device is that it was flashed with a LoPy firmware instead of a LoPy4 firmware.

    Cheers,
    Daniel



  • @robin *** SOLVED ***
    The particular LoPy4 i had was a dud. Tried another and it works fine.



  • @daniel
    the code i am using to join is:

    lora = LoRa(mode=LoRa.LORAWAN)
    app_eui = binascii.unhexlify('[my app eui]'.replace(' ', ''))
    app_key = binascii.unhexlify('[my app key]'.replace(' ', ''))
    lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=0, dr=1)
    while not lora.has_joined():

    time.sleep(2.0)
    print('not joined yet')



  • @Robin the connectors are OK and the frequency for NL is set to 868. I’ll continue testing. Don’t worry, you haven’t fried the radio chip.



  • @daniel On the LoPy i can see uplinks appearing on the network. But the LoPy4 does not seem to send them on 868Mhz. Same gateway, same network, same application key, same code. And i have registered the new LoPy4 EUI on the network.

    We are in the Netherlands, so i expected the frequency to be set to 868MHz by default, but
    I'm worried that the frequency switch is set to 433MHz by default and that i have now fried the radio chip. Or that the antenna connectors shown on https://pycom.io/hardware/lopy4-specs/ are not correct?



  • @Robin the problem I see is that often the downlinks are not received, but the LoPy4 transmits fine. We'll continue investigating to solve it asap.



  • Hello Robin,

    We will check this today and get back to you ASAP.

    Cheers,
    Daniel


 

Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter