RAK4631 / RAK19007: RF Switch Problem?

Hello all

Meshtastic is great, we’ve played around with it for while now using T-Beam and T-Echo devices, and it works pretty well there! But now I’ve encountered a strange problem while testing it on the RAK4631 module with the RAK19007 base board, with the current firmware (2.0.10.e09b12c Beta):

Somehow, there is almost no power reaching the antenna.

It is still possible to exchange messages between nearby Meshtastic nodes, but the signal is very weak, below the noise floor. The LoRa signal is not visible at all in the spectrum (checked in the waterfall diagram at 868 MHz with SDRSharp and an SDR-RTL stick) and a VSWR meter (compared to Meshtastic on a working T-Beam v1.1).

To find out more, I’ve also tested it with older firmware versions, self-built binaries (develop branch), various Meshtastic settings, full factory reset, on different RAK4631 devices, but with no luck so far…

I suspect that the issue is related to the SX1262 pin mapping and the RF switch, but I might be completely wrong and couldn’t find anything useful in the code yet:

The hardware itself doesn’t seem to be the problem, testing it with the RAK LoRaP2P_TX example with Arduino results in a strong signal visible in the spectrum:

Did you encounter similar issues on the RAK4631/RAK19007?

Any suggestions would be welcome.

1 Like

Indeed others have seen this problem as well. There is a ‘fix’ for this in the latest alpha release (2.0.13).

Thanks for the quick reply, I’ve flashed the current alpha firmware to the RAK4631 (firmware-rak4631-2.0.13.7e27729.uf2), after a factory erase and setting the region manually. But this didn’t change the behavior in my case, the the issue is still present, it seems as if the RF switch still isn’t turned on, the TX signal is very weak.

I see that it didn’t work for someone else either. Others said they didn’t have problems with firmware version 2.0.5, maybe it’s worth a try. From Meshtastic firmware 2.0.5 to 2.0.6, RadioLib was updated from version 5.4.1 to 5.5.0.

I was having the same problem on 4 devices on 19003 and 19007 board,
also as far as i have tested updating to xx13xx did not help.

i will try 2.05 thank you

Thanks a lot for helping out!

Today I’ve tried both of these firmwares on the RAK4631/RAK19007, but without any luck so far (no TX signal):

Interesting, maybe there’s a way to find out more in the SX126x-Arduino library, which is used in the basic RAK Arduino examples:

Like already mentioned, the LoRaP2P_TX example works fine on my RAK board (strong signal), but it’s difficult for me to find the exact spot where the RF switch and TCXO is handled, and where the Arduino code differs from the RadioLib used in the Meshtastic firmware, probably it’s just a small mistake (in the pin mapping or initialization order?). I have no experience with this code base at all, but maybe it is possible find out more there:

I’m seeing the same issue on 3 new units (19003/4631.) TX power is very weak and barely registers on an analog rssi meter. I tried 2.0.3, 5, 10, 13 and see the same issue with all firmware versions.

Anxious to get to the bottom of this.

I should note that the power draw during TX is about 60ma, which seems inline with what others have reported with normally functioning nodes.

Could running in this condition damage the radio if normal power is being applied but not being routed properly to the antenna?

if that was the case, all my rak4631 would be broken now :frowning:
i hope not…
i had the same, very low tx, but 50+ mA going in when tx…

Status update:

  • I was wrong, the radio signal is clearly visible in the waterfall diagram (at ~869.418 MHz in my case, tested with SDRSharp with an SDR-RTL stick, self-built Meshtastic firmware, no modifications (develop branch, cc0cccb), default settings, EU_868 region set manually via Android app after factory erase).

    Like described in the documentation, the default center frequency is set to 869.525 MHz after a factory reset, not exactly to 868 Mhz (see Radio Settings | Meshtastic).

    So that’s good, testing should be easier now. All other settings behave normal (like changes of TX power and modem preset).

  • The TX power is still weak. When compared to the LoRaP2P_TX Arduino example running on the same RAK device, with the same antenna and similar LoRa settings, same setup: Here, the signal appears right at ± 868 MHz, it’s much stronger (peak is clearly higher in the spectrum analyzer).

  • The measured RF output power is low, measured with an analog SWR & Power Meter (Daiwa 140~525). In fact, there’s no indication of any output power on the meter at all. Compared to that, the LoRaP2P_TX example shows a strong steady output signal on the meter. In both cases, settings set to max TX power, narrow bandwidth, long air time.

