In 2020, I was the first YouTuber to make
a video about “Meshtastic,” created by Kevin Hester. The project name was a merge between Mesh
and Fantastic. Already then, I loved the project. But why is it the “most dangerous LoRa project”? Here is the proof: My video was included in
a study titled “NETWORK-ENABLED ANARCHY” by an organization featured by the US government
under the topic “instructions for encrypted messaging”. So stay tuned when I show you what you can
do with it even if your profession is not “terrorist”. Grüezi YouTubers. Here is the guy with the Swiss accent. With a new episode and fresh ideas around
sensors and microcontrollers. Remember: If you subscribe, you will always
sit in the first row. My video was mentioned in the same sentence
as 3D-printed weapons. Why? Because Meshtastic creates encrypted LoRa
Mesh networks independent of any mobile infrastructure. Hard to detect and hard to observe. But if you do not plan to become a terrorist. What is in for you? First: Mesh networks are fun to play with. Plus, because of LoRa, they have a good range. And third, the project evolved and can now
be used with repeaters, with tunnels across the internet, and to transfer sensor data. And it supports a wide variety of devices—all
exciting stuff. Instead of explaining how it works, we build
a small network. I use three different devices: A simple TTGO
LoRa board connected to USB power, a TTGO T-Beam with battery and GPS, and a newer T-Eco
with an NRF52 chip and an e-paper display instead of an OLED. This results in a very low power consumption. It also contains a battery and GPS. First, we have to flash the Meshtastic software
to all devices. Fortunately, this is very easy: If your board
is based on an ESP32, go to this website, select your device and the requested firmware
version, and “wipe and reinstall the device”. If you connect your device with a USB connector
of the computer, you can select the proper COM port, hit “connect”, and “install”. After a few minutes, our two ESP32 devices
are ready. The T-Echo is programmed in two steps described
on the Meshtastic page: Erase the memory and program the new firmware by dragging two files
to the USB drive created by the T-Echo. Done. The programmed Meshtastic devices can connect
to a PC or Mac and to iPhones or Androids. A tip I learned the hard way: Use a different
Smartphone for each of your Meshtastic nodes. Otherwise, it is easy to lose the overview. In this video, I connect the LoRa board to
the PC because it anyway requires USB power and will later have a special function. The T-Beam is connected to the iPhone, and
the T-Echo to the Android. Like that, I always know where you change
settings and send messages. Before connecting our Smartphones to our devices,
we must install the Meshtastic app. You can find them in the respective app stores. For the LoRa board connected to the PC, I
use the web client hosted by the project team. It connects the LoRa board via the serial
connection. Cool. The T-Echo and the T-Beam must be paired to
the respective Smartphone by entering a six-digit number. Sometimes, this does not work the first time. Be patient and switch the Meshtastic node
off and on to start over. The device gets a name based on its MAC address. This name is essential because it appears
on all messages. As a first step, you have to select the region. Because I have 433MHz boards and live in Europe,
I chose EU_433. You must check the allowed frequencies in
your country before ordering your LoRa devices. Their frequency range is fixed. Sometimes, you get devices with preloaded
Meshtastic software. Because the project moves fast, I would reprogram
it with the newest firmware before starting. This cloud with a tick mark shows if your
phone is connected, BTW. Now, we can go to settings to choose what
we need. A tip if you do not know how to navigate the
Android app: A left sweep is the “back” function. It took me a while to find it. The app on the iPhone looks different but
has the same functionality. And an arrow for “back”. Now, we are ready to rumble. Your Smartphones should show three nodes,
and you should know their names. This is because Meshtastic has selected a
default combination that works out of the box. We can start to exchange messages between
the two Smartphones. And no, the smartphones do not need to be
connected to any network. You can turn off mobile data and Wi-Fi if
you want proof that Meshtastic only uses the built-in LoRa transceivers. Just keep Bluetooth enabled. You can send a message to all or only to one
device and, if successful, get a tick mark in the cloud. This is possible because we use the “primary
channel” and the “LongFast” profile. The profile is used to tweak the radio settings. LongFast is a good compromise between range
and transmission speeds. They offer other profiles if you want to play. The different channels can be used to create
privacy. Frustration can occur if your radios do not
have the same settings. This is why Meshtastic introduced a QR code
that distributes all channel information between your nodes. I highly recommend using this method. Because my LoRa board connected to my PC has
no camera, I create the QR code there and use the Smartphone cameras to transfer the
channel info to the other two nodes. So, we created a mesh network with three nodes. What is the typical range of such a network? As a rule of thumb: LoRa works very well if
there is a line of sight between two nodes. In video #120, I could bridge 203km with similar
modules. I also show how to simulate the range of a
particular node. And I regularly get messages from small LoRa
satellites 2000 km away. You also find videos on how to build performing
antennas on this channel, BTW. Even by using a Harley Davidson for the job. But LoRa does not work well if there is no
line of sight. With meshes, the chance to get a line of sight
between two nodes becomes bigger with the number of mesh nodes. And, of course, if we place at least one node
on a hill or a tall building, the chance for a line-of-sight connection increases a lot. But more about that later in the video. What if we want to connect to our buddy in
a different town? No problem. Meshtastic provides a free MQTT server on
the internet to connect all users of Meshtastic. But how can we connect to this server? We have to connect to the internet, of course. But, if our board uses Bluetooth, it cannot
connect to the internet with Wi-Fi. And the NRF52 does not offer Wi-Fi at all. Fortunately, the project team had a marvelous
idea: If you enable “MQTT Client Proxy” in the MQTT menu, your Meshtastic node uses
the internet connection of your Smartphone! Very clever. As soon as you enable MQTT and the client
proxy, as well as up- and downlink on the channel, you should see messages coming from
unknown sources, and you should see many new nodes. This is possible because the default credentials
of the mqtt server are already populated. Seq messages with a number are “spam”,
BTW. They are range-test messages of people who
do not know what they do. On the iPhone app, you can flip a switch to
mask them out. I do not know if this feature already exists
on Android. Now, you can start messaging with a stranger
or, if you find your friend, start a conversation with him. Of course, this method depends on the internet
and is unsuitable for emergencies. But still, it is handy and fun. For more privacy, you could create your own
MQTT server and connect your meshes to this server. I promised that we would talk about nodes
placed at a good location. Meshtastic offers a particular role for such
nodes: Router or its simpler sibling, repeater. Because of their excellent position, they
are preferred for message transfers. They usually are not used to creating and
reading messages. This fits perfectly with our LoRa board without
batteries and without a Smartphone connection. It becomes our router and extends the range
of our mesh without internet access. Adding solar panels to such a node can run
it for at least the whole summer without attention, and it can serve a wide geographical area. If you have internet access at the router
on the hill or the tall building, you can enable MQTT there and connect your entire
mesh to an MQTT server. An extremely useful function because none
of the other nodes or Smartphones need internet access. If you do not want to use your Smartphone,
you can buy or build a standalone device with a display and a keyboard. The last feature I will mention is the possibility
of attaching sensors to a node. This greatly extends the options because you
can place sensors everywhere, even if the “hub” has no line of sight to all nodes. Other mesh nodes then automatically relay
messages from “invisible” nodes. And as a last resort, you can place a router
or repeater in a good place. The sensor nodes, of course, do not need a
Smartphone and therefore are cheap. Our T-Beam and T-Echo have a built-in GPS
“sensor”. So they can transfer your position if you
want. And if your node has no GPS, you can use the
one of your Smartphone. Again, clever programming! And finally, you can connect node-red to the
MQTT broker and get the sensor readings for automation and reporting. So,
- We were able to create a mesh network consisting of three nodes
- The typical range of such networks is enormous if there is a line of sight between nodes,
but only small, if not - We tried two ways of extending the range
of our mesh - With a router or repeater on a hill or tall
building, we can significantly improve the range of our mesh without connecting to infrastructure
- By linking to an MQTT server on the internet, we can extend the range to the whole world
- If we connect sensors to nodes, we can create a mesh of sensors. The most prominent sensor is GPS, which shows
you the position of your buddies - If you use the Node-Red integration, you
can use the sensor readings in your automation or reporting
- I did not cover the so-called CLI interface. It is particularly useful for provisioning
sensor nodes - It is no wonder that this project is widely
used and even preloaded on some Chinese boards One last thing: If you built your Meshtastic
node, we will meet on Channel 5 on the MQTT server. Just mention my name in your message. This was all for today. As always, you find all the relevant links
in the description. I hope this video was useful or at least interesting
for you. If true, please consider supporting the channel
to secure its future existence. Thank you! Bye