-
Notifications
You must be signed in to change notification settings - Fork 244
Add MAX_LORA_TX_POWER build flag for Heltec V4 configuration #885
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
Add MAX_LORA_TX_POWER build flag for Heltec V4 configuration #885
Conversation
|
Should LORA_TX_POWER also be defaulted to 22 for this board? Or is a default less than the board's designed power desirable, or a pattern used with other boards? |
Probably that one should be on the right amount to stay within 'legal' limits when amplification is applied, 22 (before PA) would be way over for sure, but this at least ensures that one can adjust it through the cli/app and it is persisted after a reboot. The comment behind it makes believe that it will result in 22dbm, which is acceptable for most countries imo. |
|
That makes sense. As long as we are able to raise it and it is saved, that will work fine. |
|
for new high output tx devices, it should be consistent with existing high output devices like Station G2 and Ikoka E22 30dbm and 33dbm. Currently both only set Either way, please have consistent build flags across devices. |
Ah, i see. I agree in that case. I do not know what value would be correct for the V4 in that case though. |
|
@ViezeVingertjes I quite like the explicit setting of a MAX power. Only thing that makes it complicated is ensuring other boards have the same setup. However if the convention currently is to just use the one power level and set it to the max (users may then turn it down if necessary for their jurisdiction) then I suggest we do that for now and refactor a max in the future if necessary. The power for the Heltec V4 should be 22, to set the 1262 to full power. The board has a 15dB attenuator, and the power would not exceed its design max of 28dBm when set to the maximum for the 1262, and I believe this is what it expects. |
|
whatever we do, do not do what meshtastic does. last time used it, meshtastic's client shows 30dbm in the phone UI, which is a lie, and the firmware sets the actual tx power and it is hidden from the app/users. also for reference, repeater firmware defaults to LORA_TX_POWER, and repeater administrators can use the command |
After a bit of sleep; i also think we should properly set the MAX so its explicitly set. So that would mean that for this V4 its now correctly set. We probably could create an issue, to consolidate the other boards later. Then this one can be merged and the V4 users can at least set their TX power persistently after its merged. |
Haha no! in MC, what you see is what you get. The problem without this fix is that you can set it to 22dB for example, it goes in effect, but on reboot it reverts to that 10. |
|
There is an argument to be made that the actual setting of say 22dBm is a lie, if the radio then amplifies it and the real output power is 27dBm. I know we have to field questions frequently on discord etc about "why can't I set my fancy new high power radio to its full power??" So it's obviously not 100% clear to users. But trying to be too smart about it is also potentially confusing. My recommendation is just that we document the power settings and their impact for each radio, if it's not 1:1. Especially with popular radios like the V4 that have an LNA, users aren't gonna know, and the question will keep coming up unless it's well handled. But I think that will be enough. |
|
Totally agree, but would be out of scope for this one, i think. Would be a waste to not merge this soon (or a different fix), as people currently are getting their V4's in and their setting is not persisted. |
|
Yes, should be fixed first. Any progress? How can we get this merged? |
Perhaps @recrof or @fdlamotte could review if they have some time. |

Adds a new MAX_LORA_TX_POWER compile-time flag to the Heltec V4 board configuration, enabling control over maximum allowed LoRa transmit power.
(Without, MAX_LORA_TX_POWER will be set with LORA_TX_POWER, which is 10, not persisting higher TX power on reboots)