Welcome to the LoRa thread. Here I'll talk about LoRa, a modulation used in RF communications that is a game changer for certain applications, and about my work on a LoRa based WAN protocol and implementation: my open source project called FreakWAN.
An obvious way to communicate wirelessy is to use WiFi or Bluetooth, but these technologies require an access point (WiFi case) and the range is limited (for both). So, in order to communicate point-to-point over ISM (open to all) frequencies other techniques are used.
You digital thermometer, car key or gate remote are likely to use either OOK or FSK modulations. The first will just transmit or stop transmitting in patterns in order to tell 0 from 1, while the other will move between two near frequencies F1 and F2 to also communicate bits.
OOK and FSK require cheap ICs to work, however they will not go over 100 meters, or even less. Not ideal for certain applications. So, using the idea of chirp modulation, a few smart folks created and patented a new modulation called LoRa (LongRange) whose name states the goal.
LoRa uses a very large bandwidth to communicate very slow signals: that's the key of the distance records it can achieve. The carrier signal is moved linearly from two F1 and F2 frequencies (at the edges of the bandwidth) to build a very resilient modulation.
To give you an idea of how far you can go, yesterday I was on top of the Etna, and with a device that sends 17dbm, battery powered, in my hands, with the stock antenna (the whole device costs 17 euros) I could write messages to my friends in Chiaramonte Gulfi and Palazzolo: 70 km
The data rate, with the settings for maximum range, is terrible, but that's a fair compromise. It takes one second of "time on air" to send a small message with an attached header. However the communication is very reliable.
So upon the LoRa raw modulation many stuff were created. LoRaWAN is the "official" effort, but is a very complex monster in my opinion. There are also a few open source projects to create chats over LoRa networks, building small WANs.
How to build a WAN? Well, that's simple: each device will repeat the messages it receives, thus if there are even more distant devices, they will pick-up the signal, and so forth. However the channel time is very limited because the data rate is so low, so care must be taken.
Btw, how all this is done, in practice? Well, you need some kind of microcontroller, like an ESP32, and a LoRa chip module like the SX1276 or the newer and better SX1262. What I use is the LILYGO devices: ESP32 + OLED + LoRa chip combined together. In a few there is a GPS too.
So there is the (cheap!) hardware and there is an incredible RF protocol that can go so far, I and my friends here in Catania (and other parts of Sicily) wanted to try it. I was not happy with the current OSS projects I found around, so I started my own one: FreakWAN.
FreakWAN is both a protocol built over LoRa, and its implementation in the form of a chat system. It supports messages retransmission, acknowledge, relaying, encryption and so forth. It is written in MicroPython. You can find it here: github.com/antirez/freakw…
However even if it shows a chat, the FreakWAN protocol is designed to support other IoT applications: distributed sensors, home automation, whatever you want. My goal is to showcase other applications building a thermometers network with hardware design and so forth.
Well, among deep learning experiments and now FreakWAN I had to learn Python. It's not my preferred language, but MicroPython as an ecosystem for ESP32 (and in general embedded development) is quite neat. I would say the real problem is memory usage, and not speed.
That's all, basically. I had tons of fun so far, and look forward to build an actual small WAN here near Catania, that can be used to communicate in case of disasters, or (much better) just for fun in an impossible to censor and amateurs-run network.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with ANTIREZ antirez@mastodon.social

ANTIREZ antirez@mastodon.social Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @antirez

Feb 26
Ok folks better to write a thread to make things more clear. A few days ago I wrote that the new LLM released by Meta is not open source. Many people replied that I'm dumb and of course it is open source, the license is GPL. Remember the following words: AI IS NOT CODE.
The code part of AI, is only a set of tools needed in order to implement the algorithms described in the papers. The final result of AI (talking of neural networks, at this point 99.99% of what matters), that is the weights, is not code in any way, of course.
So while the tools to work with AI are valuable and useful, the point about AI is: 1) Papers describing new ways to train neural networks. 2) Hardware + GPU time, in order to train models. The models that will change our society can't be trained by individuals on their PCs.
Read 5 tweets
Dec 31, 2022
Flipper Zero: The Thread. I received a Flipper Zero a few days ago, and since I'm idling here at my parent's house, for the holidays, I spent a lot of time playing with it. This thread captures my impressions about the device.
First: the Flipper should put many hardware companies to shame. The user experience is *so* good. Everything works well at the first try. The Android app immediately connects with the device and updates the firmware. It can stream the screen in real time, access the file system.
The battery is already charged when you get the device. The animations are great, the applications well designed and it never crashes despite the fact it is still beta code. A few selected coders and designers shows how much big companies suck at designing hardware and software.
Read 19 tweets
Dec 20, 2022
Sometimes I like to rediscover algorithms from scratch. Years ago I blogged (in Italian language) about the algorithm to enumerate the permutations of N elements recursively (oldblog.antirez.com/post/102). Yesterday I wanted to re-discover the equivalent lexicographic algorithm.
The algorithm is well known and very used in practice, so why tweeting about it? Because when you do the exercise of rediscovering algorithms, you develop an intuition about why it works. This intuition helps to remember the algorithm forever even if you are just told about it.
The lexicographic algoritm for permutations is cool because it is completely stateless. Given a sequence of N elements ABC, it is composed of just a NEXT() function that emits the next permutation of ABC so that lexicographically no permutation exists between ABC and the new one.
Read 12 tweets
Nov 8, 2022
We often say: that were the cool times! The one of the Commodore64 and 6502 coding, where every instruction counted, every cycle, every byte of memory. Not now, where junior programmers burn gigabytes and seconds of CPU time to emit a single web page! [Boomer voice]. But...
We can make things like this again. Force your managers to understand carbon footprint of the software you are using and building. Don't put just scalability in the mix, but also performance per watt. This way we can help the environment and return to a more sane coding approach.
When I was in charge of the Redis code base, over the years I spent many days to optimize the CPU usage of idle Redis instances. You know? Redis is so massively popular that there are a huge number of idle instances everywhere. Imagine the cumulative environment cost of all that.
Read 5 tweets
Nov 5, 2022
Ready to have fun with a software design exercise? Before even looking at how Mastodon works, try to design, just on paper, a decentralized Twitter replacement following the following steps:
Two architectures:

1. Peer to peer (P22)
2. Decentralized servers with a few accounts each (DS)

For P2P, you are allowed to use N "helpers" in form of servers with known IP address, with N small (max 30). Even if just a few are alive, things must work. Use only for discovery.
For DS, is it possible to scale very big users (with many followers) so that they don't require to stay in big servers? How can other servers help?

For P2P, try finding a gossip protocol that helps with data distribution of small and large users.
Read 8 tweets
Nov 4, 2022
I think I need to clarify my tweet about layoffs. I don't mean that people jumping from an IT company to the other, with the goal of getting more and more money, are always *the same* affected by the current layoffs. I'm sad for who loved their job and was recently fired.
What I mean is that we collectively created this situation: by asking for a lot of money without caring about social consequences, on one side, and with an absurd money flow leading to over-hiring on another side. But then if you zoom on the individual, you find everything:
You find, for example, the case of the developer staying for many years at Twitter because they trusted on the social mission of the platform. And to see them fired, especially because of the RSU mechanism, is super sad, of course.
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(