Lopy4 US915 Frequency Plan Problem



  • I have been trying to use the LoPy4 on the US915 frequency plan. I also have been using a HelTec Lora esp32 V2 device as a baseline for Lorawan connectivity. For the heltec I use the following library https://github.com/rgot-org/TheThingsNetwork_esp32 , it is built on LMIC library, which works well, but is not uPython. I really would prefer to use uPython for my IOT device so am trying to use the LoPy4 device. My problem is on the US915 frequency plan , transmission success on the LoPy4 is only successful about 30% of the time (See the two screenshot on TTN gateway monitoring comparing the Heltec (1) and Lopy4 (2) sending data each 10 seconds).
    Heltec ttn-heltec-esp32.png
    Lopy4 ttn-pycom-esp32.png . You can see from the cnt collumn that the Lopy board transmissions are intermittently missed. I wanted to compare what the boards were doing over the air so used a SDR radio to see the actual tranmissions, and the frequencies used. (see next 2 images)
    Heltec sdr-heltec-esp32.png
    Lopy4 sdr-pycom-esp32.jpg
    The LoPy frequency band usage seems all over the map ( I was expecting the frequencies to match https://www.thethingsnetwork.org/docs/lorawan/frequency-plans.html 903.9 - 905.3 Mhz ) So my questions are:

    • Is there detailed documentation on how pycom implements LoraWan functionality? I would love to provide feedback if the actual source code is open and available.

    • Am I missing something on setting frequency plans? I do set "lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.US915)" but maybe there is another setting to have the frequency plan specifically match the TTN networks frequency plans.



  • Thanks - those clues did the trick. I now have almost instantaneous joining (1 or 2 trys) and 100% transmission reliability when local to my gateway.

    Below is the code I added to clear the channels and re-establish channels for TTN US915 . Note I also set "adr=True" when creating the lora object.

    fixed.jpg

    I now am getting some decent ttnmapper results. Just under 1km , this is with a TTN indoor gateway and some hills and houses between me and the gateway.

    ttnmapper.jpg



  • @somervda did you restrict the channels to use on the LoPy?

    The US915 plan has lots of channels (72 uplink channels), but most gateways only listen on a small subset of those (usually 8 or 9) because of hardware limitations.

    You need to add code to remove all the channels the gateway doesn’t listen on, or remove them all and add just those it listens on.

    There should be plenty of examples in the forum (and probably in the docs/tutorials/examples).

    30% success rate is pretty high for a full set of channels, though, so you probably already have some code doing that, just not the right subset.

    Also the full LoRaWAN stack is available in the source code available in github. You should probably also check out the LoRaWAN regional parameters for details.


Log in to reply
 

Pycom on Twitter