A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/matthijskooijman/arduino-lmic/issues/33 below:

TX power issues · Issue #33 · matthijskooijman/arduino-lmic · GitHub

Currently, the library allows setting the TX power using LMIC_setDrTxpow(). This sets the LMIC.adrTxPow field, but this field is never actually used anywhere.

The actual tx power to use is kept in LMIC.txpow and is currently defined per-band for 868 and hardcoded for 900 (see updateTx() for both).

However, the actual writing of the registers in configPower() seems inconsistent. The comments say that PA_BOOST is used for SX1272 and RFO for SX1276, but then for both the PaSelect bit (0x80) is set in RegPaConfig to select PA_BOOST. However, the corresponding value in RegPaDac, which should be 0x7 for PA_BOOST is set to 0x4 (for RFO), or left at the default of 0x4. Correction: RegPaDac should be set to 0x7 only for +20dBm operation (which requires additional care), with RegPaDac PA_BOOST is limited to +17dBm.

Then, the cropping of the txpow value for 1276 seems wrong, if txpow is 16, it effectively becomes 0 instead of 15 (due to the & 0xf masking). The lower limit is set to 2, but if PA_BOOST is indeed not used, this should be 0.

Finally, the txpower -> register setting calculation is wrong, assuming no PA_BOOST is used. The datasheet says:

Pmax=10.8+0.6*MaxPower [dBm]
Pout=Pmax-(15-OutputPower) if PaSelect = 0 (RFO pins)

If MaxPower == 7, then Pmax = 15 and Pout = OutputPower (just like with SX1272, which does not have MaxPower). The calculation seems to assume this, but it sets MaxPower to 0.

However, since PaSelect is actually set (using PA_BOOST), the real calculation should be txpow-2 (as for 1272). Effectively, I believe this means that for the 0.1% and 1% bands, LMIC on a 17276 currently transmits at 16dBm instead of the intended 14dBm.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4