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 network

    Scheduled Pinned Locked Moved LoPy
    21 Posts 4 Posters 9.1k 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.
    • G Offline
      gouao
      last edited by

      Hello,
      I am worried about my lorawan network security. What will happen if there is another lorawan network nearby ?
      How would I know that the owner of the nearby network will not be able to enter in mine ?
      Does it have a lora SSID, or only a wifi SSID ?

      I will really be grateful if you could help me.
      All the best

      bmarkusB G 2 Replies Last reply Reply Quote 0
      • bmarkusB Offline
        bmarkus @gouao
        last edited by bmarkus

        @gouao said in LoRaWAN network:

        Hello,
        I am worried about my lorawan network security. What will happen if there is another lorawan network nearby ?
        How would I know that the owner of the nearby network will not be able to enter in mine ?
        Does it have a lora SSID, or only a wifi SSID ?

        I will really be grateful if you could help me.
        All the best

        In the LoRaWAN network both MAC (network control communication between your device and network server) and user data are encrypted by different 128-bit AES keys. Normally each device has a unique key set even in the same network server and account. Depending of the configuration, application encryption key may be unknown for the network server. So in general LoRaWAN offers proper protection for nearly all applications.

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

          It's not an SSID but - to put it simply - LoRaWAN uses two unique keys to encrypt communication so only your node and your network server will understand whats being sent.

          If you're interested in the details this is a good white paper https://labs.mwrinfosecurity.com/assets/BlogFiles/mwri-LoRa-security-guide-1.2-2016-03-22.pdf

          1 Reply Last reply Reply Quote 0
          • G Offline
            gouao
            last edited by

            Thanks both of you, I understand way better the security issue I was facing !
            Concerning the link, I already found some useful informations out there. ;)

            I'm planning to communicate 2 LoPy devices thanks to the OTAA Join procedure in order to create a LoRaWAN network, but I'm not sure where I should start, and what might be the right way to achieve my goal.
            I found something that might help here : https://docs.pycom.io/pycom_esp32/library/network.LoRa.html# & https://docs.pycom.io/pycom_esp32/pycom_esp32/lora_examples.html#lora-loramac

            What could be done with those samples, and how would be the better way to use them ?

            Thanks.

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

              @gouao said in LoRaWAN network:

              Thanks both of you, I understand way better the security issue I was facing !
              Concerning the link, I already found some useful informations out there. ;)

              I'm planning to communicate 2 LoPy devices thanks to the OTAA Join procedure in order to create a LoRaWAN network, but I'm not sure where I should start, and what might be the right way to achieve my goal.

              Do you mean to create a LoraWAN network built of the 2 LoPy-s or you want to connect the 2 LoPy devices to an existing LoRaWAN network via nearby third-party gateway?

              G 1 Reply Last reply Reply Quote 0
              • G Offline
                gouao @bmarkus
                last edited by

                @bmarkus To create a LoraWAN network build of the 2 loPys

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

                  @gouao
                  It's not (yet?) possible to create LoRaWAN networks that support OTAA joins with just 2 LoPys.

                  True LoRaWAN networks require a LoRaWAN gateway, a special device which has powerful dedicated radio chip able to listen on multiple frequencies at the same time, amongst other things. These cost $200+.

                  There are some tricks to mimic some gateway functionality using LoPys but those aren't really sufficiently developed yet.

                  For now you can look for nearby LoRaWAN gateways, maybe someone already has one you can use or you can setup your own. For example check the Thing Network https://www.thethingsnetwork.org which is a public network by volunteers open to everyone.

                  Alternatively you can use 'raw' LoRa (i.e. without the WAN protocol) to communicate between your LoPys, for example using the Nano gateway example https://forum.pycom.io/topic/236/lopy-nano-gateway

                  S 1 Reply Last reply Reply Quote 0
                  • G Offline
                    gouao @gouao
                    last edited by

                    @gouao Is that possible to create a LoRaWAN network using LoraMAC instead of OTAA join tho ?

                    I understand better how does it work, thanks !

                    The solution you proposed on TTN webbsite seems nice, i'll dig on it.

                    So, how my LoRaWAN network will work once the gateway will be able to listen the LoPys ? Would I need to pass through a server then, only to make my LoPys devices communicate ?

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

                      @gouao
                      Yes, LoRaWAN requires a network server even for just 2 devices. Also it's not meant for devices communicating between themselves, it's more for having many devices uploading small amounts of data to some server.

                      For device to device there's LoRa mode (without the WAN), which is essentially just a radio channel, like a walkie-talkie. But remember you need to do your own encryption then and probably establish some sort of protocol.

                      G 1 Reply Last reply Reply Quote 0
                      • G Offline
                        gouao @jmarcelino
                        last edited by

                        @jmarcelino Sure, the devices communicating between themselves case was for some tests.
                        How this server scenario actually works ? The planning will consist to send data to this server.

                        So the LoRa mode is certainly working on low frequency ? Do you know the range of this mode please ?
                        Furthermore, what could be the etablishment of my own encryption ? Some code to add in the boot.py ?

                        Do you have any code samples wich could help me on this, and for the LoRaWAN network ?

                        Thanks

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

                          @gouao
                          I suggest reading a few things on LoRaWAN such as https://www.thethingsnetwork.org/wiki/LoRaWAN/Home and also this crash-course video https://www.youtube.com/watch?v=T3dGLqZrjIQ

                          It's difficult to say a range with anything radio, it depends on your environment, but my best with LoRa was 5 Kilometres using SF12, no line of sight and the receiver located at an altitude of 8 meters

                          For encryption of LoRa data you could use for example AES, see https://docs.pycom.io/pycom_esp32/library/ucrypto.AES.html
                          then just make sure both LoPys have the same key.

                          I don't have any LoRa samples sorry, but the nano gateway example I linked below and the LoRa-MAC (Raw LoRa) in the Pycom tutorial should explain it.

                          G bmarkusB 2 Replies Last reply Reply Quote 0
                          • G Offline
                            gouao @jmarcelino
                            last edited by

                            @jmarcelino It's very kind of you, I will dig on this side !

                            May I return to you if I still have questions ?

                            Thanks for all.

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

                              @jmarcelino said in LoRaWAN network:

                              It's difficult to say a range with anything radio, it depends on your environment, but my best with LoRa was 5 Kilometres using SF12, no line of sight and the receiver located at an altitude of 8 meters

                              With line of sight we have stable link in 50-60 km where S/N is around 0dB which means there is plenty of spare link budget down to -18dB. Conditions:

                              • 868 MHz
                              • Kerlink professional gateways
                              • SF12
                              • Simple omni-directional antenna

                              Record is cca. 150 km distance. In a city like Budapest from car with antenna on the roof 20-25km usually works with Kerlink gateways.

                              On 434 MHz with P2P using SX127x chips, not SX130x we have seen 60km link, on a bicycle tracking it gives 10-12km reliable tracking with stable station just in a house, no hilltop, towers, etc.

                              G 1 Reply Last reply Reply Quote 0
                              • G Offline
                                gouao @bmarkus
                                last edited by

                                @bmarkus said in LoRaWAN network:

                                @jmarcelino said in LoRaWAN network:

                                It's difficult to say a range with anything radio, it depends on your environment, but my best with LoRa was 5 Kilometres using SF12, no line of sight and the receiver located at an altitude of 8 meters

                                With line of sight we have stable link in 50-60 km where S/N is around 0dB which means there is plenty of spare link budget down to -18dB. Conditions:

                                • 868 MHz
                                • Kerlink professional gateways
                                • SF12
                                • Simple omni-directional antenna

                                Record is cca. 150 km distance. In a city like Budapest from car with antenna on the roof 20-25km usually works with Kerlink gateways.

                                On 434 MHz with P2P using SX127x chips, not SX130x we have seen 60km link, on a bicycle tracking it gives 10-12km reliable tracking with stable station just in a house, no hilltop, towers, etc.

                                Wow, thanks ! Can you estimate the price of such a project ?

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

                                  @gouao
                                  It's not really a question of price, but 99% about antenna positioning - especially what's around the antennas - on both nodes and gateways.

                                  You can easily spend $1000+ on a gateway and not get much more than 1Km.

                                  Line of sight and antenna height are particularly important. The video I linked explains a lot about that.

                                  bmarkusB G 2 Replies Last reply Reply Quote 0
                                  • bmarkusB Offline
                                    bmarkus @jmarcelino
                                    last edited by

                                    @jmarcelino said in LoRaWAN network:

                                    @gouao
                                    It's not really a question of price, but 99% about antenna positioning - especially what's around the antennas - on both nodes and gateways.

                                    You can easily spend $1000+ on a gateway and not get much more than 1Km.

                                    Line of sight and antenna height are particularly important. The video I linked explains a lot about that.

                                    People tend to forget LoRa is RADIO technology which need ANTENNA and proper POSITIONING, not only software. A proper antenna can make miracles. However we see better performance using a Kerlink GW over RPi even they have the same chipset. Frontend filters can improve performance on receiving side. By experience the latest Kerlink station outperforms current generation according to our tests. So for higher price you get better performance. But true, you can reach poor performance for high price also with improper installation, noisy environment, etc.

                                    1 Reply Last reply Reply Quote 0
                                    • G Offline
                                      gouao @jmarcelino
                                      last edited by

                                      @jmarcelino said in LoRaWAN network:

                                      @gouao
                                      It's not really a question of price, but 99% about antenna positioning - especially what's around the antennas - on both nodes and gateways.

                                      You can easily spend $1000+ on a gateway and not get much more than 1Km.

                                      Line of sight and antenna height are particularly important. The video I linked explains a lot about that.

                                      True, the vid explains a lot about it, and underlines points like antenna height, reflection & diffraction phenomenon.

                                      Any ideas how could I configure a server for a LoRaWAN network, wich will probably work with a TTN gateway please ?

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

                                        @gouao

                                        If you mean running a server for your own private LoRaWAN network (outside of Things Network) you can try https://github.com/brocaar/loraserver

                                        The other alternative - and the way I'm using - is to run you own copy of Things Network, it's fully open source and they even provide a setup guide at https://www.thethingsnetwork.org/article/setting-up-a-private-routing-environment - but you should really understand how their system works first.

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

                                          @jmarcelino said in LoRaWAN network:

                                          @gouao

                                          If you mean running a server for your own private LoRaWAN network (outside of Things Network) you can try https://github.com/brocaar/loraserver

                                          The other alternative - and the way I'm using - is to run you own copy of Things Network, it's fully open source and they even provide a setup guide at https://www.thethingsnetwork.org/article/setting-up-a-private-routing-environment - but you should really understand how their system works first.

                                          You can use a Loriot server also, which is free for 1 GW and up to 10 devices, see https://loriot.io/

                                          1 Reply Last reply Reply Quote 0
                                          • G Offline
                                            gouao
                                            last edited by

                                            Thanks both of you !

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

                                            Pycom on Twitter

                                            Pycom