home · login to get plonkin'

slides-en

@astrra.space · 26d ago · plaintext · 429 loc · raw · 0 comments

1---2title: Meshtastic, An Encrypted Mesh Network Based on LoRa3author: アストラ | @astrra.space4date: 第122回ゆるいハッキング大会 2025-08-235---67When disaster strikes8---910<!--11speaker_note: | 12    Imagine a natural disaster hits your area. Home internet and mobile phone service becomes unavailable, making it difficult to communicate with others or access important information. In such situations, having a reliable and secure means of communication is crucial.1314    Now, imagine having a network of ¥5000 devices that can communicate for kilometers without relying on traditional infrastructure, with every node acting as a relay to let messages reach even further. This is where Meshtastic comes in. -->1516![image:width:100%](offline.png)1718<!-- end_slide -->1920What's a mesh network?21---2223<!-- 24speaker_note: |25    But let's start with some basics first. What's a mesh network?2627    Let's take a look at how conventional walkie-talkies work first. This is what we're all used to when it comes to wireless communication. Here, we have A-san, B-san, and C-san. A-san can talk to B-san directly, and B-san can talk to C-san, but A-san and C-san can't reach each other, their radios just aren't strong enough. 2829    But we can ask B-san, who can hear both of them, to relay messages from A-san to C-san, right?3031-->3233<!-- new_lines: 2 -->3435```mermaid +render +width:70%36flowchart LR37    A[Radio A] --- B[Radio B] --- C[Radio C]38    %% Only B is in the range of both A and C; A and C cannot directly communicate.39```4041<!-- pause -->42<!-- new_lines: 4 -->4344<!--45speaker_note: |46    What about now? Trying to explain to everyone in this mess what to send where would be basically impossible, especially since some of the people involved may not know about the state of the whole network, and have no idea where to send the message next so that it reaches its destination. This is what mesh networking is aiming to solve.4748    Mesh networks, at their most basic form, are just a way of automatically figuring out how to get a message from A to B in networks like this. Modern mesh networks can do way more: dynamically reconfigure themselves when one of the members moves and it's neighbors change, detecting and stopping packets from going in circles, optimizing for the most efficient path possible, and much much more.49-->5051```mermaid +render +width:100%52flowchart LR53    A1[1] --- A2[2]54    A[Radio A] --- A2[2]55    A2[2] --- A3[3]56    A3[3] --- A4[4]57    A3[3] --- A5[5]58    A4[4] --- A5[5]59    A4[4] --- A8[8]60    A5[5] --- A6[6]61    A6[6] --- B[Radio B]62    A6[6] --- A7[7]63    A8[8] --- A9[9]64    A9[9] --- A7[7]65    A8[8] --- A10[10]6667```6869<!-- end_slide -->7071What's LoRa?72---7374<!-- 75speaker_note: |76    Ok, so we have this cool networking solution, amazing. But what good is it when your phone can barely reach 50m of Wi-Fi or Bluetooth range? Unless you're in the middle of Tokyo and everyone around you also uses this network - you're not getting any connections.77-->7879<!-- pause -->8081<!-- column_layout: [53, 47] -->8283<!-- column: 0 -->8485![image:width:100%](lora_noise.jpg)8687![image:width:100%](lora_modulation.png)8889<!-- column: 1 -->9091![image:width:100%](lora_spectrum.jpg)9293<!--94speaker_note: |95    This is where LoRa comes in. LoRa (Long Range) is a wireless communication technology designed for long-range, low-power communication. It operates in the same sub-GHz frequency ranges as regular walkie-talkies, but uses a very different and clever modulation tricks to achieve something amazing - being able to recover data even if it is below the noise floor. 96-->9798<!-- end_slide -->99100What's LoRa?101---102103<!--104speaker_note: |105    This allows LoRa devices to communicate over much greater distances than traditional wireless technologies, often for kilometers or even more! Some people have even managed to achieve ranges of over 1000 kilometers in ideal conditions.106-->107108![image:width:100%](lora_range.png)109110<!-- end_slide -->111112What's LoRa?113---114115<!--116speaker_note: |117    This does, however, come with a set of disadvantages. The main one is speed - it is measured in kilobytes per second at best, sometimes in mere bytes. That makes it pretty unusable for real-time applications like voice or video, so we're mostly limited to sending individual packets of text.118-->119120<!-- column_layout: [1, 50, 1] -->121122<!-- column: 1 -->123124It's not very fast:125126| Spreading Factor | Chirps/symbol | SNR limit | Time-on-air (10b packet) | Bitrate |127|------------------|--------------|-----------|------------------------------|---------|128| 7                | 128          | -7.5      | 56 ms                        | 5469 bps (5.3kbps)|129| 8                | 256          | -10       | 103 ms                       | 3125 bps (3.1kbps)|130| 9                | 512          | -12.5     | 205 ms                       | 1758 bps (1.8kbps)|131| 10               | 1024         | -15       | 371 ms                       | 977 bps (0.977kbps)|132| 11               | 2048         | -17.5     | 741 ms                       | 537 bps (0.537kbps)|133| 12               | 4096         | -20       | 1483 ms                      | 293 bps (0.293kbps)|134135Transmitting the tiny (10kb) script to this talk on the longest-range mode would take approximately 35 seconds.136137<!-- end_slide -->138139What is Meshtastic?140---141142![image:width:100%](meshtastic_network.png)143144<!--145speaker_note: |146    And finally, time to introduce Meshtastic properly. 147148    Meshtastic is an open-source LoRa-based mesh networking solution, that uses cheap consumer LoRa radios in connection with your mobile phone or computer, to allow for encrypted long-range communication without relying on any traditional infrastructure. It creates a decentralized network where each device can relay messages, extending the range and reliability of communication even in challenging environments.149-->150151<!-- end_slide -->152153What is Meshtastic?154---155156<!-- 157speaker_note: |158    Initially created in 2020, it has rapidly spread around the world, with very conservative estimates (based !just! on self-reported node location maps) being in the tens of thousands of nodes deployed and active right now. It continues to grow at a very rapid pace, both in terms of user adoption and the development of new features and improvements. 159-->160161![image:width:100%](meshtastic_map_nodes.png)162163<!-- end_slide -->164165What is Meshtastic?166---167168<!--169speaker_note: |170    It also supports a very impressive range of hardware, from low-cost bare-PCB designs to more advanced devices with additional features like GPS and sensors. This flexibility allows users to choose the hardware that best fits their needs and budget, making it accessible to a wide audience.171172    This also means that it's very accessible - there are stores right here in Akihabara selling pre-built nodes ready for you to use, along with individual components for you to build your own.173-->174175<!-- column_layout: [10, 10] -->176177<!-- column: 0 -->178179![image:width:60%](node_1.jpg)180![image:width:80%](node_2.jpg)181182<!-- column: 1 -->183184![image:width:60%](node_3.jpg)185![image:width:70%](node_4.jpg)186187<!-- end_slide -->188189What can it do?190---191192<!--193speaker_note: |194    Quite a lot, actually! 195196    (open scrcpy)197198    First of all, of course, text chatting. Meshtastic allows users to create and share different "channels" for communication, which are sets of frequency slots (derived from channel name in a deterministic but random way) and encryption keys. One exception to that is the "default" channel, which every node has access to, and which has no encryption, since it is pointless to encrypt messages that are supposed to be readable by everyone around you. 199200    But that's not all! Along with the messages, nodes can share a lot of other metadata - their location, battery, state, sensor readings (for example, current temperature and humidity at their location), and more.201202    You can also configure different nodes to have different roles within the network, such as "relay" nodes that help extend the range of communication but don't participate in it themselves, or "sensor" nodes that focus on collecting and sharing environmental data without relaying anything to prioritize low power consumption.203204    This allows you to build intricately planned networks that are optimized for specific use cases, but it also gives you more flexibility in times of uncertainty or changing conditions.205206    For example, first responders can rapidly build out relay networks in disaster-stricken areas, allowing them to communicate with each other and coordinate their efforts even when traditional communication infrastructure is down.207208-->209210<!-- column_layout: [1, 1, 1, 1] -->211212<!-- column: 0 -->213214![image:width:80%](chat_list.png)215216<!-- column: 1 -->217218![image:width:100%](messages.png)219220<!-- column: 2 -->221222![image:width:100%](channel_list.png)223224<!-- column: 3 -->225226![image:width:80%](app_map.png)227228<!-- end_slide -->229230How to get started?231---232233<!--234speaker_note: |235    So, how do you get involved with Meshtastic if you want to try it out for yourself?236237    First of all, you need to pick a radio node. There's loads of options, but here are some of my favorites: <next slide>238-->239240<!-- new_lines: 2 -->241242![image:width:100%](repeater.jpeg)243244<!-- end_slide -->245246Heltec LoRa 32247---248249<!--250speaker_note: |251    The cheapest option you can get, starting at around ¥1200. Comes as a bare PCB+antenna set, so you'll either need to power it via USB or add your own battery. Pretty good to dip your toes for the first time, but you'll need to do a bit of DIY to get it up and running.252-->253254<!-- column_layout: [5, 5] -->255256<!-- column: 0 -->257258259![image:width:100%](lora32.jpg)260261<!-- column: 1 -->262<!-- font_size: 2 -->263* ~¥1200264* No case265* External Antenna (included)266* No battery267* No GPS268* OLED Display269270<!-- end_slide -->271272Lilygo T-Beam273---274275<!-- speaker_note: |276    A more advanced option that includes a built-in GPS module and an 18650 battery holder, making getting started significantly easier. Just add a battery and you're good to go! Starts at ¥3000, with the newest "supreme" model being around ¥5000.277-->278279<!-- column_layout: [5, 5] -->280281<!-- column: 0 -->282283![image:width:100%](tbeam.jpg)284285<!-- column: 1 -->286<!-- font_size: 2 -->287* ~¥3000 - ¥5000288* No case289* Battery slot (bring your own 18650)290* GPS291* External Antenna (included)292* OLED Display293294<!-- end_slide -->295296Lilygo T-Echo297---298299<!-- 300speaker_note: |301    A complete all-included package with a case, an e-ink display, a built-in battery, and all the necessary components to get started right away. This is the most user-friendly option, but it comes at a higher price point, starting at around ¥8000. It also boasts pretty good battery life compared to other options, since it's based on a more power-efficient nRF chip instead of an ESP32. My personal favorite.302-->303304<!-- column_layout: [5, 4] -->305306<!-- column: 0 -->307308![image:width:100%](t_echo.png)309310<!-- column: 1 -->311<!-- font_size: 2 -->312313* ~¥8000314* Battery315* GPS316* E-Ink Display317* Case318* External Antenna (included)319320<!-- end_slide -->321322Sensecap T-1000E323---324325<!--326speaker_note: |327    A card-shaped version, designed to be compact but durable, featuring IP65 waterproofing. Starts at around ¥8000, but I've seen it being on sale for about ¥4500.328-->329330<!-- column_layout: [5, 4] -->331<!-- column: 0 -->332333![image:width:100%](t1000e.jpg)334335<!-- column: 1 -->336<!-- font_size: 2 -->337338* ~¥8000 (sometimes on sale)339* Battery340* GPS341* No Display342* Case343* Internal Antenna344* Very compact345* IP65 waterproof346347<!-- end_slide -->348349Lilygo T-Deck350---351<!--352speaker_note: |353    A completely standalone version that doesn't require a phone to operate. Has a built-in TFT display, a full QWERTY keyboard, and a rechargeable battery. Runs a special OS called "Meshtastic UI" that provides a user-friendly interface for managing your node and its settings, along with maps, messaging, and even network diagnostic tools. Starts at around ¥10000.354-->355356<!-- column_layout: [5, 4] -->357358<!-- column: 0 -->359360![image:width:100%](tdeck.jpg)361362<!-- column: 1 -->363<!-- font_size: 2 -->364365* ~¥10000366* Battery367* GPS368* TFT Display369* Case370* Internal or External Antenna371* Keyboard372* Meshtastic UI373374<!-- end_slide -->375376And many more!377---378379<!-- 380speaker_note: |381    There are many more good nodes that aren't included in this list, you can check them all out in the meshtastic flasher tool.382-->383384<!-- column_layout: [8, 2, 1] -->385<!-- column: 0 -->386![image:width:100%](supported.png)387<!-- column: 1 -->388![image:width:100%](flasher.png)389390<!-- end_slide -->391392Flashing your node393---394395<!--396speaker_note: |397    And speaking of the flasher tool, now that you've got your node, it's time to program it with the meshtastic firmware. Thankfully, the flasher tool makes it trivially easy: just pick your node model, select the version you'd like to install, connect the node over USB, and click "Flash!" to upload the firmware. ESP-32 devices will be automatically programmed and rebooted, while the nrf-based devices will require you to follow the on-screen instructions to complete the process. Either way, it takes about 5 minutes to complete usually.398399    And after doing that, it's time to configure your node's settings and start using it!400-->401402![image:width:100%](flasher_ui.png)403404<!-- end_slide -->405406Configuration407---408409<!-- 410speaker_note: |411    Install the mobile app, and follow the on-screen instructions to connect your phone to the node. Once connected, you can customize various settings, such as the node's name, display preferences, and, most importantly, LoRa parameters. (demo on scrcpy)412413    Since we're in Japan, you'll want to pick "Japan" as your region, and LongFast as your modem preset.414415    And after that, you're good to go! You can now try sending a message in the default "LongFast" channel for everyone to hear, or even check out the list of nodes around you!416-->417418![image:width:100%](config.png)419420<!-- end_slide -->421422The end423---424425<!-- column_layout: [2, 4, 2] -->426<!-- column: 1 -->427<!-- jump_to_middle -->428<!-- font_size: 2 -->429Thank you for listening!

login to post a comment