Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

FiPy does not receive JoinAccept #594

Open
serafinebot-wdna opened this issue May 10, 2022 · 0 comments
Open

FiPy does not receive JoinAccept #594

serafinebot-wdna opened this issue May 10, 2022 · 0 comments

Comments

@serafinebot-wdna
Copy link

General Information

Pycom version

(sysname='FiPy', nodename='FiPy', release='1.20.2.r6', version='v1.11-c5a0a97 on 2021-10-28', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1', pybytes='1.7.1')

ChirpStack Information

  • OS: Debian 10 (x86_64)
  • ChirpStack Gateway Bridge Version: 3.13.3
  • ChirpStack Network Server Version: 3.16.1
  • ChirpStack Application Server Version: 3.17.6

LoRa configuration: EU868 (server & end device)

The code

import time
import pycom
import binascii

from network import LoRa

if __name__ == "__main__":
    pycom.heartbeat(False)
    pycom.rgbled(0x7f0000)

    lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868, device_class=LoRa.CLASS_A, public=1, adr=0, tx_retries=0)
    dev_eui = binascii.unhexlify('0000000000000000')
    app_eui = binascii.unhexlify('0000000000000000')
    app_key = binascii.unhexlify('00000000000000000000000000000000')

    lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=0)

    while not lora.has_joined():
        pycom.rgbled(0x7f7f00)
        time.sleep(5)
        print("joining...")

    print("joined")
    pycom.rgbled(0x007f00)

The problem

The end device is stuck an infinite join procedure loop.

image

During the join procedure, the JoinRequest and JoinAccept are displayed in the device LoRaWAN Frames log section in ChirpStack, so the issue does not reside in the LoRa server not authenticating the device properly. The most likely scenario is the JoinAccept not being properly sent to the device, due to an unexpected frequency, DR, bandwidth, etc. by the device.

We have not had any related problems with other devices (e.g. CubeCell HTCC-AB01 @ EU868) therefor there might be some sort of misconfiguration/issue with the device's code. Also, we have tried different LoRaWAN code samples by the Pycom community, all seemingly working with EU868 out of the box, with no luck.

Next steps

  • Track the LoRa traffic from a gateway to further debug the issue (awaiting for a test gateway).
  • Is there a way to debug this sort of behavior on the end device?

Thank you.

@serafinebot-wdna serafinebot-wdna changed the title FiPy missing FiPy does not receive JoinAccept May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant