meshtastic- Experiments with Meshtastic 🛰️ |
git clone git://git.acid.vegas/meshtastic.git |
Log | Files | Refs | Archive | README | LICENSE |
FIRMWARE.md (2978B)
1 # Meshtastic Firmware Hacks 2 3 ## Prerequisite 4 - Download & install [PlatformIO](https://platformio.org/platformio-ide) 5 6 - `git clone https://github.com/meshtastic/firmware.git` 7 8 - `cd firmware && git submodule update --init` 9 10 ## Customization 11 #### Custom Boot Logo 12 - Use [XMB Viewer](https://windows87.github.io/xbm-viewer-converter/) to convert an image to XMB 13 14 - The data from this goes in `firmware/src/graphics/img/icon.xbm` 15 16 You can use the provided [icon.xbm](../assets/icon.xbm) for a rad GTA:SA fist to show up on boot. 17 18 #### Custom boot message 19 - Navigate to `firmware/src/graphics/Screen.cpp` 20 21 - Find & replace `const char *title = "meshtastic.org";` with your custom message. 22 23 #### Custom screen color 24 - Navigate to `src/graphics/TFTDisplay.cpp` 25 26 - Find & replace `#define TFT_MESH COLOR565(0xFF, 0x00, 0x00)` with your custom color. *(The one shown here is for RED mode >:))* 27 28 ### Custom alert sound (for devices with a buzzer) 29 - From the mobile app, click the 3 dots on the top right, and select `Radio configuration` 30 - Under `Module configuration`, select `External Notification` 31 - Scroll down & you will see a `Ringtone` option that takes [RTTTL](https://en.wikipedia.org/wiki/Ring_Tone_Text_Transfer_Language) formatted tones. 32 33 As far as I know, at the time of writing this, the only way to change the Ringtone is from the App. While this is not a "firmware" related thing, I included it in this file because it was difficult to find this setting... 34 35 #### Display RAM/PSRAM Usage 36 Look for these lines: 37 ```cpp 38 display->drawString(x, y + FONT_HEIGHT_SMALL * 2, "SSID: " + String(wifiName)); 39 display->drawString(x, y + FONT_HEIGHT_SMALL * 3, "http://meshtastic.local"); 40 ``` 41 42 And place the follow code AFTER the above lines: 43 44 ```cpp 45 // Display memory usage using the MemGet class 46 uint32_t freeHeap = ESP.getFreeHeap(); 47 uint32_t totalHeap = ESP.getHeapSize(); 48 uint32_t usedHeap = totalHeap - freeHeap; 49 display->drawString(x, y + FONT_HEIGHT_SMALL * 4, "Heap: " + String(usedHeap / 1024) + "/" + String(totalHeap / 1024) + " KB"); 50 51 // Display PSRAM usage using the MemGet class 52 uint32_t freePsram = ESP.getFreePsram(); 53 uint32_t totalPsram = ESP.getPsramSize(); 54 uint32_t usedPsram = totalPsram - freePsram; 55 display->drawString(x, y + FONT_HEIGHT_SMALL * 5, "PSRAM: " + String(usedPsram / 1024) + "/" + String(totalPsram / 1024) + " KB"); 56 ``` 57 58 #### Heartbeat for redraw 59 - Uncomment the line that says: `#define SHOW_REDRAWS` 60 61 This will show a little 1x1 pixel on the top left corner anytime the screen is redraw. 62 63 64 ## Compile & flash firmware 65 - Select `PlatformIO: Pick Project Environment` & select your board. 66 - Run `PLatformIO: Build` to compile the firmware. 67 - Place device in DFU mode & plug in to the computer 68 - Do `PlatformIO: Upload` to send the firmware to the device 69 - Press the RESET button or reboot your device. 70 71 See [here](https://meshtastic.org/docs/development/firmware/build/) for more information building & flashing custom firmware.