matthijskooijman / arduino-lmic

:warning: This library is deprecated, see the README for alternatives.
704 stars 651 forks source link

Power fix SX1276 (txpow now works) #292

Closed greenandbluedesign closed 3 years ago

greenandbluedesign commented 3 years ago

This pull request aims to fix the issue of txpow not working

in the example I see: // Set data rate and transmit power for uplink (note: txpow seems to be ignored by the library)

the 3 changes are 1) I found that there was an error in the RegPaDac address for SX1276 (that is different from SX1272 as believed before) 2) I borrowed the code for setting the power from https://github.com/Lora-net/LoRaMac-node since the previous one was not working. 3) I had to set the power in a specific way to make it really working. See line 504 of lmic.c (I'm not sue if this brakes something related to ADR but at least It makes setting the power manually working.)

Ciao Marco

matthijskooijman commented 3 years ago

This repository is now deprecated. I'm grateful for your contribution, but it will no longer be merged. I'm recommending people to use the MCCI version of LMIC instead. If this PR addresses an issue that also exists in that version, I would encourage you to resubmit your contribution there, so it might benefit other users. I'm sorry for the inconvenience...