Pybytes not receiving LoRa data from fipy through TTN



  • Hi,
    I'm running into the same issue as this github issue, where I set up a Nano Gateway using a fipy (1.20.0.rc12), and another fipy with the latest stable Pybytes firmware (1.18.2.R6) - using the code from the visualise data example.

    I get data to pybytes through WiFi, but not with LoRa (using ABP). In TTN, I can see the data arriving from my device, but it never appears on the pybytes dashboard.

    Did I forget something, or am I doing something wrong?

    Thanks in advance,
    -Tom



  • @tomstoffen I just briefly read your message. The first thing is TTN have their own fair use policy, so when sending a message every 5 seconds you will deplete your air time very soon. Depending on your payload size, you should be fine if you send a message every 15 minutes (that's what I've tested), maybe even every 5 minutes should be OK.

    from this page: https://www.thethingsnetwork.org/docs/lorawan/duty-cycle.html

    Finally, on The Things Network’s public community network, we have a Fair Access Policy that limits the uplink airtime to 30 seconds per day (24 hours) per node and the downlink messages to 10 messages per day (24 hours) per node. If you use a private network, these limits do not apply, but you still have to be compliant with the governmental and LoRaWAN limits.



  • @jirkakrepl Thanks for the reply and sorry for the many questions - I'm quite new to LoRa stuff.

    I managed to get some data through, but then it stopped after I restarted my node.
    I tried playing around with the code on the node, changed some channels and such, but I couldn't get more data to Pybytes.
    With "channel", are we talking frequency, dr or maybe the combination of these? I see in the nano gateway config, "LORA_NODE_DR" is set to 5, while in my node it's set to minimum 0 and maximum 5. I played around with these, but it either didn't work or I got an error.
    Where do I find out which channel my gateway is using, and where do I set this channel in my node?

    Thanks,
    Tom

    Edit:
    My node sends data every 5 seconds, and after being on for a while (maybe 10 minutes) 5 messages got through over the course of 2 minutes - before my node decided to reboot itself. Is it sending data using random channels for every message, or does it chose a channel when it's initializing?



  • Hi Tom,

    we had a problem on our server and now it is resolved. LoRa data should now be visible in Pybytes.

    Then regarding LoRa nano gateway:

    In our office, for tests, we use Raspberry Pi and the older generation of this LoRa gateway. https://store.rakwireless.com/collections/lora-gateways-concentrators/products/rak2245-pi-hat

    If you use LoRa nano gateway you can use just one channel for sending LoRa messages.
    You will need to set the same channel on your node otherwise your device will be sending messages on random channels, so not every LoRa message will be received by your LoRa nano gateway.

    We don't officially support LoRa nano gateway in Pybytes library. So you will need to manually set the LoRa channels on your node to the same frequency as your LoRa nano gateway is using.
    https://github.com/pycom/pycom-libraries/blob/master/examples/lorawan-nano-gateway/abp_node.py#L32-L38

    I haven't tested setting those channels myself. But you might need to flash stable firmware and Pybytes library manually with Atom to have the full control over Pybytes library code https://docs.pycom.io/pybytes/connect/flash/ (as opposed to using the build in Pybytes library in Pybytes firmware)



Pycom on Twitter