From 708065a0ba0d75be4a9a22c45a31c72e0fc286b4 Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Fri, 7 Mar 2025 13:52:47 +0100 Subject: [PATCH 1/5] tx_power can be raised to 22dBm on LR1110 --- platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio.ini b/platformio.ini index e9a615d4..bc4cfbb8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -648,6 +648,7 @@ build_flags = ${nrf52840_t1000e.build_flags} -D PIN_USER_BTN=6 -D RADIO_CLASS=CustomLR1110 -D WRAPPER_CLASS=CustomLR1110Wrapper + -D MAX_LORA_TX_POWER=22 build_src_filter = ${nrf52840_t1000e.build_src_filter} + + From a5fb3acc9b0a1a0aa5202094de3238c2b7b8dc01 Mon Sep 17 00:00:00 2001 From: Diego Munhoz Date: Fri, 7 Mar 2025 11:41:53 -0600 Subject: [PATCH 2/5] add: BLE_NAME_PREFIX flag --- examples/companion_radio/main.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 5cfeac60..6f4db19e 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -1272,7 +1272,13 @@ void setup() { #ifdef BLE_PIN_CODE char dev_name[32+10]; - sprintf(dev_name, "MeshCore-%s", the_mesh.getNodeName()); + const char* prefix = + #ifdef BLE_NAME_PREFIX + BLE_NAME_PREFIX; + #else + "MeshCore-"; + #endif + sprintf(dev_name, "%s%s", prefix, the_mesh.getNodeName()); serial_interface.begin(dev_name, the_mesh.getBLEPin()); #else pinMode(WB_IO2, OUTPUT); @@ -1288,7 +1294,13 @@ void setup() { serial_interface.begin(TCP_PORT); #elif defined(BLE_PIN_CODE) char dev_name[32+10]; - sprintf(dev_name, "MeshCore-%s", the_mesh.getNodeName()); + const char* prefix = + #ifdef BLE_NAME_PREFIX + BLE_NAME_PREFIX; + #else + "MeshCore-"; + #endif + sprintf(dev_name, "%s%s", prefix, the_mesh.getNodeName()); serial_interface.begin(dev_name, the_mesh.getBLEPin()); #else serial_interface.begin(Serial); From a706d905987a44ff1e6252ffc23f448a21e2a88a Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 9 Mar 2025 15:49:35 +0100 Subject: [PATCH 3/5] Add an ESP32_CPU_FREQ build flag to lower freq --- examples/companion_radio/main.cpp | 4 ++++ examples/simple_repeater/main.cpp | 4 ++++ examples/simple_room_server/main.cpp | 5 +++++ examples/simple_secure_chat/main.cpp | 5 +++++ platformio.ini | 1 + 5 files changed, 19 insertions(+) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 833e41d8..ac0b3111 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -1246,6 +1246,10 @@ void setup() { Serial.begin(115200); board.begin(); +#ifdef ESP32_CPU_FREQ + setCpuFrequencyMhz(ESP32_CPU_FREQ); +#endif + #ifdef SX126X_DIO3_TCXO_VOLTAGE float tcxo = SX126X_DIO3_TCXO_VOLTAGE; #else diff --git a/examples/simple_repeater/main.cpp b/examples/simple_repeater/main.cpp index 5743647b..e9f6d480 100644 --- a/examples/simple_repeater/main.cpp +++ b/examples/simple_repeater/main.cpp @@ -664,6 +664,10 @@ void setup() { delay(1000); board.begin(); + +#ifdef ESP32_CPU_FREQ + setCpuFrequencyMhz(ESP32_CPU_FREQ); +#endif #ifdef ESP32 fallback_clock.begin(); #endif diff --git a/examples/simple_room_server/main.cpp b/examples/simple_room_server/main.cpp index 285d59c6..5f7d577a 100644 --- a/examples/simple_room_server/main.cpp +++ b/examples/simple_room_server/main.cpp @@ -726,6 +726,11 @@ void setup() { delay(1000); board.begin(); + +#ifdef ESP32_CPU_FREQ + setCpuFrequencyMhz(ESP32_CPU_FREQ); +#endif + #ifdef ESP32 fallback_clock.begin(); #endif diff --git a/examples/simple_secure_chat/main.cpp b/examples/simple_secure_chat/main.cpp index 951d51dc..f34f025f 100644 --- a/examples/simple_secure_chat/main.cpp +++ b/examples/simple_secure_chat/main.cpp @@ -566,6 +566,11 @@ void setup() { Serial.begin(115200); board.begin(); + +#ifdef ESP32_CPU_FREQ + setCpuFrequencyMhz(ESP32_CPU_FREQ); +#endif + #ifdef SX126X_DIO3_TCXO_VOLTAGE float tcxo = SX126X_DIO3_TCXO_VOLTAGE; #else diff --git a/platformio.ini b/platformio.ini index 02ce189c..6cb473f3 100644 --- a/platformio.ini +++ b/platformio.ini @@ -126,6 +126,7 @@ build_flags = -D SX126X_DIO3_TCXO_VOLTAGE=1.8 -D SX126X_CURRENT_LIMIT=130.0f ; for best TX power! -D SX126X_RX_BOOSTED_GAIN=true + -D ESP32_CPU_FREQ=240 build_src_filter = ${esp32_base.build_src_filter} lib_deps = ${esp32_base.lib_deps} From 648cdf6945b9fa2f6b1b319c2341aff05ee5bbac Mon Sep 17 00:00:00 2001 From: uncle lit <43320854+LitBomb@users.noreply.github.com> Date: Mon, 10 Mar 2025 11:52:39 -0700 Subject: [PATCH 4/5] Update faq.md update Canada to use USA frequency add guide to add nodes to map add guide to do OTA firmware update for nRF devices update donation links general text cleanup --- docs/faq.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 6 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index eb5fdf29..c94d231f 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,6 +1,9 @@ # MeshCore-FAQ A list of frequently-asked questions and answers for MeshCore +The current version of this MeshCore FAQ is at https://github.com/ripplebiz/MeshCore/blob/main/docs/faq.md. +This MeshCore FAQ is also mirrored at https://github.com/LitBomb/MeshCore-FAQ and might have newer updates if pull requests on Scott's MeshCore repo are not approved yet. + author: https://github.com/LitBomb --- @@ -25,8 +28,9 @@ Anyone is able to build anything they like on top of MeshCore without paying any Firmware Flasher: https://flasher.meshcore.co.uk/ Phone Client Applications: https://meshcore.co.uk/apps.html MeshCore Fimrware Github: https://github.com/ripplebiz/MeshCore - + NOTE: Andy Kirby has a very useful [intro video](https://www.youtube.com/watch?v=t1qne8uJBAc) for beginners. + You need LoRa hardware devices to run MeshCore firmware as clients or server (repeater and room server). @@ -95,7 +99,7 @@ The T-Deck firmware is free to download and most features are available without - Australia and New Zealand are using **915.8MHz** - UK and EU are gravitating toward **867.5MHz** - There are discussions on discord for UK to move to 869.525MHz (https://discord.com/channels/826570251612323860/1330643963501351004/1342554454498742374) -- USA is gravitating toward **910.525MHz** +- Canada and USA is on **910.525MHz** the rest of the radio settings are the same for all frequencies: - Spread Factor (SF): 10 @@ -127,11 +131,11 @@ MeshCore clients only advertise themselves when the user initiates it. A repeate ### Q: How do you configure a repeater or a room server? **A:** One of these servers can be administered with one of the options below: -- Connect the server device through a USB serial connection to a computer running Chrome on this site: - +- Connect the server device using a USB cable to a computer running Chrome on https://flasher.meshcore.co.uk/, then use the `console` feature to connect to the device + - this is necessary to set the server device's frequency if it doesn't match the frequency for your local region or country +- MeshCore smart device clients have the ability to remotely administer servers. - A T-Deck running unlocked/registered MeshCore firmware. Remote server administration is enabled through registering your T-Deck with Ripple Radios. It is one of the ways to support MeshCore development. You can register your T-Deck at: -- MeshCore smart device clients may have the ability to remotely administer servers in the future. ### Q: Do I need to set the location for a repeater? **A:** With location set for a repeater, it can show up on a MeshCore map in the future. Set location with the following commands: @@ -232,7 +236,11 @@ things network is mainly focused on LoRaWAN, but the LoRa low-level stuff still - Firmware repo: ### Q: How can I support MeshCore? -**A:** Provide your honest feedback on GitHub and on AndyKirby's Discord server . Spread the word of MeshCore to your friends and communities; help them get started with MeshCore. Support MeshCore development at . +**A:** Provide your honest feedback on GitHub and on AndyKirby's Discord server . Spread the word of MeshCore to your friends and communities; help them get started with MeshCore. Support Scott's MeshCore development at . + +Support Liam Cottle's smartphone client development by unlocking the server administration wait gate with in-app purchase + +Support Rastislav Vysoky (recrof)'s flasher web site and the map web site development through [PayPal](https://www.paypal.com/donate/?business=DREHF5HM265ES&no_recurring=0&item_name=If+you+enjoy+my+work%2C+you+can+support+me+here%3A¤cy_code=EUR) or [Revolut](https://revolut.me/recrof) ### Q: How do I build MeshCore firmware from source? **A:** See instructions here: @@ -251,6 +259,12 @@ Javascript: https://github.com/liamcottle/meshcore.js ### Q: Does MeshCore support ATAK **A:** ATAK is not currently on MeshCore's roadmap. + +### Q: How do I add a node to the [MeshCore Map]([url](https://meshcore.co.uk/map.html)) +**A:** From the smartphone app, connect to a BLE Companion radio +- To add the BLE Companion radio your smartphone is connected to to the map, tap the `advert` icon, then tap `Advert (To Clipboard)`. +- To add a Repeater or Room Server to the map, tap the 3 dots next to the Repeater or Room Server you want to add to the map, then tap `Share (To Clipboard)`. +- Go to the [MeshCore Map web site]([url](https://meshcore.co.uk/map.html)), tap the plus sign on the lower right corner and paste in the meshcore://... blob, then tap `Add Node` --- @@ -275,6 +289,74 @@ You can get the epoch time on and use it to se **A:** Heltec V3 has a very small coil antenna on its PCB for WiFi and Bluetooth connectivty. It has a very short range, only a few feet. It is possible to remove the coil antenna and replace it with a 31mm wire. The BT range is much improved with the modification. +--- +## Other Questions: +### Q: How to Update repeater and room server firmware over the air? + +**A:** Only nRF-based RAK4631 and Heltec T114 OTA firmware update are verified using nRF smartphone app. Lilygo T-Echo doesn't work currently. +You can update repeater and room server firmware with a bluetooth connection between your smartphone and your LoRa radio using the nRF app. + +1. Download the ZIP file for the specific node from the web flasher to your smartphone +2. On the phone client, log on to the repeater as administrator (default password is `password`) to issue the `start ota`command to the repeater or room server to get the device into OTA DFU mode + +![image](https://github.com/user-attachments/assets/889bb81b-7214-4a1c-955a-396b5a05d8ad) + 1. `start ota` can be initiated from USB serial console on the web flasher page or a T-Deck +4. On the smartphone, download and run the nRF app and scan for Bluetooth devices +5. Connect to the repeater/room server node you want to update + 1. nRF app is available on both Android and iOS + +**Android continues after the iOS section:** + +**iOS continues here:** +5. Once connected successfully, a `DFU` icon ![Pasted image 20250309173039](https://github.com/user-attachments/assets/af7a9f78-8739-4946-b734-02bade9c8e71) + appears in the top right corner of the app![Pasted image 20250309171919](https://github.com/user-attachments/assets/08007ec8-4924-49c1-989f-ca2611e78793) + +6. Scroll down to change the `PRN(s)` number: + +![Pasted image 20250309190158](https://github.com/user-attachments/assets/11f69cdd-12f3-4696-a6fc-14a78c85fe32) + +- For the T114, change the number of packets `(PRN(s)` to 8 +- For RAK, it can be 10, but it also works on 8. + +7. Click the `DFU` icon ![Pasted image 20250309173039](https://github.com/user-attachments/assets/af7a9f78-8739-4946-b734-02bade9c8e71), select the type of file to upload (choose ZIP), then select the ZIP file that was downloaded earlier from the web flasher +8. The upload process will start now. If everything goes well, the node resets and is flashed successfully. +![Pasted image 20250309190342](https://github.com/user-attachments/assets/a60e25d0-33b8-46cf-af90-20a7d8ac2adb) + + + +**Android steps continues below:** +1. on the top left corner of the nRF Connect app on Android, tap the 3-bar hamburger menu, then `Settings`, then `nRF5 DFU Options` + +![Android nRF Hamberger](https://github.com/user-attachments/assets/ea6dfeef-9367-4830-bd70-1441d517c706) + +![Android nRF Settings](https://github.com/user-attachments/assets/c63726bf-cecd-4987-be68-afb6358c7190) + +![Android nRF DFU Options](https://github.com/user-attachments/assets/b20e872f-5122-41d9-90df-0215cff5fbc9) + +2. Change `Number of packets` to `10` for RAK, `8` for Heltec T114 + +![Android nRF Number of Packets](https://github.com/user-attachments/assets/c092adaf-4cb3-460b-b7ef-8d7f450d602b) + +3. Go back to the main screen +4. Your LoRa device should already ben in DFU mode from previous steps +5. tap `SCANNER` and then `SCAN` to find the device you want to update, tap `CONNECT` + +![Android nRF Scanner Scan Connect](https://github.com/user-attachments/assets/37218717-f167-48b6-a6ca-93d132ef77ca) + +6. On the top left corner of the nRF Connect app, tap the `DFU` icon next to the three dots + +![Android nRF DFU](https://github.com/user-attachments/assets/1ec3b818-bf0c-461f-8fdf-37c41a63cafa) + +7. Choose `Distribution packet (ZIP)` and then `OK` + +![Android nRF Distribution Packet (ZIP)](https://github.com/user-attachments/assets/e65f5616-9793-44f5-95c0-a3eb15aa7152) + +8. Choose the firmware file in ZIP formate that you downloaded earlier from the MeshCore web flasher, update will start as soon as you tap the file + +![Android nRF FW Updating](https://github.com/user-attachments/assets/0814d123-85ce-4c87-90a7-e1a25dc71900) + +9. When the update process is done, the device will disconnect from nRF app and the LoRa device is updated + --- From 4a0f4f4b68c65b56e9ee80d2a31b17d350c77670 Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Tue, 11 Mar 2025 09:11:14 +0100 Subject: [PATCH 5/5] set cpu freq in ESP32Board.h --- examples/companion_radio/main.cpp | 4 ---- examples/simple_repeater/main.cpp | 4 ---- examples/simple_room_server/main.cpp | 5 ----- examples/simple_secure_chat/main.cpp | 5 ----- platformio.ini | 3 ++- src/helpers/ESP32Board.h | 4 ++++ 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index e719e900..29ec7028 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -1246,10 +1246,6 @@ void setup() { Serial.begin(115200); board.begin(); -#ifdef ESP32_CPU_FREQ - setCpuFrequencyMhz(ESP32_CPU_FREQ); -#endif - #ifdef SX126X_DIO3_TCXO_VOLTAGE float tcxo = SX126X_DIO3_TCXO_VOLTAGE; #else diff --git a/examples/simple_repeater/main.cpp b/examples/simple_repeater/main.cpp index e9f6d480..5743647b 100644 --- a/examples/simple_repeater/main.cpp +++ b/examples/simple_repeater/main.cpp @@ -664,10 +664,6 @@ void setup() { delay(1000); board.begin(); - -#ifdef ESP32_CPU_FREQ - setCpuFrequencyMhz(ESP32_CPU_FREQ); -#endif #ifdef ESP32 fallback_clock.begin(); #endif diff --git a/examples/simple_room_server/main.cpp b/examples/simple_room_server/main.cpp index 5f7d577a..285d59c6 100644 --- a/examples/simple_room_server/main.cpp +++ b/examples/simple_room_server/main.cpp @@ -726,11 +726,6 @@ void setup() { delay(1000); board.begin(); - -#ifdef ESP32_CPU_FREQ - setCpuFrequencyMhz(ESP32_CPU_FREQ); -#endif - #ifdef ESP32 fallback_clock.begin(); #endif diff --git a/examples/simple_secure_chat/main.cpp b/examples/simple_secure_chat/main.cpp index f34f025f..951d51dc 100644 --- a/examples/simple_secure_chat/main.cpp +++ b/examples/simple_secure_chat/main.cpp @@ -566,11 +566,6 @@ void setup() { Serial.begin(115200); board.begin(); - -#ifdef ESP32_CPU_FREQ - setCpuFrequencyMhz(ESP32_CPU_FREQ); -#endif - #ifdef SX126X_DIO3_TCXO_VOLTAGE float tcxo = SX126X_DIO3_TCXO_VOLTAGE; #else diff --git a/platformio.ini b/platformio.ini index 7ecb7ff4..d89737ea 100644 --- a/platformio.ini +++ b/platformio.ini @@ -31,6 +31,8 @@ extends = arduino_base platform = espressif32 monitor_filters = esp32_exception_decoder extra_scripts = merge-bin.py +build_flags = ${arduino_base.build_flags} +; -D ESP32_CPU_FREQ=80 ; change it to your need build_src_filter = ${arduino_base.build_src_filter} ; ================ @@ -126,7 +128,6 @@ build_flags = -D SX126X_DIO3_TCXO_VOLTAGE=1.8 -D SX126X_CURRENT_LIMIT=130.0f ; for best TX power! -D SX126X_RX_BOOSTED_GAIN=true - -D ESP32_CPU_FREQ=240 build_src_filter = ${esp32_base.build_src_filter} lib_deps = ${esp32_base.lib_deps} diff --git a/src/helpers/ESP32Board.h b/src/helpers/ESP32Board.h index 45fb16bd..70e29575 100644 --- a/src/helpers/ESP32Board.h +++ b/src/helpers/ESP32Board.h @@ -17,6 +17,10 @@ public: // for future use, sub-classes SHOULD call this from their begin() startup_reason = BD_STARTUP_NORMAL; + #ifdef ESP32_CPU_FREQ + setCpuFrequencyMhz(ESP32_CPU_FREQ); + #endif + #ifdef PIN_VBAT_READ // battery read support pinMode(PIN_VBAT_READ, INPUT);