Skip to content
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

Setting the output power #1

Open
sonnenwind opened this issue Jan 16, 2025 · 2 comments
Open

Setting the output power #1

sonnenwind opened this issue Jan 16, 2025 · 2 comments

Comments

@sonnenwind
Copy link

sonnenwind commented Jan 16, 2025

Hello,

How is it possible to adjust the output power of the lr1121 module?

What I have tried so far was to create a output power config:

 const lr1121_modem_output_power_config_t output_power_14dBm = {
	.expected_power 	= 14,
	.configured_power 	= 14,
	.pa_supply 			= LR1121_MODEM_PA_REG_SUPPLY_VREG,
	.pa_duty_cycle      = 4,
	.pa_sel				= LR1121_MODEM_OUTPUT_POWER_CONFIGURATION_PA_SEL_LP,
	.pa_hp_sel			= 0,
	.pa_ramp_time		= LR1121_MODEM_RAMP_48_US
};

When I got an RESET event from the module, I set this config using:
lr1121_modem_set_output_power_config(&lr1121, &output_power_14dBm, 1)

The module joins the network an I can send messages but the output power is very low.
When I check the current consumption during the transmission phase, I get something around 6mA. According to the lr1121 user manual, this corresponds to -17dBm and not to the 14dBm that I set.

Do I need to send another command to activate the configuration?

Any help or insights would be highly appreciated!

UPDATE:
I found that by calling the function lr1121_modem_set_tx_power_offset(), I was able to increase the transmission power (verified by checking the current consumption and the RSSI as seen by the receiving gateway). However, this was only possible when selecting the hi power PA using the command ‎lr1121_modem_set_rf_output(&lr1121, R1121_MODEM_BSP_RADIO_PA_SEL_HP).
When selecting the low power PA, whatever value I test for the TX power offset has no effect on the transmission power or current consumption.

@opeyrard
Copy link

Hi,
Instead of lr1121_modem_set_rf_output(&lr1121, R1121_MODEM_BSP_RADIO_PA_SEL_HP), could you please try lr1121_modem_set_rf_output(&lr1121, R1121_MODEM_BSP_RADIO_PA_SEL_LP_HP_LF) ?
Could you please check your antenna is connected to the low power output ?
Many thanks,

@sonnenwind
Copy link
Author

Hi opeyard,
I can confirm that the module I was using does indeed not connect the LP output to the antenna. I had to remove the can to check since the manufacturer of the module (LR1121 by NiceRF) does disclose this fact..

What I learned so far is that when using the "Modem Mode" of the LR1121 chip, one cannot specify the output power directly but rather has to use the lr1121_modem_set_tx_power_offset( const void* context, const int8_t tx_power_offset ) function. I further assume that the tx_power_offset has to be set relative to the nominal output power of the selected amplifier which is 22 dBm or 14 dBm, respectively.

However, this is just an educated guess from what I found by changing the offset values and observing the current consumption of the module and checking the RSSI at the gateway.

It would be great if there was a resource that would describe the driver API more in depth than the reference manual..

Can you confirm my findings?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants