mirror of
https://github.com/meshtastic/firmware.git
synced 2026-09-21 13:55:24 -04:00
cb6a738cc670b5769e8ced34e2dcaff49fc82ca5
Move the env boilerplate (HAS_USB_NET macro, include/link setup, pinned esp_tinyusb/tinyusb components, and the NCM/DHCP sdkconfig) into a shared [usbnet] section in variants/esp32/usbnet.ini, so enabling the gadget on a board is a short <board>_usbnet env that splices the fragments in. The meshnology_w12_usbnet env becomes the reference consumer, keeping only its board-specific pieces (start delay, coredump-to-flash debugging config). Eligibility is enforced at compile time in USBNetEsp32.cpp: HAS_USB_NET on a SoC without native USB-OTG (C3/C6/H2, classic ESP32) or on a board without BOARD_HAS_PSRAM fails the build with an explanation, since the phone API session's connect-time allocations need PSRAM in the heap and USB-Serial-JTAG parts cannot present a USB device at all.
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++
72.9%
C
22.9%
Python
2.1%
Shell
1.5%
Batchfile
0.2%
Other
0.2%
