Implement remote LNA toggle CLI command#1653
Conversation
4ae6b0e to
7113667
Compare
|
Idea looks good, but... Can this be done without reconfiguring every platform? Let's say: every board/target have function to control LNA boost and... Depending on platform, LNA boost gain setting is transfered to radio chip. If board/platform/variant not support LNA Boss, it just do noting (empty function). This approach allow to write code without zillion of #define-s |
|
Yeah I know it's a lot of duplicated code but due to the current architecture the requirement of having the function prototypes on |
|
The boost in the SX12xx board with large amounts of testing does not effect RX sensitivity or noise floor. We tested this allot with the V4 and the LNA bypassed with PCB jump wire. Then set the boost flag on and off on the SX12xx......There was no difference we could find in both quiet and noisy locations. This was for the Sx1262 in the V4. If someone can really see a difference with this, what board are you using? Our group hasn't been able to duplicate that. Using the term LNA might confuse people into thinking its the external 17db LNA that cannot be controlled by software. This is what happen in PR1398 at first. |
|
We had a couple of cases with WSL3 and T114 (433 band) in really good city center spots where the TX had a good coverage but RX was just deaf. Uploading a firmware with the LNA off solved the issue. The ideia is exactly that, put the repeater in a high place and test with and without.. then choose what better works for you. |
|
Yea, 433, different world for sure and not V4 as expected - different hardware. Cool |
|
I'm looking for this in the RAK 3401/13302 1W booster. This would be nice, as I have a repeater in a noisy environment, and I think turning off the RX Boost is going to help. I applied it via a compiled firmware to a more accessible repeater, and it improved connectivity. When it put it back to regular FW with RXBoost on, connectivity became less stable. I haven't applied it at the remote site yet, b/c it is difficult to access, but the ability to turn this on or off via a CLI switch remotely would make it easier. Several people are positing that on the RAK 3401/13302 boosters that deafening is occurring with the boosted RX gain set to on. |
…implementations, wire up companion radio getRxBoostedGain was returned true because both 0x94 (power saving) and 0x96 (boosted gain = 1) return true
|
Please see jbrazio#1 |
Fix remote LNA toggle bugs: correct register comparison, add missing implementation & wire up companion radio
|
@ripplebiz Can you review this PR and provide a closure to it ? |
|
Build this PR here |
weebl2000
left a comment
There was a problem hiding this comment.
Thanks for the feature — being able to toggle RX boosted gain at runtime is useful. A few issues to address though.
Thanks for the review.. all your suggestions are valid. |
|
@weebl2000 @jbrazio @IoTThinks I have 5, of the 4.3.1 boards that have left the china warehouse Feb 27th and will be ready to perform testing once they arrive. Arrived at SFO customs this morning. Happy to help if/when needed. Lets work together to make this happen for everyone. |
… directives across multiple variants
|
I'm sorry, what's the CLI command for toggling it on and off? radio.rxgain doesn't work, the repeater doesn't recognize it. I'm running a V4 with 1.14 with this PR merged. upd: turns out, the USE_SX1262 wasn't defined anywhere for V4, so I've ended up manually adding it. |
{get/set} radio.lna {off/on} |
This doesn't work. Look at the code, the command is {get/set} radio.rxgain {off/on}. |
I think this issue isnt resolved yet, right? |
|
Is everyone happy with the state of the PR? I've reviewed the code and looks alright. From what I can tell this will be usable on repeaters via CLI, but not on companions. The code is there for preferences in the companion firmware, but no way to actually get/set it. That could probably be added in a follow up PR, otherwise if it's not really needed for companions or no intention to add a way to configure it for companions, we should probably not have the code using up the preference slot if it's not actually configurable. |
|
Code looks good, but I'm not sure this feature is actually needed. I think toggling of boosted gain off was mainly helping with deafness of SX1262 which was caused by the AGC not being able to properly reset. In all my testing boosted gain ON is better as long as the AGC doesn't get stuck, which we have fixed now in 1.14. If someone has wildly different results with the AGC properly resetting please share. edit: actually we need to merge this jbrazio#2 first - currently LR1110 won't build. |
Option to control settings is always better then no option. Don't want to use LNA toggle? Don't touch it! Need to set ON/OFF/Auto (thanks to PR mentioned), do it! |
|
I noted significant performance enhancements in the RAK 3401 board in repeater firmware being able to turn it off in certain environments. As mentioned by @JDat above, I'd rather have the option and not use it, rather than having to build a custom FW each time. |
I rebooted to clear the neighbors list with radio.lna off, advert-ed from other repeaters, snapped a screenshot of the results. Then, issued set radio.lna on, rebooted, and repeated the process. Results below. It isn't as dramatic today, but at points, it's been a consistent and repeatable 3db shift.
|
|
I don't understand the direction this discussion is heading. This boolean flag is just another tool in the toolbox, no matter the number of tests we do.. I prefer to give people tools that have a real impact on RF and let them decide what best fits their needs.
I agree because this needs some coordination with the application side.
done. |
Make sure LR1110 builds
|
@weebl2000 done |
I'm using this feature, it cuts down on the number of bad packets received somewhat. Got a lot of in-band noise from telemetry, and it's useful to have a toggle. |



Refactor of #1164.
This pull request adds support for configuring and persisting RX boosted gain settings for SX12xx series radios (SX1262, SX1268, SX1276) across the codebase. These settings are now stored in preferences, can be set and queried via CLI commands, and are applied during radio initialization.
You might hang a repeater [with a proper antenna] in a difficult to access place to find out that there is a lot of QRM and RX is deaf; most of the situations where I faced this, disabling the Boosted Gain helped a lot with the problem.
When we use small out-of-tune antennas (the ones shipping with the boards) having a boost on the RX helps, this is usually the client situation. For repeater where we usually have proper antennas it's a question of testing with it ON and OFF and check what gives you better performance.