Current ideas for a possible solution (I’m no RF / LoRa / EE expert at all):

  • Maybe the SX1262 current limit is the problem?
  • PLL / TCXO problem, maybe the delay is wrong?
  • DCDC / LDO issue?
  • RF switch…

thank you rgj.,
my RAK devices behave similar.
i Dont have the equipment to measure tx output directly, but i can read rssi at receiving device (t-echo).
the RAK4631 devices have very weak output. Like this, they can not compete with old t-beam…
all measured in short distance, about 1m.
All devices except rak on version 2.0.12xxx:
old t beams : rssi -13
t-echo: rssi -12
heltecV3wsl: rssi --14
RAK4631 rssi -45 / -78 /different antennas.
SAME for firmware Version 2.0.13xxx or older Version 2.0.2xxx

Thanks for checking kilroy, I get similar results, but the SNR/RSSI values are higher:

Some random SNR/RSSI values extracted from the UART debug logs:
rxSNR=6.75 rxRSSI=6.75
rxSNR=5.75 rxRSSI=5.75
rxSNR=6.5 rxRSSI=6.5
rxSNR=5.5 rxRSSI=5.5
rxSNR=5.25 rxRSSI=5.25

Tested with Meshtastic 2.0.14 (self-built firmware, develop branch, cc0cccb), LONG_SLOW setting, TX power set to 27 in app, distance between devices <1 meter. Both RAK devices were powered via USB. One device used the small RAK4631 antenna, the other one a better antenna (connected with U.FL to SMA pigtail).

If you would have any leads or suggestions for what could be checked in the code, then I could try that tomorrow, and see if changes anything…

Hm… that’s strange, RSSI values are usually negative, and in the debug logs they were apparently always equal to the SNR values, that can’t be right. So, I’ve quickly looked it up, and it turns out to be a tiny mistake in the debug log code there:

That should be:

        LOG_DEBUG(" rxRSSI=%d", p->rx_rssi);

Same setup as before, some random values from the debug UART logs. The SNR/RSSI values look more realistic now:
rxSNR=4.5 rxRSSI=-59
rxSNR=5 rxRSSI=-57
rxSNR=5.25 rxRSSI=-58
rxSNR=5.5 rxRSSI=-60
rxSNR=5.25 rxRSSI=-54
rxSNR=4.75 rxRSSI=-58

(At the moment I don’t have a T-Beam here to compare the values to, but I think an RSSI always below -56 dBm is clearly too low with this almost ideal setup (<1 m distance between the sender/receiver, max TX power), but I don’t have enough experience with RF/LoRa/Meshtastic to really say what’s going on).

Yes I agree those RSSI values are very low and I’m seeing the same thing. In my bench tests a Heltec and tbeam were both around -20 and the RAKs were around -60. This results in range similar to Bluetooth or maybe slightly better.

Thanks for checking and comparing the signal strength to other boards, I get similar values.

Today I’ve also checked the RSSI/SNR with the LoRaP2P TX/RX examples, on two RAK4631s (setup like above). The RSSI values ranged between -12 dBm and -23 dBm, like also discussed in that thread.

