RAK4631 / SX1262 TX issue: RX improved after old fixes, TX still not received
Summary
I am seeing a RAK4631 / SX1262 TX problem with microReticulum_Firmware 1.86 / 1.86.2.
With the official firmware, my RAK4631 devices did not communicate with working Heltec V4 nodes:
Heltec V4 -> Heltec V4: OK
Heltec V4 -> RAK4631: no RX / no announce
RAK4631 -> Heltec V4: no RX / no announce
RAK4631 -> RAK4631: no RX
After investigating the repository, I found old commits in origin/rak4631 that seem directly related:
7b0074d Fix SX1262 TX on boards with external RX-enable pin
1926f15 Fix SX1262 init order, OCP, and regulator mode
These fixes appear to be missing from current master / release 1.86 / 1.86.2.
I created a local branch from current master and cherry-picked both commits. After flashing a locally built RAK4631 firmware, behavior improved:
Heltec V4 -> RAK4631: works partially; RAK RX increases and MeshChatX sees the Heltec announce.
RAK4631 -> Heltec V4: still does not work; Heltec RX remains 0, no announce, no messages.
So the old fixes seem relevant and partially effective: they appear to fix or improve RAK4631 RX/init. However, RAK4631 TX still does not appear to radiate usable packets.
Hardware
2x Heltec WiFi LoRa 32 V4
2x RAK4631 / SX1262 / 779-928 MHz
Region/frequency: EU868
Mode: Normal host-controlled RNode mode
Application: MeshChatX
Antennas are correctly connected to the LoRa connector, devices are placed at a reasonable distance, and all devices are configured for 868 MHz.
RAK4631 info
Product : RAK4631 779 - 928 MHz (10:12:51)
Firmware version : 1.86
Hardware revision : 1
Modem chip : SX1262
Frequency range : 779.0 MHz - 928.0 MHz
Max TX power : 22 dBm
Device mode : Normal (host-controlled)
EEPROM checksum : correct
Device signature : validated
Radio parameters
Frequency : 868000000 Hz
Bandwidth : 125000 Hz
Spreading Factor : 8
Coding Rate : 5
TX Power : 14 dBm
Local test branch
My local test branch is based on current master:
0b1c264 Optimizing builds for constrained devices
I applied:
54a10d5 Fix SX1262 TX on boards with external RX-enable pin
94b499a Fix SX1262 init order, OCP, and regulator mode
I also tried an extra local experiment:
a221646 Experiment: reassert RAK4631 DIO2 RF switch before TX
This experiment reasserts txAntEnable() and OP_DIO2_RF_CTRL_6X immediately before OP_TX_6X in sx126x::endPacket().
Result: no change for TX. The RAK4631 still receives Heltec announces, but the Heltec still receives nothing from RAK4631 transmissions.
Local diff summary
sx126x.cpp | 42 ++++++++++++++++++++++++++++++++++++++----
sx126x.h | 3 +++
Main changes tested:
- Added txAntEnable(), driving _rxen LOW before TX.
- Moved TCXO/regulator setup before calibration.
- Added setRegulatorDCDC().
- Added clearDeviceErrors().
- Changed SX1262 OCP to 0x38.
- Reasserted DIO2 RF switch immediately before OP_TX_6X as an extra experiment.
Current interpretation
The old origin/rak4631 fixes appear relevant and partially effective. After applying them locally, RAK4631 RX improves enough to receive Heltec V4 announces.
However, RAK4631 TX still appears not to radiate usable packets.
Given the RAK4631 board configuration:
DIO2_AS_RF_SWITCH = true
pin_rxen = 37
pin_txen = -1
HAS_TCXO = true
HAS_RF_SWITCH_RX_TX = true
the remaining issue may still be related to the RAK4631 SX1262 TX RF switch / PA path / DIO2 TX gating / PA configuration.
Question
Could the old origin/rak4631 fixes be reintegrated into current master, and is there another missing RAK4631-specific TX path fix?
I can provide my local patch/diff and test logs if useful.
I also generated a local patch file from the test branch:
rak4631_sx1262_test_fixes.patch
It contains the two cherry-picked fixes from origin/rak4631 plus the additional local experiment reasserting txAntEnable() and OP_DIO2_RF_CTRL_6X immediately before OP_TX_6X.
The patch is small, about 7.2 KB, and only touches:
sx126x.cppsx126x.h
I can attach it here if useful.
I am experimenting with RAK4631+RAK15001 as transport nodes and had to disable interference avoidance (rnodeconf --ia-disable) to get the RAK's to successfully manage to send data (i.e. responding to my probes). Perhaps this is related? This was with 1.85.10, however.
@millyt-dorsen beat me to that suggestion. For reasons I haven't yet explored, the RNode_Firmware that this repo derives from has the interference avoidance feature which seems to completely hose nRF52 boards. Simply disabling that is the right solution for TX.
Regarding RX sensitivity, that's interesting that you've experienced an increase with some of the changes in the rak4631 branch. I didn't end up merging that because I felt like I was barking up the wrong tree, but if there are gains to be added I'll definitely reconsider. I am curious to know which changes exactly provided your improvements @massimilianopal .
Update: I retested with the official 1.86 firmware, without my local patched branch.
The RAK4631 was wiped, reinstalled/provisioned as:
Product : RAK4631 779 - 928 MHz
Firmware version : 1.86
Modem chip : SX1262
Frequency range : 779.0 MHz - 928.0 MHz
Device mode : Normal (host-controlled)
With the official firmware and the default IA setting, the issue was still present. The behavior was slightly different from some of my earlier tests: RX on the RAK was not always stuck at zero, but communication was still not reliable/usable.
Then I ran:
rnodeconf --ia-disable /dev/cu.usbmodem1101
After disabling interference avoidance, communication started working with the official firmware:
Official 1.86, IA default:
- Heltec V4 -> RAK4631: partial / unstable
- RAK4631 -> Heltec V4: not reliable
- Messages: not reliable
Official 1.86, IA disabled:
- Heltec V4 -> RAK4631: OK
- RAK4631 -> Heltec V4: OK
- Messages: OK
So in my setup, the practical fix is confirmed: disabling interference avoidance is sufficient to make the RAK4631 communicate with the Heltec V4 using the official firmware.
Regarding the RX sensitivity / RX improvement comment: I should clarify that I did not measure RX sensitivity directly. What I observed earlier was an improvement in RX/init behavior while testing my local patched build, but I did not isolate the individual commits enough to claim a measured sensitivity gain.
The local patched build included:
7b0074d Fix SX1262 TX on boards with external RX-enable pin
1926f15 Fix SX1262 init order, OCP, and regulator mode
a221646 local experiment reasserting DIO2 RF switch before TX
My best interpretation is:
a221646did not help TX; after that experiment, RAK -> Heltec was still not received.7b0074dis mainly related to the external RX-enable / TX RF switch handling, so it is probably more relevant to the TX path than to RX sensitivity.- If any of the old
rak4631branch changes improved RX/init behavior in my tests, the most likely candidate is1926f15, because it changes SX1262 init order, TCXO handling, regulator mode, error clearing, calibration order, and OCP.
However, since official 1.86 + rnodeconf --ia-disable now works, I would not say the rak4631 branch fixes are required for basic communication in my setup. A proper A/B test would still be needed to determine whether 1926f15 gives any additional RX/init reliability or sensitivity improvement compared to official 1.86 with IA disabled.
Hi, I thinks this is related to PR #41. I also had troubles getting the firmware to run on Heltec T114 ( nrf52-based). This PR seems to fix the behavior for my devices with a small change to the interference avoidance logic. I did not test on ESP32 devices, so I am not sure wether this issue is exclusive to nrf52 boards tho.