LoraErrorParam: Command "+RFPOWER=" has failed!

Hi,

I noticed that calling set_rf_power(RFO, 1) from lora.py raises LoraErrorParam: Command "+RFPOWER=" has failed! in H7. Any advice on solving this issue?

Thank you!

Do you write the command like that ? What’s RFO ? It should be lora.RF_MODE_RFO:

set_rf_power(lora.RF_MODE_RFO, 1)

Also you can enable debugging, it will print some extra info that could help us debug the issue:

lora = Lora(band=BAND_EU868, poll_ms=60000, debug=True)

Sorry for the typo. Yes, LoRaErrorParam always pops up when calling set_rf_power(). This error also happens with your suggested line of code. However, get_tx_power() works fine. Below is example of the code I wrote:

from lora import *
lora = Lora(band=BAND_EU868, poll_ms=60000, debug=False)
print(lora.get_tx_power())
lora.set_rf_power(RF_MODE_RFO, 1)
print(lora.get_tx_power())

May I also ask about the architecture of LoRa firmware/driver in OpenMV firmware? Is it based on prior MKRWAN1300 driver flashed? Thank you!

Can you post the output of the above script ? I don’t have any Lora devices to test with.

May I also ask about the architecture of LoRa firmware/driver in OpenMV firmware? Is it based on prior MKRWAN1300 driver

It’s basically just a port of this library:

That’s the AT command for RFPOWER. Does it work with Arduino firmware ? You should test that, if not then maybe the Lora module firmware needs to be updated or something.

Thank you again for your reply. Below is the output shown in OpenMV IDE’s terminal:

lora_output

Try updating the Lora module firmware, there must be some sketch to do that. Also try it with Arduino firmware, if it doesn’t work either then there’s nothing I can do.

Although, it seems to be complaining about the parameters, so maybe the command is supported but you need to use the other mode RF_MODE_PABOOST

Thank you for your advice! I will try it out.

This has been tested with Arduino firwmare/sketch and it fails too, so it’s very likely an issue with the Lora module firmware.