Building A Local Network With LoRaWAN

At its core, the Internet is really just a bunch of computers networked together. There’s no reason that there can’t be other separate networks of computers, or that we all have to tie every computer we have to The One Internet To Rule Them All. In fact, for a lot of embedded systems, it doesn’t make much sense to give them a full network stack and Cat6e Ethernet just to report a few details about themselves. Enter LoRaWAN, a wireless LAN that uses extremely low power for Internet-of-Things devices, and an implementation of one of these networks in an urban environment.

The core of the build is the LoRaWAN gateway which sits at the top of a tall building to maximize the wireless range of all of the other devices. It’s running ChirpStack on the software side and uses a Kerlink Wigrid station to broadcast. The reported range is a little over 9 km with this setup. Other gateways can also be added, and the individual LoRa modules can report to any available gateway. From there, the gateways all communicate back to the central server and the information can be sent out to the wider network, Internet or otherwise.

The project’s creator [mihai.cuciuc] notes that this sort of solution might not be best for everyone. There are other wide area networks available, but using LoRaWAN like this would be likely to scale better as more and more devices are added to the network. For some other ways that LoRa can be used to great effect, take a look at this project which builds an off-grid communications network with it.

40 thoughts on “Building A Local Network With LoRaWAN

  1. Makes me wish it would be possible to put antennas on the tallest 2 buildings of my town and create a LoRaWAN for all citizens. It is a small city and would work, but I doubt there would be much interest and I am sure some regulation or bureaucrat will say “No” to it. I would have already bought a SigFox or subscribed to it, given I had actual reception data. Their map looks nice, but without the actual antenna locations being revealed I don’t trust the signal is received everywhere. Problem with SigFox is the little amount of data you can send.

    It sucks to think putting my phone into hotspot mode and having an ESP8266 or 32 send data over wifi+lte to a server gives me better coverage than anything else i can build or subscribe to. If there wasn’t the issue with range of wifi. Sorry for ranting and venting random thoughts. Of course LoRa is superior in range and every other regard. A Kerlink iStation 868 Mhz without PoE Injector costs 849 EUR according to a quick web search, putting this project anyway out of the range I want to spend for some tech fun.

          1. Yes, technically you can mine with 2 gateways not too far from each other, but what you get from that is so little, it should not be even called “mining” anymore.

    1. Are you prepared to deal with abuse complaints and possibly law enforcement too? Someone may use your network do download CP, if you can’t identify who it was then you will be responsible.

      There’s a reason why “free Wi-Fi” is a thing of the past.

      1. Lol you watch too much cop shows on TV. LoRaWAN is no WiFi, you are not on the internet. You access it via APIs and API keys after registering for a free or paid service. Might wanna read up on OSI model too before saying such awkward things!

        1. Lol clearly these okes did 0 reading. The payload for each transmission of data is miniscule. As in its able to send GPS coordinates but cannot include the altitude data normally accompanying this transmission. Heck you’re even limited to the amount of times it can transmit in an hour. 7 I think it was

    2. I don’t really know the application, but 12 Bytes in Sigfox allows you to do quite a lot. For my garden, I got air temperature, air humidity, soil moisture, tanks’ water level, wind speed, light, and some alarms if something goes wrong (and still some bits available). Plus if you really want, you can do multiple uplinks. Sigfox is thought for large scale deployments running 5, 7 or 10 years on primary batteries, not for constant real time updates.

    3. You’re right about signal reception not being available everywhere inside that 9km radius. And like SigFox, LoRa is also limited (albeit to a lesser extent) to the amout of data you can send because of ISM limitations on the time you can spend transmitting in a frequency band.

      You can get much cheaper gateways, check out the WisGate Developer D0 from RAKwireless which is ~$100. As for serving the community, you can link your gateway into TheThingsNetwork — that’s what I ended up doing after playing around with ChirpStack for a while.

  2. That’s an application which Packet Radio was originally used for.
    It used to span the world on amateur radio.

    It’s repeaters, so called digipeaters (Digis), could be used as a springboard (to contact stations not directly in reach).

    And they had backup power, often, to keep working in a blackout.

    They also had high-speed link paths (radio links) from digipeater to digipeater.
    Many used internet links, as well, but merely as an addition, not a substitute.

    In Germany, we had PR on CB Radio, too.
    Ch24/25 originally, AFSK/FM.
    We added features like DAMA, to minimize collisions.

    These were exciting times. Kind people, building TNCs and radio modems at home/together as a group.
    Sending messages, transferring files as 7Plus packets.
    Checking the digis for new users via MHEARD command.
    The feel of total independence from the internet..

    Today, many sound modems support FX.25, an extension with forward error correction. Like Direwolf, Soundmodem.

    Unfortunately, no one seems to really care anymore. It’s all about Hamnet, New Packet Radio and LoRa these days. And the ubiquitous TCP/IP protocol. Because: Because.

    LoRa is remarkable, I think. LoRa apparently seeks out to simultaneously dest.. supersede both local PR-style networks of the past (off-grid nets etc; as in this article) and of course, the only other remaining Packet Radio use case, classic APRS on 2m band, as well. Great.

    PS: My apologies. I must be sort of a weirdo in these times, it seems. My German fellow citizen do have a different point of view, likely. I don’t mean to put them in a bad light here, thus.
    They love proprietary and commercial stuff as much as you, are good consumers, pay taxes, aren’t as sentimental about self-reliance, homebrewing, patent-free modulation types or indepence from industry in general etc. 🙂👏

      1. That’s not my point, though.
        APRS was the last application left for Packet-Radio/AX.25 after classic Packet-Radio networks nearly died out*. It was open, AFSK/FM wasn’t patented. LoRa is.

        And last but not least, building your own AX.25 KISS TNCs used to be fun.
        – There was/is so much someone could possibly learn about fitlters, algorithms, noise tolerances etc. It was fascinating, I think.
        There are/were many projects for PICs, AVRs etc by the way.

        And since AFSK is just audio with a low bandwidth, it isn’t/wasn’t limited to a specific radio technology (like LoRa).
        It was able of being transported via telephone line, via sonic waves, via infrared, via laser link, via I don’t know..

        (*which had several causes, I think. One was the focus on high Baud rates and FSK on the amateur bands at the times. Only a few higher-end transceivers had a DATA port installed, however. Ordinary radios didn’t. They could only AFSK without tricky modifications; like tapping FM discriminator. That’s why amateur Packet-Radio died out after the switch from 1k2 to 9k6. That’s why CB Packet-Radio outlived amateur PR by a few years in my place also; it was AFSK all the time. Anyway.. With modern SDRs and FX.25, Packet-Radio could be better than ever! Using FSK is no problem anymore with SDR. Too bad no one cares. 😢)

        PS: I do already regret writing so much. I should have written an one liner instead, to reduce a possible working surface.. 😒

        1. I’m looking at it that I can get a LoRa radio for far less than a APRS TNC kit. I think a tracker minus case and battery was sub 40 thats an ISM level radio, wifi, BT, GPS, ESP32, charging circuit including PV, temp/pressure sensors, PPS output, and probably missing a few. All on an extendable platform.
          We have to get past re-creating everything every time. Hams can add a bit of power to the ISM board filtering etc and still learn at the RF level (LoRa with 44dbm aka 25w and a decent antenna is amazing range wise) but if we keep ourselves to 70’s level tech that you can get with through hole components were destined to fail. To many hey I made a poor AFSK en/decoder and left it at that projects. These little boards support KISS and are drop in replacements for existing higher up APRS gear now but can also support modern methods like MQTT.
          APRS from the big 3 has turned into a walled garden and the 2nd tier Chinese shops are following suit. There is only one production HT with a built in APRS TNC that has external access to it and it’s a noname Chinese model only one mobile thats fully functional and thats a closed source no external access mobile that happens to have a phone app. Neither have great RF sides.
          I dont see the proprietary nature of LoRa as a huge issue when it’s pennies to get a licensed chip. Far cheaper than AMBE. Running M17 over them with great results re digital voice.

        2. Having access to this technology should not stop people from experimenting with the basics of RF. But as you quote projects using PICs and AVRs — those are also patented technologies. Yet that doesn’t stop us from using them as building blocks to create awesome things. I feel the same can be valid for LoRa and other closed technologies, that can live alongside open ways of using the ISM bands.

  3. 50000 baud (found in the first link) is about 6KiB/second if only one person is accessing it, and that will drop much lower fast if more machines are accessing it. I guess how useful this is to you depends on what you need it to do with the data. To put that in context the image in the article above ( lorawan-main.jpeg ) is 245kiB would take 40 seconds to transfer. And this page is currently about 80 KiB (just for the text) so it would take minium of 55 seconds just to transfer the bulk of this web page page.

    I’ve always seen LoRa as something that has a very long range, but with an extremely low data rate, if you want to achieve the maximum range.

    1. There are airtime calculators and if you really care you could ping a sensor to signal it can now send data safely. I don’t know what poll intervals you personally would want, but (60 seconds) / (120 milliseconds) = 500 transfers per minute. With 13 channels a multiple of that too. I can see that you could fit hundreds of devices in there with ease if you channel hop and use a ping-reply-style system.

      120 ms is for 64 bytes btw at a Spreading factor 7. LoRa was not built for continuous transmissions.

      1. You can’t do 500 transfers per minute. You’re only allowed to be on the air for 1% of the time on an hourly average on the 868 MHz band because it’s a free-for-all ISM band. Frequency hopping within the band doesn’t count. That’s 36 seconds in an hour, so you don’t have enough air time to transmit even a simple JPEG.

        That comes from FCC/EU regulations that try to keep the bands usable, so you have some fighting chance of getting a packet through. Congestion management is the weakest point of LoRaWAN because there can be non-compliant devices that simply interfere with the stuff you do. Everything from personal weather stations to car keys, garage door openers, industrial microwave ovens etc. exist on the same band.

        The point of the system is to get a short burst of data through every 5-15 minutes with the possibility that you won’t hear from the device for days at a time, for things like smart meters and environmental sensors. You technically can do continuous transmission, but then you have to limit the transmission power to stay within the regulations and then your range drops to a hundred meters or so.

        1. How is this an actual thing my tango two transmits Lora for up to maybe 7 min at a time up to twelve depending on my drone and the drone is also transmitting the entire flight time all the data back to my radio? I mean I avarge on big boy 13 minute flights up to 20km away both sending And receiving data for the entire flight

    2. Why would you ever need to transmit that much data ? LoRa is for low power IoT devices. You can’t expect to transmit 36s per hour and stay low power.
      If you transmit 1, 10 or even 100 Bytes, then you don’t care about bitrate. And that is the way LoRa is intended to be used.

          1. There are many similar cases, such as sending over configuration data, new network authentication keys, etc.

            Then there’s cases where you do actually have more data to transmit. Suppose for example that you have a sensor, which measures the vibration of a machine shaft, and once it goes above some threshold it collects a couple seconds of audio and sends it over to a central server to be analyzed. Saves the technician from having to go over and conclude that it’s a false alarm.

  4. I want the equivalent of echolink – but for texting. How cool that would be. Something not based on APRS – but where you could set up a little packet station which would be interfaced to internet, and route your texts from there. All kind of neat possibilities.

  5. We could really use an explainer of LoRa vs LoRaWAN, the ownership and restrictions of each (what’s the SDR and IP situation with each), how Sigfox fits into it, etc. I feel like LoRa appeared out of nowhere and was just accepted despite being patent-encumbered, in a lot of applications where plain FSK modems worked just fine.

    This is suspicious to me.

    1. I think that LoRa/LoraWAN is a fascinating technology to experiment and play with, but like you it worries me when people start to build entire networks (infrastructures) with it.

      I mean, imagine if it sorta works and some optimistic hackers/experimenters start to use such a network for more critical tasks.

      Like using it as a communication link with their kids, or a bed ridden family member. Or to remote control the plant watering, the cat food dispenser or use it to track their pets.

      What if such a network initially works, but collapses out of the blue without a warning, maybe because too much traffic/too much stations start using it one day ?

      Then, said kids or bedridden family member can nolonger call for help, the pets and plants will be starving..

      That’s just a hypothetical scenario each, of course.

      But people these day don’t do long term testing anymore. They watch TikTok or a Life Hack on YouTube, do a quick check once and then just continue to use the technology/hack without further consideration.

      LoRa is, for me, the prime example here. It appeared almost out of nowhere and tries to overtake everything at once over night.

      Again, I don’t mean it’s bad from a technological point of view. The technology itself, the modulation type, is indeed interesting.

      But the patent situation, the availability of chips, the dependency on one or two LoRa transmitter chip makers.. It’s not so nice.

      Then there’s licensing/legal situation. Other radio bands like CB/HAM/PMR/.. are officially accepted by many countries.

      These bands are protected by national telecommunications agencies against intruders/interference. If there’s a problem, the agency will support users of said bands if they’re in need. Their personal/field staff will often be friendly even and give useful advices/tips.

      LoRa doesn’t have this. It’s an ISM band, were each signal fights the other. It’s survival of the fittest, wild wild west..

      Again, nothing against the technology itself. I just think it should be used with care, especially if it’s about building an infrastructure.

      1. >LoRa doesn’t have this.

        Yes it does. If there are ill behaving transmitters on ISM frequencies, the authorities can and will track them down. It just may take some time for them to react to individual cases.

    1. Thanks for the recommendation! However that picture is more for artistic effect, what isn’t visible is the HUUUGE cell tower infrastructure behind our gateway that extends far taller and offers some shadowing.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.