[HN Gopher] Building a private LoRa network (2017)
       ___________________________________________________________________
        
       Building a private LoRa network (2017)
        
       Author : Tomte
       Score  : 197 points
       Date   : 2022-11-16 11:34 UTC (11 hours ago)
        
 (HTM) web link (os.mbed.com)
 (TXT) w3m dump (os.mbed.com)
        
       | cozzyd wrote:
       | We deployed a private LoRa (and also an LTE) network on the
       | Greenland ice sheet for one of our experiments. We use LTE for
       | data transfer and LoRAWAN for housekeeping / control (and leave
       | it on during the winter when we have no solar power and are
       | basically just monitoring our batteries). We are taking full
       | advantage of our remote location and Greenland's nebulous ITU
       | region to have them in almost the same band (using LTE band 8 and
       | LoRa in the US ISM band).
       | 
       | The most annoying part was porting LoRaMAC to the samd21, since
       | getting the timing reliable was a bit of a pain. We used the
       | sx1272 as our radio.
       | 
       | We use a Chirpstack backend, which handles authentication and
       | such and passes the unencrypted the LoRaWAN messages over mqtt,
       | which we subscribe to, decode, and stick into a pgsql database on
       | our server on the ice sheet. We then use log shipping replication
       | to get a replica of the database to a server sitting in our lab
       | where we are not bandwidth constrained for monitoring.
        
         | ilyt wrote:
         | What range and with what kind of antennas/power level you're
         | getting?
         | 
         | > and LoRa in the US ISM band
         | 
         | that's 900MHz right ?
        
           | cozzyd wrote:
           | So far our farthest stations are about 5 km away from our
           | base station. The RSSI is around -111 dB, this is using ~20
           | dBm transmit power and 8 dBi omni antennas on both sides
           | (plus of course a few dB of cable loss). Yes, this is in the
           | 915 MHz band.
           | 
           | We tested our LTE network out to about 9 km and it worked,
           | and LoRa should have a better link budget. The frequency is
           | roughly the same.
        
       | snthd wrote:
       | It's patented and proprietary, please don't use it.
       | 
       | Alternatives: https://en.wikipedia.org/wiki/Low-power_wide-
       | area_network#Pl...
        
         | syedkarim wrote:
         | Why should we not use something that is proprietary? Every
         | transceiver IC in the world is proprietary.
        
         | [deleted]
        
         | furtiman wrote:
         | While the LoRa radio modulation (phy) is licensed by Semtech,
         | the MAC layer protocol - LoRaWAN is completely open and is free
         | to be used, implemented and tinkered with. https://lora-
         | alliance.org/
         | 
         | Many implementations are also open-source, like The Things
         | Stack from The Things Network. It can also be run locally.
         | 
         | https://github.com/TheThingsNetwork/lorawan-stack
        
           | generalizations wrote:
           | I'd want the entire stack to be open and free. When Layer 1
           | is closed and proprietary, I don't really care if I can build
           | open source on top of it, in Layer 2.
        
             | runjake wrote:
             | Is this not the case with existing computers and phones? We
             | build and run OSS on top of them.
        
               | generalizations wrote:
               | It is, and there is a lot of effort being expended to
               | remediate that - there's a reason why some people use
               | pre-2011 thinkpads. I think it would be pragmatic in new
               | endeavors to do things right and correctly from the
               | start, so that remediation isn't needed later.
        
               | runjake wrote:
               | There have been many commercial and crowdsourced attempts
               | to do so, with variable levels of success.
               | 
               | Do you buy or participate in those?
               | 
               | I care, but not enough to leave my iPhone (more
               | specifically: the functionality, usability, and
               | reliability it provides) behind, at this point.
        
           | anfractuosity wrote:
           | Was Chirp Spread Spectrum developed prior to LoRa itself out
           | of interest? I had a little look at
           | https://en.wikipedia.org/wiki/Chirp_spread_spectrum but
           | couldn't really tell.
           | 
           | I was under the impression that other modulation schemes such
           | as FSK etc. can also perform similarly to CSS in terms of
           | data rate etc. and distance?
        
         | khimaros wrote:
         | any specific recommendation? it seems like all of these
         | alternatives have tradeoffs and LoRa really does seem to tick
         | more boxes than the others.
        
           | snthd wrote:
           | I don't, sorry.
           | 
           | It's a few years since I researched it, and I didn't build
           | anything.
        
         | HideousKojima wrote:
         | From that list of alternatives, which of the open ones have the
         | widest adoption/support?
        
       | delabay wrote:
       | Now do the same for Helium!
        
       | [deleted]
        
       | b800h wrote:
       | As this operates in the "Open Spectrum" I suspect it's very
       | geographically constrained, as the spectrum is allocated
       | differently from country to country. I would have to check but
       | I'm not sure there's an equivalent in the UK, for instance, which
       | you could operate without an amateur radio license.
       | 
       | EDIT: Scratch that, looks like there's a frequency it can use in
       | the UK:
       | 
       | "Both LoRa(tm) and LoRaWAN(r) use the 868Mhz radio frequency that
       | is license exempt in the UK. This doesn't mean you can use this
       | frequency as you like. There is set a set of rules defined by EU
       | ETSI EN300.220 (pdf) the most pertinent of which is the duty
       | cycle that defines for how long a transmitter can transmit."
        
         | gpvos wrote:
         | Same as the article says to use in Europe. Probably an EU rule
         | that carried over.
        
         | [deleted]
        
         | furtiman wrote:
         | I'm from The Things Industries and The Things Network team.
         | LoRaWAN standard specifies regional parameters, that is -
         | specific ISM spectrum bands for every region where LoRaWAN is
         | used. All of the regional parameters are supported by The
         | Things Network and The Things Stack, you would only need to get
         | hardware that has the radio of the frequency you need. It is
         | specified in here
         | (https://www.thethingsnetwork.org/docs/lorawan/frequencies-
         | by...) and in LoRa Alliance standard https://lora-
         | alliance.org/wp-content/uploads/2021/05/RP002-1...
        
       | comboy wrote:
       | Anybody played with Mikrotik KNOT LR8 kit? I like them but it's
       | new and I want something reliable when I'm learning
        
         | furtiman wrote:
         | I can confirm it works well, Mikrotik have good experience in
         | LoRa gateways and have been in the market for quite some years
        
       | mactunes wrote:
       | I recently got interested in installing a TTN gateway in my home
       | and adding some temperature sensors.
       | 
       | Having played with LoRa years ago my thought was that there
       | should now be readily available and cheap sensors. But to my
       | disappointment everything seems to be a bit pricey which really
       | surprised me. I can get a Zigbee temp sensor for around 15 euros,
       | but Lora sensors cost around double that. I am wondering as to
       | why that is?
        
         | SirMonkey wrote:
         | This is pure speculation - I have no prove. I believe is also
         | due to the target buyer: afaik the biggest adopters are
         | municipalities and not general consumers.
        
         | extra88 wrote:
         | The market for Zigbee products is likely much larger so per-
         | unit costs are lower.
         | 
         | Also, it seems LoRa is proprietary and patent-encumbered while
         | Zigbee is an open spec.
        
           | ilyt wrote:
           | Still need to pay up if you want to sell zigbee devices
           | 
           | https://e2e.ti.com/support/wireless-connectivity/zigbee-
           | thre...
           | 
           | ...which is also the reason Zigbee is more pricy than random
           | wifi enabled gadget
        
             | Tijdreiziger wrote:
             | Zigbee can't be _that_ expensive, since you can pick up
             | IKEA TRADFRI Zigbee bulbs for around EUR6 a piece.
        
       | bullen wrote:
       | The problem with LoRa is that you can't (or atleast shouldn't)
       | control the frequency from software.
       | 
       | Which is exactly what you want. Also the frequency band is a bit
       | too narrow and short ranged for real earth applications.
       | 
       | LoRaWAN is terrible because you move into the overengineered and
       | heavy IP stack... the other way is better: build your own "from
       | scratch" network topology in software.
       | 
       | Fossilization is only good _after_ you prooved the concept.
        
       | rexreed wrote:
       | I am fascinated by LoRa, but I understand it is primarily for low
       | bandwidth applications that are optimized for high range, low
       | power consumption. I'd imagine LoRA would be a good alternative
       | to SMS but would it ever be an alternative for voice or higher
       | bandwidth applications while still maintaining long range and low
       | power?
        
         | sifar wrote:
         | Me too. I envision a pebble like smartwatch or an eink phone
         | with Lora.
         | 
         | Lora on 2.4 GHz can probably provide the higher bandwidth
         | required for voice albeit at a lower range compared to the sub-
         | GHz version. look up SX1280.
        
         | superkuh wrote:
         | No radio transmission that is above 30 MHz or so is really
         | "high range". The modulation doesn't matter. The only thing
         | that matters for range in non-ionospheric bouncing radio
         | transmissions is the height above surrounding terrain of both
         | ends of the link.
         | 
         | SMS works because the cell phone companies pay the big bucks to
         | their base stations up very high above surrounding terrain.
         | 
         | There are transient exceptions like atmospheric gradients in
         | water vapor density creating brief tropospheric ducts which VHF
         | radio can bounce down but these are unreliable. And
         | tropospheric scattering propagation requires very high powers
         | and high gain antennas at both ends so it's not really feasible
         | for people operating under FCC part 15 or even ham radio power
         | restrictions (ie, <1500 watts).
        
         | linsomniac wrote:
         | If everyone having a phone in their pocket at all times has
         | taught me anything, it's that people hate talking to each other
         | over the phone... :-). LoRA/Meshtastic seems like a really
         | interesting SMS transit.
        
         | FL410 wrote:
         | Nope, it's not meant for that. Think low-bandwidth, small
         | transmissions with highly compact but valuable data (sensors,
         | actuators, etc). Even with LoRa as-is, changing settings to
         | optimize for bandwidth costs you real range.
        
           | kkielhofner wrote:
           | Exactly. Not LoRa but an example of what these modules and
           | low bandwidth can do.
           | 
           | Many years ago (pre-LoRa) I needed to integrate a garage door
           | that was far out of Wifi range to my home automation system.
           | 
           | At the time the way to go about this was (as best as I could
           | tell) XBee. I was able to conjure together a 900 MHz XBee
           | module in the garage that not only had (essentially) GPIO to
           | activate a momentary relay to simulate a button push to
           | control the door but also utilize an XBee feature called
           | change detection that has an eventing/push system to transmit
           | state changes from high to low on a pin. Combined with a
           | magnetic door contact sensor and XBee + ESP 8266 + Arduino
           | (platform for ESP 8266, not device) + MQTT on the Home
           | Assistant side this thing has been running rock solid for a
           | decade. I haven't had to work on it since.
           | 
           | Whether I check the status of the door (via Home Assistant or
           | the OLED display on the control unit inside) or open/close
           | the door via the momentary switch inside (or Home Assistant)
           | even though it's been 10 years at least once I week I remark
           | at how amazing the entire contraption is.
           | 
           | This stuff is really cool and maybe it's time to move this
           | thing to LoRa!
        
             | ilyt wrote:
             | Probably not worth it, Zigbee is literally designed for use
             | case like that, LoRa is designed for use cases where you'd
             | have much wider geographical spread of sensors.
             | 
             | But something like solar powered sensor somewhere farther
             | away would be a good use case.
        
           | moffkalast wrote:
           | Speaking of costs, are the public gateways actually free to
           | use or does one need something like a sim card to use them?
           | What prevents people from spamming messages at rates that
           | completely clog the network?
        
             | SirMonkey wrote:
             | If we are talking about the radio spectrum: Not much -
             | other than the threat of the regulators showing up at your
             | doorsteps after they found you with a van. If you are
             | talking about the backbone so to say, it's not such a big
             | Issue. The original packet-forwarder sends "json" over UDP.
             | If you are using a packet-forwarder by one of the network
             | operators, some of them are using MQTT (IP/TCP) as the
             | transport.
             | 
             | Some gateways let you filter by network_id, this will not
             | stop someone from pulliting/disrupting the radio spectrum,
             | but it will stop your gateway from relaying those packets
             | to your network-server.
        
           | rexreed wrote:
           | What is the sweet spot in terms of bandwidth and packet size?
        
             | ilyt wrote:
             | https://www.thethingsnetwork.org/docs/lorawan/spreading-
             | fact...
             | 
             | There is none, there are only tradeoffs.
             | 
             | You're basically directly trading off range for speed and
             | power usage.
             | 
             | Quicker chirps allow for both higher speed and lower power
             | usage per byte transferred, but your range will be that
             | much lower
        
         | GekkePrutser wrote:
         | LoRa isn't even a good alternative for SMS. The duty cycle, at
         | least in Europe is too low to have a real-time conversation.
        
           | rexreed wrote:
           | By duty cycle are you referring to slow message latency and
           | small packet size?
        
             | GekkePrutser wrote:
             | No, here in Europe a device on the LoRa band 868Mhz can
             | only transmit 1% of the time by law.
             | 
             | Because this also applies to base stations the throughput
             | is highly constrained.
        
         | furtiman wrote:
         | LoRa is not a panacea, and of course any technology is best to
         | what it is intended. With its ultra low power and data
         | constraints LoRa is not aimed at high-bandwidth applications.
         | 
         | The perfect application is IoT, where a lot of use cases like
         | telemetry, agriculture, etc. require only small data packets
         | transmitted with longer (tens of minutes / hours) intervals.
        
         | m-p-3 wrote:
         | Personally I'd see some use in regional and low bandwidth
         | sensor data, like broadcasting weather station data.
        
       | furtiman wrote:
       | I made a similar guide and a walkthrough video about a year ago,
       | where I cover setup of gateway and TTN, creating a firmware for a
       | device locally, and a lot of other helpful steps and hardware
       | options
       | 
       | https://github.com/furtiman/5lic0-lorawan-basics
       | 
       | https://www.youtube.com/watch?v=A3cZSTfxmb4
        
       | prbs23 wrote:
       | I somewhat recently blogged about my process of setting up a
       | private LoRaWAN network as well.
       | 
       | https://prbs23.com/blog/posts/getting-started-with-a-private...
       | 
       | LoRaWAN is definitely an interesting mix of open source
       | implementations and open specifications, and proprietary poorly
       | documented hardware. Unfortunately I haven't had time lately to
       | actually use my network for anything real.
        
       | glonq wrote:
       | I just finished two-year project to build a sensor data
       | acquisition system that was based around private LoRaWAN
       | networks. Our custom gateway was Chirpstack running on a little
       | linux SBC connected to a RAK LoRa module.
       | 
       | It took some effort to solve congestion and reliability when the
       | network got busy.
        
       | varispeed wrote:
        
         | HackerNoods wrote:
        
           | cpach wrote:
           | Please don't create new accounts for the sole purpose of
           | writing comments like this. It makes for neither good nor
           | interesting discussions.
        
             | HackerNoods wrote:
        
               | m-p-3 wrote:
               | You should read this
               | 
               | https://news.ycombinator.com/newsguidelines.html
               | 
               | > Eschew flamebait. Avoid generic tangents. Omit internet
               | tropes.
               | 
               | > Please don't use Hacker News for political or
               | ideological battle. It tramples curiosity.
        
         | sokoloff wrote:
         | It's a relatively simple RF transmission protocol. We might as
         | well try to ban FM radios from certain countries.
        
         | gruturo wrote:
         | You're not entirely wrong, but it's a very common radio
         | technology, which anyone is free to use (even implement from
         | scratch, with enough skills) with very few restrictions (which
         | don't really affect state actors).
         | 
         | You may as well ban screws, lenses, explosives, radio, rubber,
         | chocolate and internal combustion engines with this line of
         | reasoning. What will it achieve? Russia won't stop using them.
        
           | actionfromafar wrote:
           | Well, some Russian car factory stopped because they couldn't
           | get screws. Also, they couldn't make their own screws,
           | because the screw-making machine had wear parts which they
           | couldn't get.
           | 
           | Of course they won't stop using these common components
           | altogether, but the idea is to increase the cost of waging
           | war.
        
         | nyadesu wrote:
         | Everything has potential for military use if you try hard
         | enough
        
         | m-p-3 wrote:
         | Even if they wrote down something about forbidding military
         | usage, there would be no way to actually enforce that if the
         | country doesn't care about license, EULA, etc.
         | 
         | So all that does in effect is absolutely nothing other than
         | political posturing.
        
         | Datagenerator wrote:
        
         | krageon wrote:
         | Please leave this sort of pandering somewhere where it makes
         | sense. Nobody comes here to read yet more state propaganda.
        
           | actionfromafar wrote:
           | _" Critical thinking is good; shallow cynicism, on the other
           | hand, adds nothing of value to the community. It is
           | unpleasant to read and detracts from actual work. If you have
           | something important but negative to say, that's fine, but say
           | it in a respectful way."_
        
       | janjongboom wrote:
       | Hey I wrote this :-) But back in 2016 or 2017, so some of the
       | practical stuff might be out of date.
        
         | dmix wrote:
         | How has LoRa adoption been since then? Any interesting
         | applications?
         | 
         | Edit: it seems DASH7 is more widely deployed and apparently
         | LTE-M is being pushed by telecom for IoT using existing 4G
         | towers
         | 
         | https://en.wikipedia.org/wiki/LTE-M
        
           | wienke wrote:
           | We gave an update on the state of LoRaWAN solutions and
           | applications here:
           | https://www.youtube.com/watch?v=vrHwgRnx6KQ&t=96s
           | 
           | EDIT: This gives a great overview of all the available
           | LoRaWAN devices out there:
           | https://www.thethingsnetwork.org/device-repository/
        
           | jimmySixDOF wrote:
           | CBRS LTE is also a thing if you have 3550-3700MHz
        
         | dang wrote:
         | Year added above. Thanks!
        
       | curiousfab wrote:
       | FWIW, for building your own _private_ network, there is no need
       | to rely on something like TTN (hosted by someone else - isn 't
       | that a contradiction in itself?). ChirpStack
       | (https://www.chirpstack.io/) is a very mature and easy to deploy
       | LoRaWAN suite that's worth looking at!
        
         | furtiman wrote:
         | Fair point. The Things Stack - the server that is hosted by TTN
         | - can also be installed and run locally for free, with the same
         | feature set as the TTN hosted community network.
         | 
         | https://www.thethingsindustries.com/docs/getting-started/ins...
         | 
         | https://github.com/TheThingsNetwork/lorawan-stack
        
       | FL410 wrote:
       | Whether you believe in the crypto aspect of it or not, the Helium
       | network provides really good public LoRaWAN connectivity in a lot
       | of places. Much easier than building out the whole network,
       | including gateways and the backend. The cool part is that the
       | LoRaWAN protocol allows you to keep your data totally encrypted
       | to your app, and still use public networks.
        
         | eikaramba wrote:
         | i actually build a device which is using both TTN and Helium
         | exactly for that reason. https://notific.at/en
        
         | AlexandrB wrote:
         | Unfortunately, I would not build a business that relied on the
         | Helium network because there's no way to tell if they're going
         | to be around in a year or two. The main alternative - The
         | Things Network - is quite popular in Europe but has less
         | penetration in North America, unfortunately.
        
         | asmithmd1 wrote:
         | Do you know of a tutorial for getting a small LoRa device up on
         | the Helium network?
        
           | delabay wrote:
           | You can start with the basic console documentation:
           | https://docs.helium.com/use-the-network/console
           | 
           | Helium is interesting because its literally everywhere in the
           | US and western europe, everywhere people exist that is (not
           | super remote mountainous regions).
           | 
           | I'd bet 99% of people reading this comment section have great
           | coverage.
        
       ___________________________________________________________________
       (page generated 2022-11-16 23:01 UTC)