Repository navigation
Add Listen Before Talk for 2.4GHz band - EU compliance - #1243
Conversation
|
Very cool to see developments on this! I just did some bench tests and I can get it to drop some packets with a second handset on FrSKy D16 protocol sitting right next to it. It is hard to say if this is because the packets are not sent as a result of LBT or if they are just not received correctly due to the interference. Is there a way to see which one it is? Maybe hack one of the telemetry sensors to show a skipped packet count or a sort of inverse transmitted LQ? EDIT: after flashing back to 2.0.1 the packet drop pattern is very similar as with this PR. I don't know if that means there is a bug in this PR or that LBT does not cause any skipped packets. |
Pushed a commit with downlink link quality repurposed for LBT success ratio. Fascinating to see uplink LQ go down, while LBT success ratio go up when I hold my hand over the antenna to attenuate all received signals. I typically see it hover around 96-100% right next to my wifi router. Always at 100% if I move outside. |
|
Same result here but only at 500Hz. At any other packet rate, the LBT success ratio is stuck at 100%, even with the TX antenna right next to the wifi router antenna and the detection threshold level changed to -90dBm. Maybe some sort of timing issue? Or do the lower packet rates somehow allow for enough time to squeeze in the packet even though the channel is not clear? I assume my wifi router also uses LBT, so maybe that has something to do with it? I don't know how that works exactly. I don't have a more scientific method of simulating a signal so this is all the testing I can do now. |
|
I wonder if this is because rssi instantaneous is picking up noise as chirps. It might have trouble doing this with a higher SF? Line 26 in e58417d |
|
hmm, I did most of my testing on 500hz, at lower rates I also can't see any LBT-checks fail now, unless I turn on the unmodulated carrier from another esp32 kit. I will do some more testing, maybe the rssi sensing behaves differently for different Lora parameters. Thanks for taking the time to test! |
Interesting thought, if that is the case, this whole concept won't work at all... But in rxmode with 500hz settings, it did pick up the CW tone the same way the spectrum analyser did, so I'm hopeful. But for other SF's, it might be that the rssi-values are averaged over a longer timeframe, to simplify the internal function that gives the packet-rssi (which I assume is just the getRssiInst() value latched at end of valid packet reception). I will test more to figure this out. |
|
What if, instead of completely skipping TX if the channel is occupied, we fall back to transmit with 10mW instead, which doesn't need to comply with LBT as I understand? If this doesn't make sense, please ignore :) |
|
@froqstar that is an absolutely amazing idea! |
This is a great idea! But unfortunately the way I have understood the EN 300 328 https://www.etsi.org/deliver/etsi_en/300300_300399/300328/02.01.00_30/en_300328v020100v.pdf Maybe the intention behind this definition is to allow for co-existence of multiple devices, but also, for <10mW class devices, make the implementation easier by not requiring adaptive FHSS. Please have a read in that ETSI document to doublecheck my interpretation. Edit: After reading the fine-print I found this in EN 300 328 about adaptive FHSS:
So I think my understanding above could be modified, I interpret this to mean that if we are already configured in 10mW, we don't have to skip the TX if channel is not clear. But, I do not think it is acceptable to just transmit certain packets at lower power, if we implemented that, it would fail the test-procedure for adaptive FHSS, because it doesn't differentiate on output power, the radio needs to be silent on the frequency. This test-procedure for LBT is only applicable for output power > 10mW. |
|
I figured out why it failed in lower rates than 500Hz, the time from RX-enable to valid rssi measurement depends on Lora spreading factor. The datasheet actually says this about the getRssiInst() command:
So, our relevant symbol timings are: In addition the switching time from TX to RX is 60us. The measured necessary delay for valid RSSI readings are: Which matches TX->RX delay + symbol time exactly for SF5,6,7. Not sure why SF9 is the odd one out and only requires SF7 timings. Updated code with these timings, and also adaptive threshold based on power-setting. The reduced rssi thresholds makes it trigger and skip TX quite often in my RF environment inside. I actually don't think this is good enough as is, even if it would probably pass the compliance test. Skipping every other packet doesn't seem feasible. Some ideas:
Open for other suggestions! |
| // TODO: This threshold should be modified with a config for antenna gain | ||
| switch(txPower) | ||
| { | ||
| case PWR_10mW: return -78; |
There was a problem hiding this comment.
Should this not be 0 (or + infinity) since LBT is not required at 10mW? Not sure if you can dynamically disable LBT when power is dynamic. But surely when power is fixed to 10mW LBT should be disabled?
There was a problem hiding this comment.
I'm not 100% sure, see this section about the adaptive fhss clause:
In addition, this requirement does not apply for FHSS equipment with a maximum declared RF Output power level of less than 10 dBm e.i.r.p. or for FHSS equipment when operating in a mode where the RF Output power is less than 10 dBm e.i.r.p.
I read that to mean the equipment can skip LBT if operating in a mode with strictly <10mW tx power at all times. But if the equipment Can operate with higher power, it is the higher power mode that will be tested for adaptive fhss/LBT behaviour, and if we send out a <10mW power packet at the wrong frequency during that test, it will fail the test. As I understand it...
There was a problem hiding this comment.
Hmm, yeah I think you are right. So when power is manually set to 10mW LBT can be disabled ben when dynamic power is enabled and power happens to be on 10mW we would still need to use the -78dBm threshold. And during certification testing the output power will be set to 100mW (I assume the firmware will need to be adjusted to make this max level) so the -88dBm threshold applies.
|
I'm getting LBT success around 85-95 when sitting at my desk. Turning on a second transmitter with FrSky D16 protocol drops the success rate to ~50, and single digits when holding the TX right next to my router antenna. Definitely not great but at least the results are plausible. In the discussion issue, you mentioned it is allowed to send a short sync packet on the occupied channel. Could that be used to quickly jump to the next frequency? If LBT really does require skipping this many packets (let's hope it is not) then these sync packets could also be used to not decrease LQ when a regular packet is skipped. LQ is very erratic due to the skipped packets and you could ask if you need to see that in your OSD. The information is definitely important, and as far as control quality goes skipped packets are just as bad as packets not received, but it is not something actionable for the pilot when flying behind obstacles. Something to think about in the future. |
yes, maybe, these short control transmissions are defined as:
10% of normal tx-time, so for the 50hz rate, it could theoretically be possible to send a 500hz rate packet, but how would the receiver know how to listen for different spreading factor? Also, as I understand it, the whole premise of express LRS is that any/all packets could be lost and everything should work fine again when next packet arrives, but if the hopping scheme changes and that is communicated over a packet that is lost, how can it recover fast enough? Maybe it is possible to do a scheme were we actually drop down to 10% tx-time if too many packets are dropped due to LBT. That would at least establish a lowest guaranteed rate and jitter performance, probably around the 50hz mark, so flyable, but not impressive in any way... lets see if other people in here have other ideas or suggestions. |
|
Interesting, the EN 300 328 document has this to say for equipment implementing frame based or load based LBT (as opposed to adaptive FHSS LBT, I don't know the exact difference)
So, this type of equipment can actually just transmit at 10mW if LBT check fails. hopefully we can do the same!?? |
My sources say this isn't allowed 😢 |
|
This is great that there's some progress being made for our poor EU-restricted friends. The major issue I have with this is that it busywaits for the entire LBT duration in the interrupt handler which prevents all other code from running when it is. Regarding sending a short "sync" packet if we skip transmit to keep the LQ up:
|
Agreed, got rid of all busy waiting in latest commit! 👍
Agree, only useful scenario I can think of for these short packets is if we implement some sort of adaptive hopping table that needs to be synced with RX. But that is outside the scope of this PR. Main goal here is to get something flyable that does LBT for EU compliance in a simple way. And allow people to test this, to figure out if this approach is acceptable or not for LBT.
Agree, LQ is LQ, regardless of why packets didn't arrive. |
|
A short packet is never going to work because we dont transmit the packet header. |
|
|
||
| bool ICACHE_RAM_ATTR ChannelIsClear() | ||
| { | ||
| return Radio.GetRssiInst() < PowerEnumToLBTLimit((PowerLevels_e)POWERMGNT::currPower()); |
There was a problem hiding this comment.
Isnt there a sampling duration requirement? 18us?
There was a problem hiding this comment.
yes
The CCA observation time shall be not less than 0,2 % of the Channel Occupancy Time with a minimum of 18 μs
per my calculations, since the sx1280 spends minimum one lora symbol-time to measure rssi, we should be OK for all modes as long as we have waited long enough to get one valid rssi measurement. The rssi measurements seems to be an average value over one lora symbol-time. which should be ok to use as LBT sensing. See calculations below:
our channel occupancy time and the 0.2% minimum listening time for the different modes are:
- 1665 * 4 = 6660 -> 18us is minimum
- 3300 * 4 = 13200 -> 26.4us
- 5871 * 4 = 18443 -> 37us
- 18443 * 2 = 36886 -> 73.8us
symbol time for same modes:
- 39.4us
- 78.8us
- 157.6us
- 630.5us
These are always greater than minimum listening time, so it should be OK?
There was a problem hiding this comment.
Thanks. Lets leave this comment unresolved just so your explanation is clearly visible to others.
|
Should we add a line in Lua for the LBT LQ in this PR or another? |
Yeah, would that free up the downlink LQ that I've just hijacked here? Another PR might be cleaner? Keep this one for just the bare essentials of LBT, and have other nice to haves separately? Should LBT be a #define-option or how would you prefer it? |
Sounds good. I wonder if we can add it as a sensor like the current LQ, rssi etc. But Ive got no idea how that works.
I think under the domain option in this PR #1161 |
|
@CapnBry Thanks for the review! quite a few improvements you found! I've implemented/addressed all the remarks, and tested. Seems to behave same as before. |
CapnBry
left a comment
There was a problem hiding this comment.
Amazing! Tested again on Zorro+EP2, FM30+Vantac RX, and a non-LBT undisclosed ESP32 TX with Matek E24-D for a couple hours, no problems and can see the TQLY changing on the LBT devices as more come online.
|
Hello to all here, I just started to deal with ELRS 2.4 GHz and I am primarily a fixed wing pilot. The LBT matter is not new stuff for me and would like to put a short comment as follows. ETSI allows to switch between adaptive and non-adaptive mode operation (see Sect. 4.2.2). Thus in case of channel being detected to be occupied it is allowed to switch to non-adaptive operation and send with corresponding power calculated for MU10 operation which is about 30mW. And btw exactly this was implemented by FrSky for the big v2 ACCST EU-LBT and v2 ACCESS EU-LBT firmware firmware. If this is already known and is going to be the basis for also ELRS 2.4 GHz implementation, I am sorry for my lack of knowledge of actual status. Don't want to bother anyone here with my first post in the ELRS thread here. |
|
May I ask you guys how can I download and test this LBT option, that you successfully implemented as I understand? |
In the configurator, click GIT BRANCH, select the master branch and flash with |
|
@avsaase: thank you for helping me! The problem is that I see no EU_CE option for the HM ES24TX Pro Series 2400 TX module under Regulatory domains... am I doing something wrong? I have the latest (v1.3.9) version of the ELRS configuratior installed. Edit: I got the answer on discord: the lowest power of my TX module is 25mW while the LBT option is currently supported only with modules that go down to 10mW (like ES24TX non-pro version)... and so ES24TX Pro owners will have to wait until the official 3.0.0 is released. Something like that. Interesting fact: I think these non-lbt systems have a huge impact on other wifi systems... when I power up my RX and TX @ only 25mW, live feed from my survailance cameras starts to break... cameras are placed around the house in radius 10 to 15 meters and the wifi router to which they connect is placed up in the attic... you can do a test with an ookla bandwidth test on your phone - my results: 100 Mbps with the TX off and 10 Mbps with the TX on. |
|
@GregorPotrebujes I'm not familiar with how the user defines work, probably best to ask this on Discord. |
|
Why is LBT only supported up to 100mW? That just seems wrong to me. The higher the power output, the more LBT should be there. At least give responsible pilots the option to use LBT up to the full output power of the Tx. |
The EU regulations say 100mW max and LBT above 10mW so when you flash with this reg domain that's the two things you get. |
Exactly 100mW MAX. Does this mean that ELRS is going to limit power to 100mW now? I doubt it. Keeping LBT active above 100mW is the responsible thing to do. The higher the power output, the more important it is that LBT is used. |
|
@MrD-RC manufacturers need ELRS to abide by CE regs if they wish to get the stamp of approval. What you are proposing makes some sense but not something that will happen. |
I think the point is, that 100mW is the maximum spread spectrum power at 2.4Ghz permitted by OFCOM (UK) which is aligned with EU regs AFAIK. Why would they specify any changes to the way the protocol works above that. Whether LBT should be blanket applied above 10mW is another question, and if users are going to operate outside legal boundaries, better with LBT than without I would say. |
There is a reason that it is a requirement. It stops you screaming over other occupied channels. If you're shouting louder, then there is more reason to to have LBT, not less. If this is just a red tape exercise for ELRS rather than making the system safer, I am extremely disappointed. |
|
Presumably having LBT above 100mW is a relatively simple change. What I would like to understand is how, having LBT from 10mW all the way to MAX power of the Tx, affects CE testing. CE testing would not be going above 100mW anyway would it ? |
|
For a FHSS transmitter operating in the 2.4GHz band at a 80%+ duty cycle and 800kHz of bandwidth with LBT, the legal limit is 100mW. If you want to go over this output power, and you're in a region with these restrictions, you will be transmitting illegally. There's no point to doing LBT for higher powers because there's NO compliance at those powers. LBT also doesn't prevent collisions either since the LBT measurement takes place before transmit so there's some times it won't transmit when it could, and times where it does transmit over someone else. We're not going to make an unrestricted power + LBT region, since I don't think there's really any substantial benefit to be gained in collective (across many simultaneous people) link quality. |
You could call it red tape, but this is the system our politicians and industry put in place in the EU. The goal with this PR was to make the EU-CE mode in ELRS work with max allowed TX-power in EU (100mW) by implementing the necessary spectrum sharing techniques as laid out in the latest ETSI 300 328 v2.2.2-compliance standard (which happens to be the Listen before talk-strategy). Following this ETSI standard is the only reasonable way that would enable manufacturers of Express LRS hardware to pass regulatory compliance tests. This in turn allows access to the European market, which benefits pilots in the EU, they can buy ELRS hw from local shops and fly it without worrying about the legality of the RF emissions. If the goal is to make ELRS "safer" for other users of the spectrum, but go outside the ETSI-standard and thus having a mode that would not pass the certification tests, I'd say there are many better ways to do that, than just allowing LBT with high power TX. Basically, use whatever means necessary to maintain a link with lower TX-power and lower duty-cycle would be optimal for other spectrum users I'd say. |
|
@MrD-RC Instead of steeling valuable time of the ELRS devs you'd better inform yourselves about LBT regulations in the EU before putting stupid questions proving that you don't have any knowledge about those EU regulations. |
|
How is it a stupid question! I understand that the legislation only covers up to 100mW, because you're not supposed to be transmitting above 100mW at all. Why is is stupid to think that LBT should also be used above 100mW, as a safety device! Only a moron would expect the legislation to cover above 100mW, when it has a maximum transmit power of 100mW. The stupid thing was thinking that other RC links still used LBT above 100mW. When they all seem to do the same red tape builds, just for passing the tests. So I can't blame ELRS for doing the same thing that all the other RC links do. |
|
We, the ELRS devs, will do what we can to help the manufacturers get compliance if they want it. They do, so we've done our best to conform to the requirements. |
|
@pkendall64 @avsaase showed me that code block. It would be interesting to see what difference it actually makes to performance. |
My friend you obviously don't understand the reason for LBT being implemented into the EU regulations. LBT is in no way a matter of increasing safety at all, it simply is introduced because with LBT the bandwidth of the allowed 2.4 GHz can be used simultaneously by much more users than it can with FCC. If you are looking for more safety you should use FCC, not LBT. Ofcourse nobody official does say or write that in the papers, but it's definitely a technical fact. I'm also flying in the EU and ofcourse I fly all my stuff with FCC, exactly because of higher safety in signal link transmission. I definitely will never buy any new transmitter which forces me to use LBT and cannot be flashe to FCC. End of story. |
We obviously have two different understanding of safety. Of course LBT is safer, as it means that you won't be broadcasting over a frequency that someone is already using. For me, safety involves everyone else around me, not just my personal link. It shouldn't be about whoever shouts the loudest wins. |
|
hehe yeah "Thank goodness the EU enforces 100mW LBT on all these other things so none of them will affect my illegal transmitter blasting 1W to shout over everything else, it's really the safest way". Anyway, the 100mW LBT implemented here is for regulation compliance. If you want to discuss the proposed benefits of self-enforced LBT-for-all you can start a thread in Discussions as this matter is closed. |


This PR attempts to implement a simple approach to Listen Before Talk aka Clear Channel Assessment that is required for EU compliance while transmitting with power between 10mW and 100mW.
See full discussion here: #5
This is by no means done, barely a PoC, but it would be great with some feedback before continuing.
Use LQ to check how many packets are skipped.
Tested at 500Hz with disturbance from unmodulated TX tone at 2402MHz and 2480MHz from a ESP32 devkit. (gives about -40dBm Rssi at 10 -15 lowest/highest FHSS channels)
This is very similar test case to the compliance test defined in EN 300 328.
Maintains LQ >85 and seems flyable while tx tone is active.