[{"element_type":"image_url","content":"https://github.com/fede2cr/cpy-meshtastic/blob/main/doc/imgs/cpy-meshtastic.jpg?raw=true","metadata":{"alt":"Cpy-meshtastic","caption":"Orchids in Costa Rica with a cpy-meshtastic on Meshnology radio"}},{"element_type":"markdown","content":"\u003cp\u003eIf you want to get a Meshtastic-compatible library that works great in CircuitPython, of course there is no better place to start than the \u003ca href=\"https://learn.adafruit.com/meshfruit-message-board/overview\"\u003eMeshFruit\u003c/a\u003e library!\u003c/p\u003e\n\n\u003cp\u003eYet, there is another library in town, that might be a have some extra steps to install it, but because it has been written in Rust, and for CircuitPython, it bridges the two things we like the most: an efficient and fast full stack library with the ease of use of CircuitPython.\u003c/p\u003e\n\n\u003cp\u003eThe way that it has been designed, you can connect to REPL and have the library already talking with the Meshtastic network, while you send messages or read your inbox using simple commands. But, if you power on the device and to manually take it to REPL, it will start running \u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e acting as a Meshtastic client that you can connect with your phone via the official Meshtastic application, or you can interact with it over the network by using the official Meshtastic Python API.\u003c/p\u003e\n\n\u003cp\u003eSo, you can use the \u003ccode class=\"inline\"\u003eREPL\u003c/code\u003e for simplicity, learning how to use the library, quick serial console or web-workflow testing, use the default \u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e that comes with the library to connect your phone with the same app everyone else is using, and of course you can call the library from your own CircuitPython code to let your project start talking with the amazing Meshstastic network.\u003c/p\u003e\n\n\u003ch2\u003eCompatible hardware\u003c/h2\u003e\n\n\u003cp\u003eSince me, the author of the library, only has a handful of hardware that is both capable of running CircuitPython and that has a LoRa radio, so far the list of hardware is a bit limited to a couple of new and shiny boards that Meshstastic enthusiasts are gravitating to, because of very useful features. With the library released, now I will work on adding support for Adafruit hardware, and later for popular Meshtastic hardware. So far, we got:\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https://muzi.works/products/base-duo\"\u003eMuzi Works' Base Duo\u003c/a\u003e: nRF52840 with LR1121 radio. Cool features: 915MHz + 2.4GHz LoRa, BLE, integrated solar charger.\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"https://meshnology.com/products/meshnology-w12-lr2021-ultra-long-range-lora-meshtastic-device-kit\"\u003eMeshnology W12\u003c/a\u003e: ESP32-S3R8 (same S3 we know and love, but with 8M of PSRAM!) with LR2021 radio. Cool features: 915MHz + 2.4GHz LoRa, FLRC! (more on this, below), WiFi, multi-net navigation device, OLED screen, comes with case, a very decent 915MHz antenna and battery.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eNote: This boards are not official CircuitPython supported hardware, yet. I'm \nworking on it, but we found an external issue that Adafruit is trying to solve.\u003c/p\u003e\n\n\u003ch3\u003eIntegrated devices\u003c/h3\u003e\n\n\u003cul\u003e\n\u003cli\u003eThe latest generation of LoRa radios from Semtech: LR1121 and LR2021.\u003c/li\u003e\n\u003cli\u003eA navigation device (GNSS or \"GPS\") \u003c/li\u003e\n\u003cli\u003eAn OLED screen\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch1\u003eHow to install\u003c/h1\u003e\n\n\u003ch2\u003eAny device\u003c/h2\u003e\n\n\u003cul\u003e\n\u003cli\u003eUse a CircuitPython build that has \u003ccode class=\"inline\"\u003eCIRCUITPY_ENABLE_MPY_NATIVE\u003c/code\u003e enabled. This might require a manual rebuild, but it's required for Rust support.\u003c/li\u003e\n\u003cli\u003eCopy the \u003ccode class=\"inline\"\u003empy\u003c/code\u003e files for the radio used in your board to the \u003ccode class=\"inline\"\u003eCIRCUITPY/lib\u003c/code\u003e on your board. Current support is for: \u003ca href=\"https://github.com/fede2cr/cpy-lr1121/releases\"\u003eLR1121\u003c/a\u003e and \u003ca href=\"https://github.com/fede2cr/cpy-lr2021/releases\"\u003eLR2021\u003c/a\u003e\n\u003c/li\u003e\n\u003cli\u003eCopy the \u003ccode class=\"inline\"\u003empy\u003c/code\u003e files from the \u003ca href=\"https://github.com/fede2cr/cpy-meshtastic/releases/\"\u003ecpy-meshtastic library\u003c/a\u003e to the \u003ccode class=\"inline\"\u003eCIRCUITPY/lib\u003c/code\u003e on your board. Note: Since Rust is compiled, in a similar way to Turbo, you need to use the mpy files compiled for your board's arch.\u003c/li\u003e\n\u003cli\u003eCopy the \u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e, \u003ccode class=\"inline\"\u003erepl.py\u003c/code\u003e, and \u003ccode class=\"inline\"\u003esettings.toml\u003c/code\u003e to the root of \u003ccode class=\"inline\"\u003eCIRCUITPY\u003c/code\u003e on your board. Edit \u003ccode class=\"inline\"\u003esettings.toml\u003c/code\u003e to configure the LoRa region, client short and long name, as well as any board specific features like WiFi connection, OLED, navigation device, and to enable how you want to connect to the Phone app.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eThis is a short example of a \u003ccode class=\"inline\"\u003esettings.toml\u003c/code\u003e file:\u003c/p\u003e\n\u003ccode class=\"\"\u003e\u003cpre\u003eMESH_RADIO = \"lr2021\"\nMESH_GPS = \"gps\"\nMESH_PHONE = \"tcp\"\nCIRCUITPY_WIFI_SSID = \"your access point\"\nCIRCUITPY_WIFI_PASSWORD = \"4d4fru1t-ru13z\"\n\u003c/pre\u003e\u003c/code\u003e\n\u003ch2\u003eBoard specific install\u003c/h2\u003e\n\n\u003cp\u003eMeshtastic folks are used to flashing from a web browser, and using a single file to install the firmware. \u003c/p\u003e\n\n\u003cp\u003eLook for the \u003ccode class=\"inline\"\u003eUF2\u003c/code\u003e file that includes both CircuitPython, the radio, and the cpy-meshtastic library, for either the Muzi Works Base Duo, or the Meshnology W12.\u003c/p\u003e\n\n\u003cp\u003eNotes: \u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eFor the Base Duo board, embedding the library in the UF2 is needed anyway, to save memory.\u003c/li\u003e\n\u003cli\u003eThe W12 board is so new that they don't have UF2 support yet. Install TinyUF2 on it, first.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch1\u003eUsage\u003c/h1\u003e\n\n\u003ch2\u003e\u003ccode class=\"inline\"\u003eREPL\u003c/code\u003e\u003c/h2\u003e\n\n\u003cp\u003eIf you copied the \u003ccode class=\"inline\"\u003erepl.py\u003c/code\u003e file to the root of your \u003ccode class=\"inline\"\u003eCIRCUITPY\u003c/code\u003e folder on your board, use \u003ccode class=\"inline\"\u003eCTRL+C\u003c/code\u003e as usual to enter the \u003ccode class=\"inline\"\u003eREPL\u003c/code\u003e. The power of having \u003ccode class=\"inline\"\u003erepl.py\u003c/code\u003e on your board, means that all of the init that has to happen to use cpy-meshtastic is already happening there; so the board is already listening to incomming packets from the Meshtastic network, and if you want to send a message, just ahead and do it. This is an example of what you will see:\u003c/p\u003e\n\u003ccode class=\"\"\u003e\u003cpre\u003ePress any key to enter the REPL. Use CTRL-D to reload.\nrepl.py output:\nLR1121 fw 1.1, hw 0x22\n# meshtastic node, firmware v2.7.26.54e0d8d\n# US/LongFast ch 20/104 @ 906.8750 MHz SF11 BW250.00kHz CR4/5\n# node 0x0b9dbde1 relay 0xe1 channel 0x08, key from nvm\n# +22 dBm, duty cycle 0.00% of 100% over 3600s\n# keystore: node_num=4 bytes, channel_key=16 bytes, channel_name=0 bytes, region=2 bytes, preset=8 bytes, channel_num=4 bytes, tx_power_dbm=4 bytes, duty_cycle_pct=4 bytes, nodeinfo_s=4 bytes, long_name=13 bytes, short_name=4 bytes\n# cache: 32 nodes, 25 messages restored\n\n# read() peek() unread() channels() nodes() listen(30)\n# send(\"text\") introduce() poll() status() save() stop()\n# ask(num) ask(num, \"environment\") node() release()\n# phone() serve()\n# settings() configure(region=\"EU_868\")\n\nAdafruit CircuitPython 10.3.1-rust on 2026-09-14; muzi works Base Duo with nRF52840\n\u0026gt;\u0026gt;\u0026gt; nodes()\n\n# 32 nodes heard\n# number     short   hops  pkts    snr   last  long\n# 0xb2a73a5c          3h   117   10.5   56s  \n# 0xaca9f8e8          1h   549   10.5    1m  \n# 0xe277a008          4h     1   10.5    2m\n(...)\n\u0026gt;\u0026gt;\u0026gt; send(\"Hi from Costa Rica, using cpy-meshtastic\")\n\n# learned 0xcXXXXX is Long-Name (short-name), hw 101\n    1  (id=0xAAAA fr=0xBBBBB to=0xffffffff, WantAck=0, HopLim=2 Ch=0x8 Portnum=4 rxSNR=10.25 rxRSSI=-65 signalRSSI=-65 hopStart=7 relay=0xbd)\n       node=Hopp port=nodeinfo bytes=73\n# clock set from 0xCCCCCC: 2026-09-25T17:31:49Z UTC\n    2 17:31:49  (id=0xDDDDD fr=EEEEEE to=0xffffffff, WantAck=0, HopLim=1 Ch=0x8 Portnum=67 rxSNR=10.5 rxRSSI=-52 signalRSSI=-52 hopStart=3 relay=0xbd)\n       node=0xGGGGGG port=telemetry bytes=22\n\u003c/pre\u003e\u003c/code\u003e\n\u003ch2\u003e\n\u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e with Phone app\u003c/h2\u003e\n\n\u003cp\u003eInstall the Meshtastic phone app, power the CircuitPython device (remember to configure \u003ccode class=\"inline\"\u003esettings.toml\u003c/code\u003e), and in the settings of the phone app scan for either bluetooth or network devices, depending on the capabilities of the board you are using and it's configuration, and connect to that device.\u003c/p\u003e\n\n\u003cp\u003eThe list of nodes, configuration, channels and other settings will be shared from the phone app to the CircuitPython device, and now you can use the phone app as you would if you had the original Meshtastic firmware on your LoRa device.\u003c/p\u003e\n","metadata":{"markdown":"If you want to get a Meshtastic-compatible library that works great in CircuitPython, of course there is no better place to start than the [MeshFruit](https://learn.adafruit.com/meshfruit-message-board/overview) library!\n\nYet, there is another library in town, that might be a have some extra steps to install it, but because it has been written in Rust, and for CircuitPython, it bridges the two things we like the most: an efficient and fast full stack library with the ease of use of CircuitPython.\n\nThe way that it has been designed, you can connect to REPL and have the library already talking with the Meshtastic network, while you send messages or read your inbox using simple commands. But, if you power on the device and to manually take it to REPL, it will start running ``code.py`` acting as a Meshtastic client that you can connect with your phone via the official Meshtastic application, or you can interact with it over the network by using the official Meshtastic Python API.\n\nSo, you can use the ``REPL`` for simplicity, learning how to use the library, quick serial console or web-workflow testing, use the default ``code.py`` that comes with the library to connect your phone with the same app everyone else is using, and of course you can call the library from your own CircuitPython code to let your project start talking with the amazing Meshstastic network.\n\n## Compatible hardware\n\nSince me, the author of the library, only has a handful of hardware that is both capable of running CircuitPython and that has a LoRa radio, so far the list of hardware is a bit limited to a couple of new and shiny boards that Meshstastic enthusiasts are gravitating to, because of very useful features. With the library released, now I will work on adding support for Adafruit hardware, and later for popular Meshtastic hardware. So far, we got:\n\n- [Muzi Works' Base Duo](https://muzi.works/products/base-duo): nRF52840 with LR1121 radio. Cool features: 915MHz + 2.4GHz LoRa, BLE, integrated solar charger.\n- [Meshnology W12](https://meshnology.com/products/meshnology-w12-lr2021-ultra-long-range-lora-meshtastic-device-kit): ESP32-S3R8 (same S3 we know and love, but with 8M of PSRAM!) with LR2021 radio. Cool features: 915MHz + 2.4GHz LoRa, FLRC! (more on this, below), WiFi, multi-net navigation device, OLED screen, comes with case, a very decent 915MHz antenna and battery.\n\nNote: This boards are not official CircuitPython supported hardware, yet. I'm \nworking on it, but we found an external issue that Adafruit is trying to solve.\n\n### Integrated devices\n\n- The latest generation of LoRa radios from Semtech: LR1121 and LR2021.\n- A navigation device (GNSS or \"GPS\") \n- An OLED screen\n\n# How to install\n\n## Any device\n\n- Use a CircuitPython build that has ``CIRCUITPY_ENABLE_MPY_NATIVE`` enabled. This might require a manual rebuild, but it's required for Rust support.\n- Copy the ``mpy`` files for the radio used in your board to the ``CIRCUITPY/lib`` on your board. Current support is for: [LR1121](https://github.com/fede2cr/cpy-lr1121/releases) and [LR2021](https://github.com/fede2cr/cpy-lr2021/releases)\n- Copy the ``mpy`` files from the [cpy-meshtastic library](https://github.com/fede2cr/cpy-meshtastic/releases/) to the ``CIRCUITPY/lib`` on your board. Note: Since Rust is compiled, in a similar way to Turbo, you need to use the mpy files compiled for your board's arch.\n- Copy the ``code.py``, ``repl.py``, and ``settings.toml`` to the root of ``CIRCUITPY`` on your board. Edit ``settings.toml`` to configure the LoRa region, client short and long name, as well as any board specific features like WiFi connection, OLED, navigation device, and to enable how you want to connect to the Phone app.\n\nThis is a short example of a ``settings.toml`` file:\n```\nMESH_RADIO = \"lr2021\"\nMESH_GPS = \"gps\"\nMESH_PHONE = \"tcp\"\nCIRCUITPY_WIFI_SSID = \"your access point\"\nCIRCUITPY_WIFI_PASSWORD = \"4d4fru1t-ru13z\"\n```\n\n## Board specific install\n\nMeshtastic folks are used to flashing from a web browser, and using a single file to install the firmware. \n\nLook for the ``UF2`` file that includes both CircuitPython, the radio, and the cpy-meshtastic library, for either the Muzi Works Base Duo, or the Meshnology W12.\n\nNotes: \n- For the Base Duo board, embedding the library in the UF2 is needed anyway, to save memory.\n- The W12 board is so new that they don't have UF2 support yet. Install TinyUF2 on it, first.\n\n# Usage\n\n## ``REPL``\n\nIf you copied the ``repl.py`` file to the root of your ``CIRCUITPY`` folder on your board, use ``CTRL+C`` as usual to enter the ``REPL``. The power of having ``repl.py`` on your board, means that all of the init that has to happen to use cpy-meshtastic is already happening there; so the board is already listening to incomming packets from the Meshtastic network, and if you want to send a message, just ahead and do it. This is an example of what you will see:\n\n```\nPress any key to enter the REPL. Use CTRL-D to reload.\nrepl.py output:\nLR1121 fw 1.1, hw 0x22\n# meshtastic node, firmware v2.7.26.54e0d8d\n# US/LongFast ch 20/104 @ 906.8750 MHz SF11 BW250.00kHz CR4/5\n# node 0x0b9dbde1 relay 0xe1 channel 0x08, key from nvm\n# +22 dBm, duty cycle 0.00% of 100% over 3600s\n# keystore: node_num=4 bytes, channel_key=16 bytes, channel_name=0 bytes, region=2 bytes, preset=8 bytes, channel_num=4 bytes, tx_power_dbm=4 bytes, duty_cycle_pct=4 bytes, nodeinfo_s=4 bytes, long_name=13 bytes, short_name=4 bytes\n# cache: 32 nodes, 25 messages restored\n\n# read() peek() unread() channels() nodes() listen(30)\n# send(\"text\") introduce() poll() status() save() stop()\n# ask(num) ask(num, \"environment\") node() release()\n# phone() serve()\n# settings() configure(region=\"EU_868\")\n\nAdafruit CircuitPython 10.3.1-rust on 2026-09-14; muzi works Base Duo with nRF52840\n\u0026gt;\u0026gt;\u0026gt; nodes()\n\n# 32 nodes heard\n# number     short   hops  pkts    snr   last  long\n# 0xb2a73a5c          3h   117   10.5   56s  \n# 0xaca9f8e8          1h   549   10.5    1m  \n# 0xe277a008          4h     1   10.5    2m\n(...)\n\u0026gt;\u0026gt;\u0026gt; send(\"Hi from Costa Rica, using cpy-meshtastic\")\n\n# learned 0xcXXXXX is Long-Name (short-name), hw 101\n    1  (id=0xAAAA fr=0xBBBBB to=0xffffffff, WantAck=0, HopLim=2 Ch=0x8 Portnum=4 rxSNR=10.25 rxRSSI=-65 signalRSSI=-65 hopStart=7 relay=0xbd)\n       node=Hopp port=nodeinfo bytes=73\n# clock set from 0xCCCCCC: 2026-09-25T17:31:49Z UTC\n    2 17:31:49  (id=0xDDDDD fr=EEEEEE to=0xffffffff, WantAck=0, HopLim=1 Ch=0x8 Portnum=67 rxSNR=10.5 rxRSSI=-52 signalRSSI=-52 hopStart=3 relay=0xbd)\n       node=0xGGGGGG port=telemetry bytes=22\n```\n\n## ``code.py`` with Phone app\n\nInstall the Meshtastic phone app, power the CircuitPython device (remember to configure ``settings.toml``), and in the settings of the phone app scan for either bluetooth or network devices, depending on the capabilities of the board you are using and it's configuration, and connect to that device.\n\nThe list of nodes, configuration, channels and other settings will be shared from the phone app to the CircuitPython device, and now you can use the phone app as you would if you had the original Meshtastic firmware on your LoRa device.\n"}},{"element_type":"image_url","content":"https://github.com/fede2cr/cpy-meshtastic/blob/main/doc/imgs/meshtastic-phone-app-dev-scan.jpg?raw=true","metadata":{"alt":"Meshtastic phone app dev scan","caption":"Meshtastic phone app showing how to discover and connect to cpy-meshtastic, either via BLE or Network (mDNS)"}},{"element_type":"markdown","content":"\u003cp\u003eIt's optional, but if you decide to open up a serial console to the device while running in \u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e \"mode\", it sill show something like this:\u003c/p\u003e\n\u003ccode class=\"\"\u003e\u003cpre\u003eConnected to /dev/tty.usbmodem441B67EA618F1\n# code.py: last reset POWER_ON\n# code.py: bringing the node up, Ctrl-C stops it here\n# no GNSS module 'gps'; the clock will come from elsewhere\nLR2021 fw 1.24\n# meshtastic node, firmware v2.7.26.54e0d8d\n# US/LongFast ch 20/104 @ 906.8750 MHz SF11 BW250.00kHz CR4/5\n# node 0x0f61ea67 relay 0x67 channel 0x08, key from nvm\n# +22 dBm, duty cycle 0.00% of 100% over 3600s\n# keystore: node_num=4 bytes, channel_key=16 bytes, region=2 bytes\n# cache: 24 nodes, 32 messages restored\n# no interrupt support in this firmware, use listen()\n#   (cannot watch that pin: no port support, already in use, or no slot left)\n# code.py: announcing, which keys the sub-GHz amplifier\n# nodeinfo: Meshtastic ea67 (ea67), asking for replies\n# sending 59 bytes, 681 ms on air\nSENT  (id=0x4cba0c09 fr=0x0f61ea67 to=0xffffffff, WantAck=0, HopLim=3 Ch=0x8 Portnum=4 WANTRESP hopStart=3 relay=0x67)\n# phone: tcp starting, 8165120 bytes free\n# phone: tcp on 192.168.123.123:4403 (meshtastic-0f61ea67.local), 8140624 bytes free\n# code.py: node up, panel running -- Ctrl-C for the prompt\n# phone: 192.168.123.123:4403 (meshtastic-0f61ea67.local) connected from 192.168.123.123\n# phone: 12 bytes in, 1 queued, at 0.0s\n# phone: 8 bytes in, 32 queued, at 0.2s\n# clock set from the phone: 2026-09-25T17:54:29Z UTC\n\n\u003c/pre\u003e\u003c/code\u003e\n\u003cp\u003eAnd if you keep looking you should see one printed line for every message that is received or sent on the Meshtastic network.\u003c/p\u003e\n\n\u003cp\u003eIn this screenshot, you can see a connected device, which is shown as a full-compatible to a device that would be using the original Meshtastic firmware!\u003c/p\u003e\n","metadata":{"markdown":"It's optional, but if you decide to open up a serial console to the device while running in ``code.py`` \"mode\", it sill show something like this:\n\n```\nConnected to /dev/tty.usbmodem441B67EA618F1\n# code.py: last reset POWER_ON\n# code.py: bringing the node up, Ctrl-C stops it here\n# no GNSS module 'gps'; the clock will come from elsewhere\nLR2021 fw 1.24\n# meshtastic node, firmware v2.7.26.54e0d8d\n# US/LongFast ch 20/104 @ 906.8750 MHz SF11 BW250.00kHz CR4/5\n# node 0x0f61ea67 relay 0x67 channel 0x08, key from nvm\n# +22 dBm, duty cycle 0.00% of 100% over 3600s\n# keystore: node_num=4 bytes, channel_key=16 bytes, region=2 bytes\n# cache: 24 nodes, 32 messages restored\n# no interrupt support in this firmware, use listen()\n#   (cannot watch that pin: no port support, already in use, or no slot left)\n# code.py: announcing, which keys the sub-GHz amplifier\n# nodeinfo: Meshtastic ea67 (ea67), asking for replies\n# sending 59 bytes, 681 ms on air\nSENT  (id=0x4cba0c09 fr=0x0f61ea67 to=0xffffffff, WantAck=0, HopLim=3 Ch=0x8 Portnum=4 WANTRESP hopStart=3 relay=0x67)\n# phone: tcp starting, 8165120 bytes free\n# phone: tcp on 192.168.123.123:4403 (meshtastic-0f61ea67.local), 8140624 bytes free\n# code.py: node up, panel running -- Ctrl-C for the prompt\n# phone: 192.168.123.123:4403 (meshtastic-0f61ea67.local) connected from 192.168.123.123\n# phone: 12 bytes in, 1 queued, at 0.0s\n# phone: 8 bytes in, 32 queued, at 0.2s\n# clock set from the phone: 2026-09-25T17:54:29Z UTC\n\n```\n\nAnd if you keep looking you should see one printed line for every message that is received or sent on the Meshtastic network.\n\nIn this screenshot, you can see a connected device, which is shown as a full-compatible to a device that would be using the original Meshtastic firmware!"}},{"element_type":"image_url","content":"https://github.com/fede2cr/cpy-meshtastic/blob/main/doc/imgs/meshtastic-phone-app-dev-details.jpg?raw=true","metadata":{"alt":"Meshtastic phone app with dev details","caption":"Meshtastic phone app showing the device details of a cpy-meshtastic client connected"}},{"element_type":"markdown","content":"\u003cp\u003eWhile using the Meshtastic phone app, of course you can use all of the features like text messages to/from on private and public channels, information on the nodes, run and receive traceroutes.\u003c/p\u003e\n\n\u003cp\u003eAnd something very cool, this is how the map for the Meshtastic network looks here in Costa Rica. With help from the Radio Club and enthusiasts, the network as been growing to almost 60 devices including routers, repeaters and of course many clients.\u003c/p\u003e\n","metadata":{"markdown":"While using the Meshtastic phone app, of course you can use all of the features like text messages to/from on private and public channels, information on the nodes, run and receive traceroutes.\n\nAnd something very cool, this is how the map for the Meshtastic network looks here in Costa Rica. With help from the Radio Club and enthusiasts, the network as been growing to almost 60 devices including routers, repeaters and of course many clients."}},{"element_type":"image_url","content":"https://github.com/fede2cr/cpy-meshtastic/blob/main/doc/imgs/meshtastic-phone-app-map.jpg?raw=true","metadata":{"alt":"Meshtastic map in Costa Rica","caption":"Meshtastic app connected to cpy-meshtastic device, showing a map of Costa Rica"}},{"element_type":"markdown","content":"\u003ch2\u003eFeatures\u003c/h2\u003e\n\n\u003cp\u003eWe just talked about using the \u003ccode class=\"inline\"\u003eREPL\u003c/code\u003e for simplicity, the lib's \u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e for connecting your phone, or using the library to write your own applications that talk with the Meshtastic network. But, what can you do?\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eFull Meshtastic-compatible client support: it handles lot's of types of messages like receiving \"node-info\" (when a radio says the station name, what hardware is it running, etc), text messages in public and private channels, telemetry (battery charge, weather conditions if the board has sensor for it), and even position when you have a navigation device (so that you can find your friend, and your friend can find you!), and traceroute messages (so that you can map the Meshtastic network itself! Are we talking directly or is there one or many routers in between us?)\u003c/li\u003e\n\u003cli\u003eAirtime: Transmitting is something that has to happen with care, you can only send so much information via Meshtastic over a period of time. The airtime module has a counter that checks all of the messages (automated or manual) that your radio sends, and if needed will limit you so that you don't go over the limits that any user of the  Meshtastic network's agrees to.\u003c/li\u003e\n\u003cli\u003eRadio interrupts: Even if not fully embraced by the library yet, it should be very easy to get Low-Power capabilities. CircuitPython already has some very cool Low-Power modes, and you can have the radios wake up blinka when there is an incomming packet, and then to go back to sleep to save battery, and maybe make it compatible with Solar power, which makes it the perfect hardware for deploying in the field as a remote station.\u003c/li\u003e\n\u003cli\u003eNVM: Non-volatile memory is a very nice CircuitPython features, that allows the board to remember some information about the nodes and messages received, so that even if you reboot the board, you will still have nodes and messages available, for example for using the \u003ccode class=\"inline\"\u003eREPL\u003c/code\u003e mode.\u003c/li\u003e\n\u003cli\u003eDiscovery: You can discover devices if using the \u003ccode class=\"inline\"\u003ecode.py\u003c/code\u003e mode for connecting to the Meshtastic phone app. Depending on your hardware you can discover both Bluetooth devices and/or Network devices, in this case using mDNS.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003eWhat we don't do (yet?)\u003c/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eOther roles different to client: No router, no store-and-forward, or any of the other cool and interesting modes of participation that you can have in a Meshtastic network. Just client.\u003c/li\u003e\n\u003cli\u003eLimited hardware support: I'll be slowly but shurely adding more devices in time. This library is quite new!\u003c/li\u003e\n\u003cli\u003e\"stock\" CircuitPython: The rust support in CircuitPython is also very new, I even added it because I wanted to write this library in Rust!. So for now you probably need a CircuitPython build that has \u003ccode class=\"inline\"\u003eCIRCUITPY_ENABLE_MPY_NATIVE\u003c/code\u003e enabled. We will talk a bit more about this, later in this guide. I am also talking with the CircuitPython devs so Rust might be integrated and embraced. Can you imagine? A rusty blinka? \u003ccode class=\"inline\"\u003e\u0026lt;3\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eMore testing needed:\u003c/h2\u003e\n\n\u003cul\u003e\n\u003cli\u003eEven if the supported radios have 2.4GHz antennas and capabilities, and there is a Meshtastic \"region\" for 2.4GHz, the library should handle those, but we haven't really tested them\u003c/li\u003e\n\u003cli\u003eAn FLRC side channel: \"FLRC\" is so now, that today there are no Youtube videos showing folks using FLRC, but it's one of the reasons why I got modern Semtech radios (only LR2021 has FLRC). Using FLRC is not part of Meshtastic, but it's a feature that would allow you to send files over large distances. The way I think of it, is like having old-times WiFi speeds, but over distances that are similar to LoRa. So we could coordinate with a device using a private channel, so that for a very short period we both disconnect from Meshtastic, transfer over a file using FLRC and then get back to Meshtastic.\u003c/li\u003e\n\u003cli\u003eiPhone app: I've only tested the Android app. I'm guessing it should be the same. Also, why do we have different app? Are you also thinking of a Rust por using Tauri? Wow, you read my mind!\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch1\u003eDisclaimer\u003c/h1\u003e\n\n\u003cp\u003e\u003cstrong\u003eDo not\u003c/strong\u003e ask for support to Meshstatic or it's community if you see any errors or incompatibility with the Meshstastic Phone app. They only support using it with their firmware.\u003c/p\u003e\n\n\u003cp\u003eThis library is very new and should \u003cstrong\u003enot be considered as stable\u003c/strong\u003e. Meshtastic has lots of uses for rescue, emergency communication, outdoor sports communication, etc. We do not recommend using this library for any of those uses.\u003c/p\u003e\n","metadata":{"markdown":"## Features\n\nWe just talked about using the ``REPL`` for simplicity, the lib's ``code.py`` for connecting your phone, or using the library to write your own applications that talk with the Meshtastic network. But, what can you do?\n\n- Full Meshtastic-compatible client support: it handles lot's of types of messages like receiving \"node-info\" (when a radio says the station name, what hardware is it running, etc), text messages in public and private channels, telemetry (battery charge, weather conditions if the board has sensor for it), and even position when you have a navigation device (so that you can find your friend, and your friend can find you!), and traceroute messages (so that you can map the Meshtastic network itself! Are we talking directly or is there one or many routers in between us?)\n- Airtime: Transmitting is something that has to happen with care, you can only send so much information via Meshtastic over a period of time. The airtime module has a counter that checks all of the messages (automated or manual) that your radio sends, and if needed will limit you so that you don't go over the limits that any user of the  Meshtastic network's agrees to.\n- Radio interrupts: Even if not fully embraced by the library yet, it should be very easy to get Low-Power capabilities. CircuitPython already has some very cool Low-Power modes, and you can have the radios wake up blinka when there is an incomming packet, and then to go back to sleep to save battery, and maybe make it compatible with Solar power, which makes it the perfect hardware for deploying in the field as a remote station.\n- NVM: Non-volatile memory is a very nice CircuitPython features, that allows the board to remember some information about the nodes and messages received, so that even if you reboot the board, you will still have nodes and messages available, for example for using the ``REPL`` mode.\n- Discovery: You can discover devices if using the ``code.py`` mode for connecting to the Meshtastic phone app. Depending on your hardware you can discover both Bluetooth devices and/or Network devices, in this case using mDNS.\n\nWhat we don't do (yet?)\n\n- Other roles different to client: No router, no store-and-forward, or any of the other cool and interesting modes of participation that you can have in a Meshtastic network. Just client.\n- Limited hardware support: I'll be slowly but shurely adding more devices in time. This library is quite new!\n- \"stock\" CircuitPython: The rust support in CircuitPython is also very new, I even added it because I wanted to write this library in Rust!. So for now you probably need a CircuitPython build that has ``CIRCUITPY_ENABLE_MPY_NATIVE`` enabled. We will talk a bit more about this, later in this guide. I am also talking with the CircuitPython devs so Rust might be integrated and embraced. Can you imagine? A rusty blinka? ``\u0026lt;3``.\n\n\n## More testing needed:\n\n- Even if the supported radios have 2.4GHz antennas and capabilities, and there is a Meshtastic \"region\" for 2.4GHz, the library should handle those, but we haven't really tested them\n- An FLRC side channel: \"FLRC\" is so now, that today there are no Youtube videos showing folks using FLRC, but it's one of the reasons why I got modern Semtech radios (only LR2021 has FLRC). Using FLRC is not part of Meshtastic, but it's a feature that would allow you to send files over large distances. The way I think of it, is like having old-times WiFi speeds, but over distances that are similar to LoRa. So we could coordinate with a device using a private channel, so that for a very short period we both disconnect from Meshtastic, transfer over a file using FLRC and then get back to Meshtastic.\n- iPhone app: I've only tested the Android app. I'm guessing it should be the same. Also, why do we have different app? Are you also thinking of a Rust por using Tauri? Wow, you read my mind!\n\n# Disclaimer\n\n**Do not** ask for support to Meshstatic or it's community if you see any errors or incompatibility with the Meshstastic Phone app. They only support using it with their firmware.\n\nThis library is very new and should **not be considered as stable**. Meshtastic has lots of uses for rescue, emergency communication, outdoor sports communication, etc. We do not recommend using this library for any of those uses."}}]