-
Notifications
You must be signed in to change notification settings - Fork 396
🔧 Fix GC1109 FEM LNA being used for Heltec v4 RX #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
🔧 Fix GC1109 FEM LNA being used for Heltec v4 RX #1249
Conversation
7dcc916 to
d84784e
Compare
Yeah maybe, I haven't tested with a lot of antennas yet. There's definitely something funky going on with the PA/LNA and the RX gain though. |
d84784e to
dcfea36
Compare
It'
@fschrempf It gets more tricky. But I think we actually might just need to set |
|
Updated with latest finding. I have tested for limited time but RX is heaps better, so others please do test! |
bc5e4be to
044505d
Compare
|
I was asked to build the firmware, here you go for ble companion and repeater
realized heltec wireless tracker v2 uses same chip: |
The repeater is also a companion firmware:-( |
|
Oops let me check |
Try now. Same URL. |
Thank you! |
683ac76 to
2736011
Compare
|
For those running the observer uplink firmware, there is a version to test compiled with this fix: https://discord.com/channels/1343693475589263471/1417491962675593296/1452383493295439903 Running that here but don't see a significant difference yet. |
For observer firmware, if you never enable the TX path I would guess the LNA stays properly enabled and you wouldn't see much difference. If I kept TX low always I also saw great reception with the current firmware. Only after sending once would the RX deteriorate. |
Observers are repeater firmware with mqtt uplink. So they do use TX a lot. Will keep monitoring the effect on my repeater. |
Ah okay. Only easy way to test is having two devices next to each other or otherwise testing with nodes at the edge of your reach. |
The definition |
|
basically, there is no firmware fixed way |
Why not? |
|
because there is no way to turn off that LNA by command |
@spiralshapeturtle Modifying the registers can improve V4 reception, which we have tested extensively. However, we are not entirely certain whether modifying the LNA control pins is effective; further testing is needed to rule out any randomness. |
The main change in the LNA control is this we are not trying to fight with radiolib on the control of it.
|
Sure, I can build those. Regarding the debug output intermittency, I haven't experienced this myself. What platform are you running on, Linux, Windows, Mac? The v4 doesn't have a CP2102 USB <-> Serial converter like the v3 does. Instead, it uses the internal USB Serial/JTAG controller built into the ESP32. It behaves differently and will drop/reconnect when you reset the ESP32. |
Thats a nice overview! Thanks the only missing part is the "what does the register setting" from @Quency-D ? Hope you are able to fulfill my wish below in a moment of spare time. @weebl2000 im more than happy to test when the 2nd V4 arrives could you hand me 3 repeater builds:
One more thing: could you also take a look at the disconnecting RS232 ports? You mentioned compiling with the USB flags discussed last week. As far as I know, RS232 might be enabled by default and only the packet logging flag needs to be set ad advised by letsmesh.net? So: is it correct that my RS232 disconnects are not caused by the extra compile flags? My second test which might contain #2 from the list above if im right Wessel? Used heltec_v4_repeater_observer_mqtt-v1.11.0-localdev-respfix-e754317c.bin from here
|
Locally I haven't had any issues with debug flags enabled. Can you check my post above: which platform are you reading the USB port from? |
It's connected to a Pi5 or Pi4 with Raspbian, with the regular letsmeshbuild they are both (T114 and v4) solid regarding RS232. |
I was also reading them from a rpi 3 and pi zero 2W, which didn't have issues of the USB serial disconnecting. Can you run
Btw: I've switched to using the serial port of the rpi now to try and reduce USB bus noise. |
-T -w its an old log I could use these probably? But its stable with the letsmesh build, to be honest I don't think its related to my setup as the are now feeding all the data for 24hr plus without a glitch. I need to reflash the v4 to reproduced it, I can do but the file names does not clearly state which enhancements are embedded, which makes me guess which file relates to bullet 1,2,3. My assumption is that it working fine if you only enable the packet logging in the new builds. Could that be the way forward, if it then does not work I can collect the logs instantly. |
|
@weebl2000 analyzed some older logs: your build letsmeshbuild |
I'll build without DEBUG enabled, see if that fixes it for you. Which device did you configure in meshcoretomqtt .env? /dev/xxx |
You can find them here
|
Your the best! Let met test tomorrow when I'm home 👍 |
|
Hi my repeater is certainly deaf at the moment with an Heltec v4 in it. I am not able to test a v3 and v4 besides each other but I can flash this change on my repeater. At the moment I do not have a filter attached but I will as well. Can I flash this repeater software to test it: https://x230.weebl.me/public/heltec_v4_main+RX_fix_repeater.bin? And can I do this through OTA with erase device disabled? |
Yep, that works. Optionally you can try this one, it includes all dev changes and also has the register patch: https://x230.weebl.me/public/turtle_3_semtech+rxfix.bin It's working pretty good for me so far. |
The link https://x230.weebl.me/public/turtle_3_semtech+rxfix.bin does not work for me the other https://x230.weebl.me/public/heltec_v4_main+RX_fix_repeater.bin does work. Is the non-working link wrong? Does it matter if powersaving is on? |
Strange, the link works for me. Powersaving doesn't matter much (unless you want to save power, heh) |
I flashed it today with turtle_3_semtech+rxfix.bin. What does the version button tell you in the meshcore app? Mine still shows v1.11.0 November 2025, is that OK? |
Yes, for these builds I didn't bother changing the version numbers. |
Thanks ;-) I need to document it myself, no problem but I forgot which one I flashed this morning gehehe The USB RS232 is rock solid now! |
Indeed strange. Really can't download it always a 404 no matter which browser or wget command. Just not reachable. So I flashed the main+pr fix. It does not give me a different result as the normal release. Also not worse. I am situated 450meters from a gsm antenna. Once the weather is better I'll add a cavity as well. But if you could share the whole dev fix with this pr fix and the semtech fix together in a different way. I would be grateful and flash it too test before adding the cavity. |
|
|
Hello all Just wanted to do a quick chime in on this issue. Two days ago I applied the fix from https://github.com/weebl2000/MeshCore/tree/semtech_patch ( whitch afaik integrates the semtech patch and the LNA patch ) and the reception on my V4 greatly improved. Sadly, all I can do for you now is to share this anecdotical truth as I have no hard data to back this up, but hopefully it helps. The long story with background. I went to update my clients from the heltec v3 to the v4. Using the stock firmware i noticed that on the spot i do usually charge the devices the v3 reports noise floor about -105 and the v4 about -70. I quicky read up upon this that the LNA does this and went with it. Then I discovered that there is a reception difference between the two devices side by side. The v3 gets all the messages and the v4 does not. This was strange because the mesh here is great and neither the v3 nor my other wismesh tag had any problems on the same spot but the v4 did. After some digging i found this PR and gave it a spin, after 2 days of testing i can say that the v3 and the v4 get the same messages and the v4 did not miss any. |
|
Thanks @tpp-at-idx so you compare messages at the samen location between v3 and v4. One or two days back @weebl2000 posted 3 releases with a clear file naming. Are you able to distinct the difference between the Semtech register patch and the LNA patch? By comparing these two, I.e not the running the combined build. My main concern is that heltec is supporting the register patch from Semtech but does not commit on the LNA functionality. If we want to get this merged into a real MC releases we need to try to get the difference of both clear. And file one correct PR probably only the Semtech register patch. |
|
@spiralshapeturtle Sure, i can try to do some simple A/B testing and see how it goes, but sadly, the files posted in #1249 (comment) do not work for me, my node ended up bootlooping. I went on to the repo i have already cloned from https://github.com/weebl2000/MeshCore/tree/semtech_patch and edited platformio.ini for the heltec v4 to comment out the SX126X_SEMTECH_PATCH variable, so that should leave me with the LNA patch only to try for a few days as per my inderstanding of the code. I will run this for a few days and report how it goes. After that i will have to figure out how to disable the LNA patch and leave the semtech patch as i do not see a simple straight way how to do it but that is a problem for another day;) That said, and please forgive my coding and embedded device inexperience from the limited knowledge i have and from the knowledge that @weebl2000 shared in this PR i have the assumption that the LNA patch is somewhat correct and the way to do the PA/LNA switching regardless wether it fixes the receive issue or not and should be implemented regardless ( but maybe in another PR ) |
💯 fully agree. |
I agree that the logic written by @weebl2000 makes sense. However, I would really appreciate it if Heltec, via @Quency-D, could provide a formal company statement confirming whether this code is technically correct and acceptable from Heltec’s perspective. Ideally, the code would be reviewed and validated by Heltec’s own developers, and if approved submitted as a PR with their written endorsement for merging by Wessel. Some testing is available above @Quency-D and below as requested here With the cavity in place, I find it difficult to measure real-world differences. I also assume, as @tpp-at-idx mentioned, that the main benefits are achieved in scenarios where no cavity is installed and the receiver is oversteered with strong signals. That may explain why @Quency-D is unable to test this properly due to being located in a non-urban area, but we could help from our urban area's. Nevertheless, Heltec should still be able to confirm the correctness and validity of the proposed LNA code enhancement. Take responsibility and reach out for the current V4 issues out in the field, and help us by getting this fix into the new MeshCore release in the near future. From my own observations, the results also appear positive in my setup @weebl2000 at least my SNR on the v4 is strong and stable with the cavity. I killed my RS232 myself so it stopped unfortunately without noticing, let's grab the lines logged. Things to conclude from the units, the V4 +cavity is decoding more packets at the same point of time. with the V4 with turtle_3_semtech+rxfix.bin its running very well. Im just seeking for the guidance of Heltec in this matter. T114 McGill 9dBi antenna (30 cm lower mounted than the RAK) SNR to compare from the same Adverts Shall I run it without cavity, would that help? My first plan was to run it with the LNA fix only the next 24hours. |
I ran same test configuration as before again with the PR builds - both with and without the register patch by @weebl2000 (register value 1). This confirmed again that PR without register patch is not different from the existing v1.11.0 firmware in terms of RX reception. I then reviewed again the code changes in this PR against v1.11.0 and I found there's a significant discrepancy between the code change itself and the PR summary at the top:
I now created a new PR #1398 that only includes the register patch and no RX boosted gain in case others want to test as well. Test Sample:
|
We have been testing and verifying the modified register version. We have also arranged tests to assess the effects of modifying the GC1109 control pins, which are currently underway and may take some time. |
Thanks for the update good to hear that Heltec is actively testing and validating the modified register approach. For clarity, I want to restate the terminology used in this PR, as multiple mechanisms are being discussed: Semtech register patch LNA pin enhancement RX boosted gain While I appreciate that Heltec is still evaluating the GC1109 control-pin behavior, I do have some reservations about relying on the LNA pin enhancement as a final solution. Given Heltec’s reputation as a technically strong and fast-moving hardware vendor, the fact that the register-level fix is already being validated suggests this is likely the intended and more robust approach, with pin-level changes remaining secondary until proven otherwise |



















