Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    LoraWAN downlink problem with large packets

    Scheduled Pinned Locked Moved Issues & Bugs
    downlink
    15 Posts 6 Posters 1.5k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      PP
      last edited by PP

      Hi,
      My lora node receives the downlink packet with payload size 66 bytes but when i m sending the downlink packet with payload size 240 bytes it is not being received at lora node. To test this,in application code after every uplink packet I am publishing a downlink packet.
      LoRaWAN data rate is DR5(region-EU868)

      Other observations-

      1. In both the cases I am able to see the downlink frames in "LIVE LORAWAN FRAMES" section corresponding to lora device(I assume it means it has been transmitted from server side)
      2. In "LIVE DEVICE DATA" section i am getting following "error" packet after every uplink packet(in both cases)-
        applicationID:"1"
        applicationName:"App"
        devEUI:"aaaaaaaaaaaaaaaa"
        deviceName:"App"
        error:"invalid data type: 4"
        type:"CODEC"

      Setup details-
      I am using Lopy4 as my LoRaWAN node as well as nano gateway.
      Lopy4 firmware(lora node)-"release='1.20.0.rc4'"
      lopy4 firmware nanogateway-"release='1.18.0'"

      lora server details(lora-app-server,loraserver and lora-gateway-bridge are installed on same machine)-
      lora-app-server version -2.4.1
      loraserver version-2.4.1
      lora-gateway-bridge version-=2.6.2

      Can anybody please tell me,what is the the problem?

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @PP
        last edited by

        @pp Per the LoRaWAN spec, the maximum payload size is 230 bytes at DR5 (and much smaller at slower data rates).

        Note also that a 230-byte packet at DR5 will take 379 ms to transmit. On most sub-bands in the EU868 region, that means you're not allowed to send more than 95 packets per hour on that sub-band (that's amount 1.5 packets per minute).

        J 1 Reply Last reply Reply Quote 0
        • P Offline
          Paul Thornton
          last edited by

          @pp said in LoraWAN downlink problem with large packets:

          size 240 bytes

          That's far to large. You'll run out of radio time trying to transmit that in one go.

          P 1 Reply Last reply Reply Quote 0
          • J Offline
            jcaron @jcaron
            last edited by

            @jcaron Mmmm was a bit quick on that... It could be up to 250 bytes "if the end-device will never operate with a repeater". No idea if/how the LoRaWAN stack handles that. Try with 230 bytes to see if it goes through.

            P 1 Reply Last reply Reply Quote 0
            • bmarkusB Offline
              bmarkus
              last edited by

              How do you control downlink DR used by the Gateway?

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                PP @bmarkus
                last edited by

                @bmarkus I have disabled adr in the server and freezed the data rate at the gateway.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  PP @Paul Thornton
                  last edited by PP

                  @paul-thornton I am doing this for testing only in actual application it will done occasionally(also downlink payload will be far less) but as per LoRaWAN specs it should work upto 242 bytes without FOpt fields.

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    PP @jcaron
                    last edited by

                    @jcaron I tried with downlink packet size 186 bytes,losses are too much(once out of around 10 transmissions it is received at node).I also tried with packet size 200 bytes here once out of around 50 transmission it is received at node.

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jcaron @PP
                      last edited by

                      @pp The longer the frame the more chances it will be corrupted by noise on the band or collisions if you have several devices around. The packet loss rate seems a bit too high, though (but I admit I never tried such long packets, they're not really the typical LoRa use case).

                      Do you have other devices using LoRa around? Or other users of the 868 MHz band? How far are the two devices? What kind of antennas do you use? Does it work OK for smaller packets?

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        PP @jcaron
                        last edited by PP

                        @jcaron Uplink with same packet size is going fine so i don't think it is problem of noise or collision.Other details are-Only one device is there,no other users nearby,distance between gateway and device is around 3 meters,antenna is,which comes along with pycom accessories. Downlink with smaller packet size it is working fine.

                        robert-hhR J 2 Replies Last reply Reply Quote 0
                        • robert-hhR Offline
                          robert-hh @PP
                          last edited by

                          @pp Did you have WiFi enabled during your tests? If yes, try to disable WiFi for the Receive timeframe.

                          P 1 Reply Last reply Reply Quote 0
                          • P Offline
                            PP @robert-hh
                            last edited by

                            @robert-hh I have disabled it,it is not making any difference.

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              jcaron @PP
                              last edited by

                              @pp I wonder if there couldn't be some sort of bug in the RX code that doesn't wait long enough for the full packet to be received. In theory it should cancel the RX window timers as soon as it has detected the preamble (and possibly set another timer based on the max duration of the frame at that point, but it may wait for the full packet to do so instead.

                              A very quick glance at https://github.com/pycom/pycom-micropython-sigfox/blob/master/drivers/sx127x/sx1276/sx1276.c searching for RxTimeoutTimer seems to indicate that the RX timer is indeed cancelled only once the full packet has been received, but I may be wrong on that one, I really haven't looked much further.

                              @robert-hh I know you spent a bit of time looking at the timing of RX windows etc. at some point, did you get into that part as well?

                              robert-hhR 1 Reply Last reply Reply Quote 0
                              • robert-hhR Offline
                                robert-hh @jcaron
                                last edited by

                                @jcaron Yes, I did. But I did not look into that specific behavior.

                                1 Reply Last reply Reply Quote 0
                                • V Offline
                                  virtualguy
                                  last edited by

                                  I was having similar issues with Multitech gateways in combination with TheThingsNetwork's recommended packet forwarder (from kersing). Updating to the latest packet forwarder from Multitech the legacy UDP format solved the issue.

                                  Bytes past 66 seemed to be garbage and therefore the MIC/crc would fail

                                  1 Reply Last reply Reply Quote 0

                                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                  With your input, this post could be even better 💗

                                  Register Login
                                  • 1 / 1
                                  • First post
                                    Last post

                                  Pycom on Twitter

                                  Pycom