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

    Sending LoRa messages on a specific frequency

    Scheduled Pinned Locked Moved LoPy
    5 Posts 3 Posters 65 Views 3 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.
    • C Offline
      Colin Crook
      last edited by

      Hi,

      I am completely new to pycom but I have been searching around for the answer to assist with a project I have. I would like to send data on a specific frequency rather than the device selecting one from in the range in whatever region you are in. For me I am EU so its 868.x.

      Forgive me if I am getting the terminology wrong in any of this. I noticed in the firmware and API reference that it looks like there is a frequency argument that does just this:

      "frequency accepts values within the selected Region frequency bands."

      I would very much like to know if this can be used with something like the example provided here?: https://docs.pycom.io/tutorials/networks/lora/lorawan-otaa/

      If it is I will quite happily buy some kit.

      J 1 Reply Last reply Reply Quote 0
      • D Offline
        dnear1
        last edited by

        I always had trouble getting it to send to the right bands even though I selected the right area..

        I added this before I joined:
        (You need to substitute your correct frequencies, these are the US915 band)

        for i in range(0, 71):
            lora.remove_channel(i)
        print('Removed default channels')
        time.sleep(1)
            
            # Set US ISM 915 channel plan for TTN US
        lora.add_channel(0, frequency=903900000, dr_min=0, dr_max=3)
        lora.add_channel(1, frequency=904100000, dr_min=0, dr_max=3)
        lora.add_channel(2, frequency=904300000, dr_min=0, dr_max=3)
        lora.add_channel(3, frequency=904500000, dr_min=0, dr_max=3)
        lora.add_channel(4, frequency=904700000, dr_min=0, dr_max=3)
        lora.add_channel(5, frequency=904900000, dr_min=0, dr_max=3)
        lora.add_channel(6, frequency=905100000, dr_min=0, dr_max=3)
        lora.add_channel(7, frequency=905300000, dr_min=0, dr_max=3)
        
        1 Reply Last reply Reply Quote 0
        • J Offline
          jcaron @Colin Crook
          last edited by

          @Colin-Crook there are two modes of operation for LoRa:

          • raw LoRa let’s you control exactly what frequency, spreading factor, bandwidth and other parameters you want to use. But the sender and receiver need to agree on the exact settings.

          • LoRaWAN is built on top of LoRa, and defines a set of rules about the settings for each region, as well as MAC procedures, including joins, confirmed packets, retransmits, settings updates, etc. This is what is used by LoRa networks such as TTN and many others. There you have much less choice, and you need to follow the settings chosen by the network. In many regions such as the EU 868 region there are actually very few choices left to the node.

          C 1 Reply Last reply Reply Quote 2
          • C Offline
            Colin Crook @jcaron
            last edited by

            @jcaron oh thats interesting. I must have been getting confused between the two. My project is about LoRaWAN security and I was looking for a way to simplify playing an attack on a specific frequency. Maybe I'll have to rethink how I recreate the attacks. Papers on the subject are very good on what they did and not how they did it :) Thanks for the replies.

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

              @Colin-Crook If you want full control the best option is to use raw LoRa, and then simulate what the LoRaWAN stack does (mostly adding quite a bit of overhead to the packets, including addresses, frame counters, checksums, etc.).

              Note sure how the frequency comes into play though, but my guess is that you're probably more interested in manipulating what is actually included in the frames, which (unless you modify the LoRaWAN stack), is probably much easier to do with raw LoRa.

              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