I was experiencing very bad RX with my heltec v4 so I investigated and debugged.
UPDATE 31/12/2025
After testing for a week on both companion and repeater with multiple people the overall conclusion so far is that this greatly improves the RX on Heltec v4.
UPDATE 23/12/2025, latest findings
The original implementation had incorrect understanding of the GC1109 FEM control pins. GPIO46 was incorrectly treated as a TX/RX switch, but it's actually the CPS (PA mode select) pin. The actual TX/RX path switching is handled by DIO2 → CTX directly on the PCB.
GC1109 Control Logic (from datasheet)
Pin Mapping
Summary of Changes
HeltecV4Board.cpp
platformio.ini
How It Works Now
- HIGH before TX → full PA enabled (+30dB internal, attenuated to ~+11dB net)
- LOW after TX → ready for RX (CPS is "don't care" in RX mode)
UPDATE 23/12/2025
Thoroughly reviewed against the GC1109 datasheet and WiFi_LoRa_32_V4.2.pdf. The same fix has been applied to Heltec Tracker V2 which uses the identical GC1109 FEM (CSD on GPIO4 instead of GPIO2).
Turns out everything handling the LNA/PA is completely fine, the only problem was the SX1262 boosted gain was enabled. If you disable this the RX is golden. 🥇UPDATE 23/12/2025
Having tested this myself I see excellent results with RX. Apart from that, multiple people have tested the firmware and notice a big improvement in being able to receive signals.
UPDATE 24/12/2025
Some users reported bootloop, this was probably caused by holding pin 46. We shouldn't hold that pin so removed that.
Update 2: avoid touching CPS pin at all unless we want to TX.
firmware to test, with latest changes 24/12/2025 - should fix bootloop issues