With firmware 2.0.13 (set to EU_868, LONG_SLOW, no other changes after factory reset), I get this:
rx_snr: 6.75 dB / rx_rssi: -53 dBm
rx_snr: 5.25 dB / rx_rssi: -53 dBm
rx_snr: 6.75 dB / rx_rssi: -49 dBm
rx_snr: 7.25 dB / rx_rssi: -40 dBm
rx_snr: 6.0 dB / rx_rssi: -37 dBm
rx_snr: 5.5 dB / rx_rssi: -38 dBm
rx_snr: 4.75 dB / rx_rssi: -38 dBm

(some random samples, checked in Android app, after enabling debug logs)

To switch back to version 2.0.13 (discussed there: Remote Node Administration does not work, somehow - #27 by SR7673 ) didn’t solve the issue in my case yet, but the SNR/RSSI values seem to have improved a bit.

Assuming you have just these 868 MHz nodes for measuring (or estimating) the RF power (a relative measurement), it could be useful to place one of these nodes in the basement of your house. There, the noise floor is lower, less unwanted other signals affecting the SNR measurement. Keep both nodes in the exact position, including the orientation of the antennas.
Then check if the rssi is stable to winthin ± 1 dB. And if so, try again to play with the firmware. Also you may check varying the output power. If you reduce from 20 dBm to say 10 dBm, the rssi should drop from e.g. -44 to -54…
Good luck.
PS: And use these small / inefficient antennas delivered with the nodes.

Good points, thanks for the help SR7673, I can measure/test again in more detail with an improved setup when there’s a chance to find a solution… for now, I had to stop looking into this.

The result is clear:

All tested Meshtastic RAK4631 firmwares show 0 measurable TX power on the SWR & Power Meter (Daiwa 140~525). That’s also reflected in weak outdoor range performance and the low RSSI values, shown above (compared to the T-Beam). Changing various Meshtastic LoRa settings or switching antennas didn’t help.

The RAK hardware isn’t the problem, a comparison to the RAK LoRaP2P example showed that (described above).

So, I assume, there’s a bug somewhere in the Meshtastic firmware, I’ve tested it on multiple RAK4631s (and yes, only 868 MHz devices have been tested, but changing region in software didn’t change the performance):

  • TCXO?
  • RF Switch?
  • DCDC / LDO?
  • SX1262 configuration (PA?)?

At the moment, I’m out of ideas and haven’t found a fix by poking around in the code (please let me know if you have any leads or suggestions, that’s where I tried some modifications, without any luck so far:

  • meshtastic-firmware/variants/rak4631/variant.h
  • meshtastic-firmware/src/mesh/SX126xInterface.cpp
  • libdeps/rak4631/RadioLib/src/modules/SX126x/SX1262.cpp)

Sorry, i didn’t read your above posts carefully so far. Now i see…
Yes, of course, if you get a clear measurement on your power meter when using a different software to steer the lora module, then it’s obviously not a hardware problem. So it must be the firmware. Or maybe some parameters?

At least i clearly measured 20 dBm (when set to 20 dBm) on a RAK4631 (traditionally mounted on the RAK19007) using 2.0.13, so this is working…

It would be helpful to do the following:
Collect data and print a table containing: Requested power [dBm] | Measured power [dBm] | Measured current [mA].
Maybe there is an unexpected step somewhere, something discontinous, nonlinear… This could indicate that a bit has been set false.

I noticed a similar unexpected low output power on the TBeam at 2.0.13. Just 9 dBm instead of 20 dBm, a very big loss of performance in real mesh conditions.

I have some experience with Arduino programming, also Raspi stuff. Will start to have a look and those .cpp files, maybe it is not as complex as expected.

1 Like

i can confirm:
i have had very low output on 4 differnet Rak devices the last weeks.

now i downgraded them to 2.0.5
and 3 of 4 devices ow have good tx.
rssi on receiving device around -10 in short distance.
1 device just tx rssi -20 :frowning:

Just the power comsumption of the RAK devices with gps is still a problem…
for comparison:
i measured the power comsumption of a t-echo, here it its working fine. 4-6mA and 40mA only short time when getting ne gps data…(depending on settings) why can the RAK not be like this??