Comments (11)
from arduino-lmic.
For EU like region we can do something like this commit ngraziano/arduino-lmic@3948c8c
It will allow the network to reduce power if quality of signal is good enough (TTN do that).
from arduino-lmic.
@ngraziano Thanks for the reference, that make it clear.
I see that. in fact, this management of txpow is one of the important things that *_updateTx()
is supposed to do.
I like the idea of using the ADR value as a maximum. But after reviewing the code, I think it might be better to put it more centrally.
It turns out that txpow is only meaningfully referenced one place in radio.c around line 445. Allowing for some refactoring, that's where we should consider adrTxPow. Here's the current code:
Lines 445 to 474 in c208277
Instead ("NOTE" comments added to explain why I changed things, other comments intended for publication)
static void configPower () {
// NOTE: no need for (s1_t) cast, txpow is declared s1_t.
s1_t pw = LMIC.txpow;
// enforce ADR limitations and adminstrative power limits here. The
// bandplans set txpow to the desired target in terms of power at
// the radio.
if (pw > LMIC.adrTxPow)
pw = LMIC.adrTxPow;
// TODO([email protected]) this also is where we'd adjust for antenna gain other than 3 dBi.
#ifdef CFG_sx1276_radio
// TODO([email protected]) now that we have the enhanced HAL, we could delegate this work,
// thereby allowing PAs to work properly on devices like the Murata that support 20 dB tx.
// In fringes, an extra 3 dB could be very helpful.
// PA_BOOST output is assumed but not 20 dBm.
if(pw > 17) {
pw = 17;
} else if(pw < 2) {
pw = 2;
}
// 0x80 forces use of PA_BOOST; but we don't
// turn on 20 dBm mode. So powers are:
// 0000 => 2dBm, 0001 => 3dBm, ... 1111 => 17dBm
// But we also enforce that the high-power mode
// is off by writing RegPaDac.
writeReg(RegPaConfig, (u1_t)(0x80|(pw - 2)));
writeReg(RegPaDac, readReg(RegPaDac)|0x4);
#elif CFG_sx1272_radio
// set PA config (2-17 dBm using PA_BOOST)
if(pw > 17) {
pw = 17;
} else if(pw < 2) {
pw = 2;
}
writeReg(RegPaConfig, (u1_t)(0x80|(pw-2)));
#else
#error Missing CFG_sx1272_radio/CFG_sx1276_radio
#endif /* CFG_sx1272_radio */
}
I need some volunteers to test... or I need to get this working with the RWC5020A. But that is a few weeks off.
from arduino-lmic.
I check regional parameter and I see a problem with region like AS923 where Max EIRP is set by TxParamSetupReq
.
In actual code for AS923, adrTxPow
store the delta and not the absolute value.
Maybe adrTxPow
should store the delta for all region and not the absolute value.
But I am little lost because in lorawan regional parameters for E868 do not match the code and there is no power per band.
This topic need more thinking.
from arduino-lmic.
Any thoughts on how this would be resolved? Any quick hard-coded fixes for those of us using this only one region and trying to LIMIT power? In my case, I would like to put the RFM95W to its lowest power level (in USA at 915Mhz), but calls like
LMIC_setDrTxpow(DR_SF7,2);
and
LMIC.datarate = DR_SF7;
LMIC.txpow = 2;
seemingly still have no effect.
Thank you!
from arduino-lmic.
Update: I'm just manually setting
s1_t pw = 2;
in radio.c, as my region and location will be static. Still though, is there a plan to resolve
LMIC_setDrTxpow()
and restore its effectiveness? Am I correct in believing that it does not affect the Spread factor as well?
Thank you!
from arduino-lmic.
@pomplesiegel -- LMIC_setDrTxpow()
sets the spreading factor, but that will get reset by network downlinks that happen during and after a joint. In other words, you may find that you have to set the data rate several times to make things effective, and you may have to turn off ADR (which can be done, and which works). Network operators are not always happy if you do this, but... sometimes it's necessary.
As for changing the tx power, yes... the delay is due to lack of time on my part to set up a proper test -- we really want to make sure we're controlling power properly.
I have been planning to run US LoRaWAN certification tests, which would (I think) clear up enough of the otehr issues to let this be addressed. But I don't know if I'll get to it this quarter, because of pressing work for MCCI's other projects.
from arduino-lmic.
@terrillmoore, thanks so much for the in-depth response. This is very helpful information on the spreading factor, as I had heard varying reports from others.
I totally understand about the tx power issue and the need to get it right. In the meantime people like me will just hard-code a value and that's fine.
Very exciting about the US LoraWan cert tests. I imagine that is a major question on many of our minds: When following best practices and using sanctioned hardware with this fork of LMIC, are we being compliant and future-proof with our devices?
Thanks again!
from arduino-lmic.
This is now fixed with #416 and #410
from arduino-lmic.
I have an additional question about the Tx power... What is the initial value if nothing is set? I use the lib for an SX1276 with this config:
#define CFG_eu868
#define CFG_sx1276_radio 1
#define DISABLE_PING
#define DISABLE_BEACONS
#define LMIC_DEBUG_LEVEL 2
Thanks :)
from arduino-lmic.
see lorabase_eu868.h :
EU868_TX_EIRP_MAX_DBM = 16
from arduino-lmic.
Related Issues (20)
- Regulatory delays are overridden by transmit randomization
- EV_TXCOMPLETE in unsupervised transmission HOT 15
- AU915 exceeds Time-on-air for ADR and packet confirmation HOT 8
- Can't receive downlink messages
- ESP32 board not supported HOT 3
- Problem with ttn-otaa.ino HOT 1
- Helium joining problem with TTGO esp32 board
- Wrap-around of globalDutyAvail is blocking transmission in case of long transmission intervals HOT 1
- rssi
- How to make DR fixed in OTAA example HOT 11
- IN866 - LinkAdrReq failure with ChMask higher than 0x07 HOT 1
- use an explicit pinmap on lora 32 v2 HOT 1
- Reduction of the maximum current when using a smaller button cell HOT 1
- Newbie question - transmitting small packets at near real time speeds HOT 2
- Joining to helium network fails, network sends JoinAccept but sensor doesn't receive EV_JOINED event
- Enabling Class B or C for Continuous Downlink Without Uplink Pre-requisite HOT 3
- MCCI - LMIC keeps resetting
- Uplink with FPort 255 and invalid MIC! HOT 2
- no JoinAccept
- Set fixed BW for uplink messages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-lmic.