mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-07 23:04:49 -05:00
36201c8edbde7e8fa519749726fa8a5ad5d3138f
* DMShell: give the shell TERM=xterm-256color The shell inherited meshtasticd's environment, which usually has no TERM (systemd, containers) or the TERM of whatever terminal started the daemon. Without one, clear prints "unknown terminal type", ctrl+L only feeds a line, and pagers fall back to a dumb terminal. The environment is built before forkpty and passed to execle, since the child of a threaded process may only make async-signal-safe calls until exec. * DMShell: give the shell a UTF-8 locale, and drop systemd's service variables The shell's TERM is right now, but a systemd unit usually has no LANG either, so the shell still landed in the C locale: ncurses drew its boxes in ASCII and ls escaped any UTF-8 filename, with a correct terminal underneath. LANG is now replaced the way TERM is, with C.UTF-8. The LC_* overrides are stripped along with it, since an LC_ALL or a stale LC_CTYPE out of the daemon's environment would win over LANG and leave the locale half-set. C.UTF-8 is built into glibc and musl is UTF-8 throughout, so no locale has to be generated for it; where it is absent anyway, setlocale() falls back to C, which is where the shell already was. The explicit environment is also the place to stop handing the shell systemd's own service plumbing: NOTIFY_SOCKET, INVOCATION_ID, JOURNAL_STREAM and the LISTEN_* socket-activation triple. NOTIFY_SOCKET is the one that does something - a command run in the shell can answer sd_notify() on meshtasticd's behalf and tell systemd the service is reloading or stopping. That is not an escalation, since the session is already a root shell on the host, but none of it describes the shell's own world. The filter is a prefix table rather than a single strncmp, so all three concerns read the same way. * DMShell: keep the environment comments to a line each The rationale for each stripped variable and for C.UTF-8 is in the commit that added them. --------- Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Overview
This repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.
Meshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.
Get Started
- 🔧 Building Instructions - Learn how to compile the firmware from source.
- ⚡ Flashing Instructions - Install or update the firmware on your device.
Join our community and help improve Meshtastic! 🚀
Stats
Languages
C++
73.6%
C
21.7%
Python
2.6%
Shell
1.5%
Batchfile
0.2%
Other
0.2%
