The Waveshare RP2040-LoRa board has an RF switch with two complementary
control lines:
- DIO2 (CTRL) -- driven automatically by the SX1262 chip: HIGH on TX,
LOW on RX
- GPIO17 (!CTRL) -- was not configured in MeshCore, so it floated and
the switch never properly selected the LNA/RX path
Without this pin driven, the RF switch never switches to RX mode,
resulting in completely degraded reception. TX was unaffected because
DIO2 alone is sufficient to activate the TX path.
Adding SX126X_RXEN=17 lets RadioLib drive GPIO17 as the complement of
DIO2, so the switch correctly routes the signal to the LNA on receive.
Reference: https://files.waveshare.com/wiki/RP2040-LoRa/Rp2040-lora-sch.pdf
variants/thinknode_m5/platformio.ini contained actual WiFi SSID and
password credentials (Livebox-633C) committed by mistake. Replaced
with placeholder values consistent with other variants (myssid/mypwd).
env:Generic_ESPNOW_room_svr was using 'Heltec Room' as ADVERT_NAME,
causing Generic ESPNow room server nodes to advertise with the wrong
device name on the mesh.
Repeater and Room Server environments in variants/thinknode_m5/platformio.ini
were using 'Thinknode M2' as the ADVERT_NAME, causing M5 nodes to advertise
with the wrong device name on the mesh.
- env:ThinkNode_M5_Repeater: 'Thinknode M2 Repeater' -> 'Thinknode M5 Repeater'
- env:ThinkNode_M5_room_server: 'Thinknode M2 Room Server' -> 'Thinknode M5 Room Server'
JP LBT mode now activates automatically based on operating frequency:
- CH25: 920.800MHz
- CH26: 921.000MHz
- CH27: 921.200MHz (ARIB STD-T108, 200kHz grid)
Changes:
- Add isJapanMode() to RadioLibWrapper using getFreqMHz()
- Add getFreqMHz() to CustomSX1262Wrapper and CustomLR1110Wrapper
- Remove #ifdef JP_STRICT throughout, replaced by isJapanMode()
- Remove -D JP_STRICT build flag from platformio.ini
- MAX_TEXT_LEN dynamically determined by CR at runtime via getMaxTextLen()
No build flags required: JP compliance activates automatically
when device is configured to Japan 3 frequencies.
MAX_TEXT_LEN is automatically selected based on the LORA_CR build flag
defined in platformio.ini (e.g. -D LORA_CR=5).
CR4/5: 48 bytes (~16 JP chars, TX ~3808ms)
CR4/6: 32 bytes (~10 JP chars)
CR4/7: 24 bytes (~8 JP chars)
CR4/8: 16 bytes (~5 JP chars, default)
To enable CR4/5 for Japan, add -D LORA_CR=5 to your board's
build_flags in platformio.ini. Set LORA_CR=5 for WioTrackerL1 and RAK WisMesh Tag.
JP_STRICT limits MAX_TEXT_LEN to 1*CIPHER_BLOCK_SIZE (16 bytes) to keep
TX time under 4 seconds on SF12/BW125/CR4-8 (Japan LoRa settings).
SF12/BW125/CR4-8 airtime:
60 bytes total packet = ~3809ms (within 4s limit)
packet overhead ~44 bytes, leaving 16 bytes for text payload
Enabled only for WioTrackerL1 and RAK_WisMesh_Tag builds.
As @LitBomb pointed out in his [comment](https://github.com/meshcore-dev/MeshCore/issues/2118#issuecomment-4108168109) on #2118 RX Boosted Gain should not be enabled for the Station G2.
This change is a fix for #2124 to make the default of `radio.rxgain` to be OFF on the Station G2.
This restores the pre-1.14.1 behaviour with the only change being the user is now able to change the setting in the CLI.