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

    raw lora packets multiple of 5 bytes?

    Scheduled Pinned Locked Moved Discussion
    22 Posts 4 Posters 117 Views 4 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.
    • rcolisteteR Offline
      rcolistete
      last edited by

      See the topic Air Time calculation in (Micro)Python to easily calculate the airtime in MicroPython.

      My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

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

        @kjm That's what I have seen. With some probability it's a problem of the API. The more important result was, that the value reported by lora.stats() matches the physical event.
        Another minor topic: There is a small delay between calling lora.send() and the message going into the air. Increasing with the packet size, it is 2.5 - 4.5 ms at DR5 with slight variations. I did not test other data rates, but expect it to be not related to the data rate.

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

          @robert-hh 3-4ms I can live with Rob. It's surprising how these ms intervals vary. Yesterday I ran a test to see how long my 300 sample A/D read took, 44ms. Today, on a different lopy4 with the same firmware, it's 48ms, a ~10% variation from one chip to the next.

          1 Reply Last reply Reply Quote 0
          • K Offline
            kjm @jcaron
            last edited by

            @jcaron Is there a formula that will tell the range of frequencies the lopy4 raw lora will use for a given bw, sf, etc.? It looks like ~3MHz on my cheapie little hand held RF spectrum analyser.

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

              @robert-hh IIRC in raw LoRa mode the modem is set to LBT (listen before talk), that could be the reason for the delay maybe?

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

                @kjm in theory it should be the bandwidth setting, that’s what determines the allowed frequency range, so 125 or 250 or 500 kHz, centred on the nominal frequency.

                I’m a bit surprised you could find 3 MHz, that seems like a lot.

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

                  @jcaron said in raw lora packets multiple of 5 bytes?:

                  IRC in raw LoRa mode the modem is set to LBT (listen before talk), that could be the reason for the delay maybe?

                  I used LoraWAN mode for testing. I could repeat that for Raw mode.

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

                    @kjm said in raw lora packets multiple of 5 bytes?:

                    It looks like ~3MHz on my cheapie little hand held RF spectrum analyser.

                    What I see in the SDR receiver is about 125 kHz. See the attached picture with 3 packets in the waterfall diagram. Setting DR0, BW125.

                    lora_packets.jpg

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

                      @jcaron said in raw lora packets multiple of 5 bytes?:

                      IIRC in raw LoRa mode the modem is set to LBT (listen before talk), that could be the reason for the delay maybe?

                      Similar times for Raw Lora mode.

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        kjm @robert-hh
                        last edited by kjm

                        @robert-hh rawloraBW125SF12.jpg Wonder why mine looks like this? Should I be ignoring the peak off to the right?

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

                          @kjm does the peak at 924 MHz appear and disappear at the same time as the one at 921.5 MHz, or is not correlated?

                          If the latter it could simply be another user of the band.

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

                            @jcaron For me it looks too just like a transmission on a separate channel, or something else. If I run the spectrum analysis with either tool (SDR or Oscilloscope in FFT mode) in peak hold mode, It shows clearly three different bands of 128kHz width. Sample picture of SDR below.
                            ![0_1608104523714_lora_wan_dr0_sdr.bmp](Uploading 100%) lora_wan_dr0_sdr.jpg

                            P.S.: The signal level is low because I run the LoPy for desk tests with a 50 Ohm terminator instead of an antenna. The stray radiation is still strong enough for functional testing.

                            1 Reply Last reply Reply Quote 1
                            • K Offline
                              kjm @jcaron
                              last edited by kjm

                              @jcaron I've got a raw lora base interrogating raw lora remotes sequentially with a 2 byte poll, they reply with 3 bytes. The annoying little peak 3MHz above the centre frequency is due the 3 bytes transmissions. If I depower the remotes it goes away, if I rejig the base to transmit 3 bytes instead of 2 it comes back. Most peculiar!

                              The longer I run it the worse it gets, after three or four 3 byte transmissions I have little peaks at + and - 1.5MHz from the centre frequency too.

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

                                @kjm said in raw lora packets multiple of 5 bytes?:

                                The longer I run it the worse it gets, after three or four 3 byte transmissions I have little peaks at + and - 1.5MHz from the centre frequency too.

                                Since your Spectrum analyzer device seems to be set to max hold, it will accumulate every event it detects. That's why you see more peaks the longer you test. Can you determine the level at which the side peaks occur. I see -50dB for the main peak, but the other levels are hard to see. Could be ~-80 db for the peak at 924 MHz.
                                If I run my test with the SDR for raw lora with a 20MHz instead 2 MHz span, I see side bands at 863 +/- 5 MHz. Most likely these are artifacts caused by the kind of measuring.

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

                                  @kjm So I made a few spectrum capures using the same set source but three different methods for capturing.
                                  test source: LoPy4 in Lora raw mode, sending 4 bytes at 863 MHz, SF7BW125.
                                  Capture 1: SDR receiver (SDRPlay1a) with spectrum analyzer software
                                  Capture 2: SDR Receiver with GQRX software
                                  Capture 3: Oscilloscope with FFT software.
                                  Capture 1 show sides peaks at +/- 5 MHz. And other peaks from other sources, e.g. at 868 MHz. If the IF setting is changed to Zero-IF, the side peaks are not present.
                                  Capture 2 does not show that, if the center frequency is at 863 MHz. When moving the center frequency to e.g. 860.5 MHz lower level echo appears at 858 MHz. That is typical for these receivers, that they mirror events at the center frequency.
                                  Capture 3: Very low level side bands at +/- 7.4 MHz.

                                  Given that what we see varies with the test tools, I assume these side bands are artifacts created by the test instrument/method.

                                  lora_sdr_spectrum_BW20M.jpg
                                  lora_raw_sdr_10MHzBW.jpg
                                  lora_raw_fft_BW20M.png

                                  K 1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    kjm @robert-hh
                                    last edited by kjm

                                    @robert-hh Unreal Rob! I'm used to artefacts (mainly missing events) on a DSO due aliasing but I haven't had a lot of experience with spectrum analysers. This experience of seeing frequencies that aren't really there is bothersome. But then any instrument beyond a ruler is probably measuring not what you are interested in but some other metric supposedly indicative of what you are interested in, so anomalies are only to be expected I guess. Really interesting that the artefacts vanish at zero IF.

                                    I might get myself a HackRF1 as a Christmas present & see what it has to say about side lobes as a function of bytes sent from the SX1272/1276.

                                    Regardless of lobes/no lobes lora is pretty impressive. I ran a swept frequency source over the top of a raw lora link here on the bench & the link ploughed on regardless. I'm sure if I fiddled the timing I could break the link but I don't much see the point.

                                    Thnx to you & jcaron for your contributions these last few years, always constructive & enlightening.

                                    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
                                    • 2
                                    • 1 / 2
                                    • First post
                                      Last post

                                    Pycom on Twitter

                                    Pycom