Add CLI control to LoRa's fem LNA.#2140
Conversation
|
Solve this problem #2128. |
|
@Quency-D @IoTThinks I flashed the firmware from the pre compiled firmware. I'm not sure why Quency was telling me to run a python script? anyways, yes, thank you @IoTThinks, the cli commands work! I was going to try this first for sure. Powered on 4.3 board, LNA on and repeater working normal. noise floor -103, transmit power +28.3 dbm.....working normally. here we go- "set radio.fem.rxgain off" give me a reply "OK - LoRa FEM RX gain off" now to turn back on LNA- "set radio.fem.rxgain on" give me a reply "OK LoRa FEM RX gain on" Conclusion- Update |
Python scripts can be used for remote control, but it's also fine to control it directly like this. |
It worked great @Quency-D and thats what 99% of people will do. Things are coming along nicely. UPDATE I also found out that the LNA will stay in bypass even if I flash Powersaving 14 (no erase) after loading your test firmware. This way sleep is instant. I've been testing this all day since this morning when you contacted me on the other issue that was closed for this PR. Thank you for all your work on this sir! |
|
@towerviewcams So it will best fit you to have LNA on or off? |
@IoTThinks that depends on the repeater site. Most sites you can have it on, "IF" you have proper filtering and shielding. Having the ability to turn this on or off is SO PERFECT i cannot tell you how this will change everything deploying this board. I'm 60/40 that the LNA should be off. This will pretty much setup people to have a nice working repeater. Then, if they have the expertees on how to check for noise, have the proper equipment or just want to try it, then yes, turn it on. I understanding more of what your saying Kevin, I am. More people will benefit initially with it off, then on for a turn key build default. |
|
@towerviewcams Most of repeaters do not have proper filtering and shielding I guess. |
@IoTThinks I agree with you. I do, look up ^. I just really needed to think about what your saying on a more simplified safe scale for users. This would force more learning for those that don't understand what a LNA can truly do. |
|
Hi,
|
|
@Quency-D I hit "Error: unsupported by this board" for Heltec v4.3. Over here, in order to set fem.rxgain, canControlLoRaFemLna() must return true.
Then over here bool lna_can_control=false; => Can not set fem.rxgain. Am I missing something? |
|
When I modify to bool lna_can_control=true, then I can set the fem.rxgrain in my Heltec v4.2. |
|
Hardcoded lna_can_control=true works. PowerSaving at 6.5mA reported by @towerviewcams
|
|
Yes, only version 4.3 supports it; version 4.2 does not. I will improve this aspect. |
Yah, thanks a lot. |
|
@IoTThinks I checked again on version 4.3 and found that this problem does not exist. You can try it again. |
|
@Quency-D Ah, I see. Thanks a lot. |
|
I confirm that the 4.3 board is working great. Have full control of the LNA and the internal Semtec SX12xx small boost. And independent of each other Tomorrow testing at very noisy broadcast site |
Heltec T090 is not included.
|
I have been running the 4.3 board for many days controling the FEM (LNA) and and also small rxgain in the semtec sx1262....All working great on 4+ repeaters and growing. suggest this be merged into dev @liamcottle @Socalix @Quency-D @weebl2000 |
|
Confirm this PR works for Heltec v4.2 and v4.3. The nice thing is Heltec v4.3 can reach 5.8mA when FEM LNA off. I guess Heltec v4.3 with deepsleep can reach much lower mA. |
|
Very nice!
It works 👍 (also running with PR #1687) |
|
@Quency-D thanks for this PR, its working perfectly 👌 Would it be possible for you to resolve the branch conflicts it currently has? Maybe it can then be merged into the 'dev' branch soonish 😅 🔜 |
|
Hi @Quency-D. Great work! How do I get the repeater firmware containing this PR please? |
You can simply take this branch https://github.com/Quency-D/MeshCore and compile it. |
Okay, I'll handle it as soon as possible. |
Using the Power Saving firmware for now with it included, thanks @IoTThinks. |
liamcottle
left a comment
There was a problem hiding this comment.
Hey, thanks for the PR. Have submitted some review comments. Looks like it needs some merge conflicts resolving too :)
Co-authored-by: Copilot <copilot@github.com>
Hi @liamcottle, thank you for your valuable suggestions. I have made all the changes. |
|
Not sure if it's the Power Saving 15 firmware or the updated code since Liam's review, but the setting no longer appears to persist across reboots. |
|
@grantsavill PowerSaving 15 uses the code before Quency-D updated yesterday. For setting across reboot, I will check tomorrow. By right, the code changes do not change the original behavior. |
|
@Quency-D: There is one bug in the companion radio.
|
@grantsavill Confirmed missing get radio.fem.rxgain and radio.fem.rxgain is not persisted accross reboots. |
@IoTThinks click the green "submit review" button in top right |
IoTThinks
left a comment
There was a problem hiding this comment.
There is 1 typo in DataStore.cpp of companion_radio.
|
@grantsavill Applied latest changes in this PR. There are quite significant changes compared to the first commit. |







It is currently being tested in heltec-v4.3 and can be configured remotely.
The Python script used is https://github.com/Quency-D/meshcore-cli/tree/lora-lna-cli, which will be further improved later.