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

    LOPY to ERA-LORA board communication

    Scheduled Pinned Locked Moved LoPy
    lopy
    21 Posts 5 Posters 4.8k Views 5 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.
    • J Offline
      jmarcelino @pkilcoyne
      last edited by jmarcelino

      @pkilcoyne

      You also need to match:

      1. the coding rate e.g. coding_rate=LoRa.CODING_4_5
      2. the Sync Keyword (the public=True means 0x34, public=False means 0x12)
      3. Preamble length (the Lopy default is 8, set by preamble=8)
      4. Make sure the IQ matches the inversion setting (for transmit and receive, set by default to tx_iq=False, rx_iq=False )
      P 1 Reply Last reply Reply Quote 0
      • P Offline
        pkilcoyne @jmarcelino
        last edited by

        @jmarcelino Thanks for the reply.

        I've set the LoPy as follows now:

        lora = LoRa(mode=LoRa.LORA, region=LoRa.EU868, sf=11, frequency=869850000, bandwidth=LoRa.BW_125KHZ, public=False, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False )

        According to LPRS their settings are similar:

        You also need to match:

        1. the coding rate e.g. coding_rate=LoRa.CODING_4_5 - Yes we use the same coding 4/5
        2. the Sync Keyword (the public=True means 0x34, public=False means 0x12) - Yes the module is set to 0x12
        3. Preamble length (the Lopy default is 8, set by preamble=8) - Yes again the module is set preamble 8
        4. Make sure the IQ matches the inversion setting (for transmit and receive, set by default to tx_iq=False, rx_iq=False ) - I think it is set to false.

        Still no messages seem to be received at either end.

        Is there something else that could be the issue?

        Regards,

        Paul

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jmarcelino @pkilcoyne
          last edited by

          @pkilcoyne
          You were using sf=12 before and now sf=11 does this match what you have set?

          P 1 Reply Last reply Reply Quote 0
          • P Offline
            pkilcoyne @jmarcelino
            last edited by

            @jmarcelino They said SF11 was preferable so I've changed it at both ends.

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              jmarcelino @pkilcoyne
              last edited by jmarcelino

              Which device is doing the receiving? The LoPy? If so you probably need to add power_mode=LoRa.ALWAYS_ON to the initialisation

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                pkilcoyne @jmarcelino
                last edited by

                @jmarcelino Hi again, both devices are set up to send and receive continuously.

                I add that change to the LoPy:
                power_mode=LoRa.ALWAYS_ON

                Is there a way to print to screen all the curent parameter values set on the LoPy?

                Regards,

                Paul

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  jmarcelino @pkilcoyne
                  last edited by

                  @pkilcoyne

                  In LoRa all the possible parameters are passed to init so there's isn't much of a need to print the parameters...

                  Did you set public=False as they describe?

                  You init line should be:

                  lora = LoRa(mode=LoRa.LORA, region=LoRa.EU868, sf=11, frequency=869850000, bandwidth=LoRa.BW_125KHZ, public=False, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False, public=False, power_mode=LoRa.ALWAYS_ON)

                  If you have done this I think you've set all the parameters you can.

                  If you send from the ERA-LORA board and try to recv() on the LoPy you also don't receive anything?

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

                    @jmarcelino I've read this post and wondered, if not in mode LoRa.LORA the receiver is not always on anyhow. The simple example LoPy to LoPy seem not to need that setting of power_mode=LoRa.ALWAYS_ON.

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jmarcelino @robert-hh
                      last edited by

                      @robert-hh
                      The default setting is indeed LoRa.ALWAYS_ON but it doesn't hurt to add :)

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        pkilcoyne @jmarcelino
                        last edited by

                        @jmarcelino OK so it's implemented those changes to reflect your suggestions.

                        Attached is a screenshot of the EasyRadio software and it's settings.

                        Regards,

                        Paul

                        0_1524072139286_EasyRadio settings.PNG

                        J 1 Reply Last reply Reply Quote 0
                        • J Offline
                          jmarcelino @pkilcoyne
                          last edited by jmarcelino

                          @pkilcoyne
                          If I'm reading their manual correctly I think you may have the wrong frequency on the LoPy:

                          0_1524072636156_Screen Shot 2018-04-18 at 18.29.48.png

                          This means the frequency the LoPy should be set to is: 869850000 + (0 * 125000) + (125000/2) = 869912500

                          P 1 Reply Last reply Reply Quote 0
                          • P Offline
                            pkilcoyne @jmarcelino
                            last edited by

                            @jmarcelino Yep, I've tried that, no joy.

                            If c is anything over 0 the LoPy gives an error saying:

                            ValueError: frequency 870037500 out of range

                            J 1 Reply Last reply Reply Quote 0
                            • J Offline
                              jmarcelino @pkilcoyne
                              last edited by jmarcelino

                              @pkilcoyne
                              Did you also try receiving with the LoPy on the new frequency?

                              Going over 870Mhz is not allowed in ETSI (Europe), the legal range is 868-870Mhz

                              I guess with the ERA device to use a higher channel you'd need to lower the base frequency.

                              P 1 Reply Last reply Reply Quote 0
                              • P Offline
                                pkilcoyne @jmarcelino
                                last edited by

                                @jmarcelino Yes I tried that. Basically both devices are programmed to transmit every 2 seconds and receive. But they're not receiving anything yet.

                                J 1 Reply Last reply Reply Quote 0
                                • J Offline
                                  jmarcelino @pkilcoyne
                                  last edited by

                                  @pkilcoyne
                                  They're not transmitting at the same time by any chance?

                                  P 1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    pkilcoyne @jmarcelino
                                    last edited by

                                    @jmarcelino Well I stopped transmitting on the ERA-LORA to see, nothing received. I've emailed LPRS again in regards to the frequency, awaiting their reply.

                                    Thanks again,

                                    Paul

                                    1 Reply Last reply Reply Quote 0
                                    • catalinC Offline
                                      catalin
                                      last edited by

                                      hi @pkilcoyne, did you received any answer from LPRS?
                                      I've understood you still have this problem, right?

                                      Catalin,

                                      Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io
                                      Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                                      P 1 Reply Last reply Reply Quote 0
                                      • P Offline
                                        pkilcoyne @catalin
                                        last edited by

                                        @catalin Hi, sorry for the tardy reply, I didn't see yours til now.

                                        I gave up on getting the two devices to communicate, seems impossible.

                                        Any thoughts?

                                        Thanks,

                                        Paul

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

                                          @catalin @jmarcelino I again guys. So I've been playing around with two ERA-LORA modules and two LOPY modules again.

                                          I have the two ERA-LORA modules talking to each other and separately the two LOPYs talking to each other.

                                          Here are the settings on both sets of devices;

                                          0_1536930365030_674c6752-a1d6-4ad2-9856-06e596c19d05-image.png

                                          Can you think of anything else I might be missing?

                                          Thanks,

                                          Paul

                                          E 1 Reply Last reply Reply Quote 0
                                          • E Offline
                                            Eric73 @pkilcoyne
                                            last edited by Eric73

                                            @pkilcoyne Hello, my two cents about reading your topics,
                                            Basically if two lora module have same center Freq, same SF, same SYNCWORD (0x34 for lorawan and 0x12 for private lora), same coding rate, same IQ (IQ is inverted for lorawan and not inverted for private lora usally) and same HeaderSetup (implicit or explicit) the RX/TX work.

                                            I dont see where with lopy how we can set header mode, so i suppose it's always explicit ?

                                            In ERA-LORA it seem to be the same think (cannot set header mode so may be alway set a explicit?). They use "group ID" term instead of SYNCWORD, and they don't speak about IQ (so it's be supposed to be alway inverted ?)
                                            I suggest you to try inverting IQ in Lopy for RX and TX, set group ID to 12xx in era lora , be careful on how you select frequency on both module and try...may be it's change something.

                                            *I dont speak about header CRC mode setup it's a little bit fuzzy how it work.

                                            1 Reply Last reply Reply Quote 2

                                            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