From f9ccda7d6192d8527365b10975d0489a3da7867d Mon Sep 17 00:00:00 2001 From: martenumberto Date: Sun, 7 Jun 2026 15:39:32 +0200 Subject: [PATCH 1/2] Added several Flags to fix some issues with RAK3401 (I2C, GPS and BME Sensor) --- variants/rak3401/fix_bsec_lib.py | 15 +++++++++++++++ variants/rak3401/platformio.ini | 10 ++++++++++ 2 files changed, 25 insertions(+) create mode 100644 variants/rak3401/fix_bsec_lib.py diff --git a/variants/rak3401/fix_bsec_lib.py b/variants/rak3401/fix_bsec_lib.py new file mode 100644 index 0000000000..605ff1187f --- /dev/null +++ b/variants/rak3401/fix_bsec_lib.py @@ -0,0 +1,15 @@ +Import('env') +import os + +# Bosch has a goof in their PlatformIO packaging making linking fail. +# The BSEC library's extra_script.py selects cortex-m4/libalgobsec.a (soft-float ABI). +# nRF52840 compiles with -mfloat-abi=hard, requiring the fpv4-sp-d16-hard blob. +# Workaround to prepend the hard-float path so the linker finds it before the +# soft-float one. +bsec_hard = os.path.join( + env.subst('$PROJECT_DIR'), + '.pio', 'libdeps', env.subst('$PIOENV'), + 'BSEC Software Library', 'src', + 'cortex-m4', 'fpv4-sp-d16-hard' +) +env.Prepend(LIBPATH=[bsec_hard]) \ No newline at end of file diff --git a/variants/rak3401/platformio.ini b/variants/rak3401/platformio.ini index 20a8a548b9..15c7782027 100644 --- a/variants/rak3401/platformio.ini +++ b/variants/rak3401/platformio.ini @@ -2,17 +2,26 @@ extends = nrf52_base board = rak3401 board_check = true +extra_scripts = ${nrf52_base.extra_scripts} + post:variants/rak3401/fix_bsec_lib.py build_flags = ${nrf52_base.build_flags} ${sensor_base.build_flags} -I variants/rak3401 -D RAK_3401 -D NRF52_POWER_MANAGEMENT + -D PIN_BOARD_SCL=14 + -D PIN_BOARD_SDA=13 + -D PIN_GPS_TX=PIN_SERIAL1_RX + -D PIN_GPS_RX=PIN_SERIAL1_TX -D RADIO_CLASS=CustomSX1262 -D WRAPPER_CLASS=CustomSX1262Wrapper -D LORA_TX_POWER=22 -D SX126X_CURRENT_LIMIT=140 -D SX126X_RX_BOOSTED_GAIN=1 -D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX with SKY66122 FEM + -D ENV_INCLUDE_RAK12035=1 + -UENV_INCLUDE_BME680 + -D ENV_INCLUDE_BME680_BSEC=1 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/rak3401> + @@ -23,6 +32,7 @@ lib_deps = ${sensor_base.lib_deps} adafruit/Adafruit SSD1306 @ ^2.5.13 sparkfun/SparkFun u-blox GNSS Arduino Library@^2.2.27 + boschsensortec/BSEC Software Library @ ^1.8.1492 [env:RAK_3401_repeater] extends = rak3401 From acac4af3ec3104d8c15c3dd8eb5f0aec75854260 Mon Sep 17 00:00:00 2001 From: Rastislav Vysoky Date: Sun, 23 Aug 2026 20:13:12 +0200 Subject: [PATCH 2/2] FAQ: Fixed instructions on wiping and resetting nrf52 devices --- docs/faq.md | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index c7d7a118e3..e53d3a4d93 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -691,23 +691,28 @@ You can get the epoch time on and use it to set ### 6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection. **A:** Heltec V3 has a very small coil antenna on its PCB for Wi-Fi and Bluetooth connectivity. 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. -### 6.7. Q: My RAK/T1000-E/xiao_nRF52 device seems to be corrupted, how do I wipe it clean to start fresh? -**A:** - -1. Connect USB-C cable to your device, per your device's instruction, get it to flash mode: - - For RAK, click the reset button **TWICE** - - For T1000-e, quickly disconnect and reconnect the magnetic side of the cable from the device **TWICE** - - For Heltec T114, click the reset button **TWICE** (the bottom button) - - For Xiao nRF52, click the reset button once. If that doesn't work, quickly double-click the reset button twice. If that doesn't work, disconnect the board from your PC and reconnect again ([seeed studio wiki](https://wiki.seeedstudio.com/XIAO_BLE/#access-the-swd-pins-for-debugging-and-reflashing-bootloader)) -2. A new folder will appear on your computer's desktop -3. Download the `flash_erase*.uf2` file for your device on - - RAK WisBlock and Heltec T114: `Flash_erase-nRF32_softdevice_v6.uf2` - - Seeed Studio Xiao nRF52 WIO: `Flash_erase-nRF52_softdevice_v7.uf2` -4. drag and drop the uf2 file for your device to the root of the new folder -5. Wait for the copy to complete. You might get an error dialog, you can ignore it -6. Go to , click `Console` and select the serial port for your connected device -7. In the console, press enter. Your flash should now be erased -8. You may now flash the latest MeshCore firmware onto your device +### 6.7. Q: My RAK/T1000-E/xiao_nRF52/... device seems to be corrupted, how do I wipe it clean to start fresh? +**A: If you're able to connect to the device from your MeshCore app** +1. Navigate to Gear icon(Settings) on the upper right corner +2. Click on `Export Settings` button, choose `Select All` and Confirm. This will save your Node configuration +3. Now choose `Factory Reset` option +4. Confirm that you want to reset your device +5. Go to Bluetooth System settings and remove pairing of the device, so you can connect again +6. Connect your device in the app and enter the PIN +7. Navigate to Gear icon(Settings) on the upper right corner +8. Click on `Import Settings` and choose the file from 2., click on `Select All` and Confirm +9. Find `Reboot` button on of the Settings list + +**B: You're not able to connect to the App** +1. Connect USB cable to your device +2. Go to https://flasher.meshcore.io +3. Search for your device in the list +4. Choose `Companion Bluetooth` +5. Press `Enter DFU mode` button, choose your USB device +6. Press `Erase Flash` button, choose the device again and wait until it completes +7. Press `Flash!` button and choose the USB device last time +8. The device is erased and newest firmware is installed +9. You might need to remove the pairing in Bluetooth System Settings in order to re-pair the app again. Separately, starting in firmware version 1.7.0, there is a CLI Rescue mode. If your device has a user button (e.g. some RAK, T114), you can activate the rescue mode by holding down the user button of the device within 8 seconds of boot. Then you can use the 'Console' on @@ -716,9 +721,9 @@ Separately, starting in firmware version 1.7.0, there is a CLI Rescue mode. If y `NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port.` -Allow the browser user on it: +Allow user access on your USB port: -`# setfacl -m u:YOUR_USER_HERE:rw /dev/ttyUSB0` +`sudo setfacl -m u:$USER:rw /dev/ttyUSB0` ---