TTN OTAA join acknowledgement not being received ?



  • Re: TTN join accept not handled properly

    I am a bit confused on the current status of the LoPy with TTN. I have just upgraded to latest firmware:

    ((sysname='LoPy', nodename='LoPy', release='1.6.13.b1', version='v1.8.6-607-g9c8a0e9e on 2017-05-01', machine='LoPy with ESP32', lorawan='1.0.0'))

    When I try to do an OTAA join to TTN inside a "while not lora.has_joined():" loop the value of the "has_joined" property remains 0.

    However when logging on to the TTN Console I can see the device status light up in GREEN ("connected") and looking at the data received by the TTN backend I am gettting activation messages.

    Has anybody been able to get OTAA joins acknowledged by the LoPy ? I can see several forum messages dating back a few months with similar issues.



  • @seb Yes, it's in the EU, 868 Region. Using ABP, I can connect, send messages from the node (FiPy) to the gateway (LoPy), they are reported on the TTN cosole, and they arrive in the test target, but downlink messages travel only to the gateway (LoPy), are sent out by the getaeway, but almost never the node confirms reception. This may block OTAA.



  • @robert-hh

    Are you using the gateway in a 868MHz region? The latest firmware changed the way lora is initialised allowing region to be set programmatically, but it defaults to 868MHz for all devices where as before the default was set by the firmware updater.



  • @jmarcelino Hello Jose. After having that stuff laying around for a few moths, I gave it, and configured a LoPy as Gateway and the FiPy as device, using the code from the lib examples. I have them both registered as gateway/device. The gateway is active in the TTN console, and sometimes it receives messages from other nodes too. I have to give it a good outdoor antenna, but for now I placed it at a high located window.
    But .. I manage only once to join it with the device. If I try, I get only the follwowing message at the gateway log over & over:

    [  2497.562] Received packet: {"rxpk": [{"data": "AAyjANB+1bNw6HQt/v+krjD3H4K/Ll8=", "time": "2018-02-18T07:36:36.622334Z", "chan": 0, "tmst": 2485197425, "stat": 1, "modu": "LORA", "lsnr": 7.0, "rssi": -53, "rfch": 0, "codr": "4/5", "freq": 868.1, "datr": "SF7BW125", "size": 23}]}
    [  2497.604] Push ack
    [  2501.616] Pull rsp
    [  2502.584] Sent downlink packet scheduled on 2490.197, at 868.099 Mhz using SF7BW125: b' g\xe5\xf8\xf3\x83\xe7\ne%\x9a\xedc\xe4\xb5?\x10~.}\xccr}\xcc8\x0c\x9b\x1b\xf4.\x90\xa7\x13'
    [  2509.208] Pull ack
    

    The device is visible in the TTN console. Each time the above message pair is exchanged, the console timer is reset to 0. Do you have any clue what's missing?
    in this waiting for join loop, lora.stats() only return:

    (rx_timestamp=0, rssi=0, snr=0.0, sfrx=0, sftx=0, tx_trials=0)
    

    I had tested that pair before with the simple device-to-device ping-pong trial, and they worked.

    Firmware 1.16.0.b1, homebrew

    Edit: ABP works sometimes. If I send downlink messages from the TTN console, they arrive at the gateway and are sent to the node, but the node never shows, that it received a message.



  • I ended up documenting the steps I had to take to get the LoPy to successfully connect over OTAA (and subsequently send data).

    In case it helps others: https://www.gaggl.com/2017/05/connecting-your-lopy-to-the-things-network-in-australia/

    Thanks again for your help @jmarcelino !



  • @jmarcelino

    Jose - your suggestion did the trick ! The join is now acknowledged and data being sent.

    Thanks again for the help and quick reply. MUCH APPRECIATED !



  • @jmarcelino

    Thanks a lot for that info Jose ! Will give this a try.



  • @livius

    I did have the triple ``` around - no problem with markdown.

    The error message was an Akismet message on submit that the text was rejected as it was classified as SPAM.



  • @leogaggl

    For 915 regions you'll have to use LoRa.remove_channel() and LoRa.add_channel calls to make the LoPy listen on the frequencies set by TTN and the gateway.

    This is because the 915Mhz band is peculiar in that it has 72 available frequency channels but most gateways can only listen on 8.

    It will be something like this https://forum.pycom.io/topic/393/lorawan-915mhz-in-the-us/2 (Us915) but I'm not sure the exact details for AU915.



  • @leogaggl

    And then you can only post every 10mins.....

    only with lower reputation :-) This is "spam filter".

    Rejecting code in a software forum is ridiculous

    it accept code look here:
    http://commonmark.org/help/

    code is with triple ``` around



  • @jmarcelino

    Test code here: [https://pastebin.com/iT5ui0Pc](Pastebin link url)

    This Forum software is really highly annoying. Rejecting code in a software forum is ridiculous. And then you can only post every 10mins.....



  • @jmarcelino

    Thanks Jose,

    Here are the details:

    GW: Multitech Conduit AU915
    Region: Australia

    I tried to share the test code but I am getting a message that Akismet is rejecting it as SPAM. Which is not very useful for this type of forum. Any idea on how to get around this. It's pretty much the standard example code.

    Leo



  • What is your gateway? Region? Can you share your code here?


 

Pycom on Twitter