Replies: 24 comments 3 replies
-
I spent some more time on this - I've got 125 Hz working on the bench (well almost 100%) and think this would be a good compromise. Details below: From the RF side, I mocked up some FLRC configs that would work. Limitations are that frame time (1 / rate) is defined as an integer https://github.com/olliw42/mLRS/blob/main/mLRS/Common/setup_types.h#L321 so are somewhat limited in what's available and 2100 uS is reserved for overhead on each packet: If had to choose one, 125 Hz makes the most sense to me, as:
125 Hz would also have plenty of capacity for even a 230400 baud connection to the FC: I got this working by increasing the Tx to radio connection to 921,600 baud which allowed for 2ms gaps in this switch statement: https://github.com/olliw42/mLRS/blob/main/mLRS/CommonTx/crsf_interface_tx.h#L317 and borrowing the 50 Hz mode slot for testing. The only issue is that the Lua seems to need further throttling as I always get a few errors at 125 Hz. 100 Hz had issues as well but did work roughly 1 out of 3 times. Any hints on how to slowdown the Lua would help - should this be a bigger number? (https://github.com/olliw42/mLRS/blob/main/lua/mLRS.lua#L489) |
Beta Was this translation helpful? Give feedback.
-
interesting! first off, I guess you are using the same frame structure. I would think need a new frame since the FLRC frame has already a syncword (and even 32 bit) and a crc, so 4 bytes are obsolete. Not a lot, but on the order of 5% I think we only should consider 0.65 and lower, not 1.04 or 1.3, sinc ethen the bandwidth is larger than 1 MHz and we probably would also have to fool with the fhss table. for some reasons I can't get your OTA values. Could you specify the other relevant settings? the connection radio <-> tx module is going to be a bit of a problem. You metion raising to 921,600 baud. I'm not sure I can do this with OpenTx, need to test. I'm also not convinced that such high baudrates will help with the reliability. EdgeTx has put in some specific code to "better" parse CRSF frames since they see misses (whichthey apparently can't really explain, or mitigate otherwise). So I'm not yet totally convinced that's the way to go. Note that I would also want mbridge to work, here the reliability requirements are higher, like 100% reliable :). my "objection" to 100 Hz is that it isn't like "wau", I mean, so what, a factor of two in the rates ... I would be more impressed with 150Hz ... the next lower margin maybe is 133 Hz LOL ... for sure that's pure psychology and not technical argumentation at all LOL I'm not really concerned about even -3 dBm as compared to 50 Hz ... I mean, it actually would better fit the pattern: If we have to fool with the frame, we also could consider using e.g. 127 bytes payload. Just as a thought for exploration. Also, do we really need 2.1 ms gaps? These >2 ms came about since for the LORA modes there wasn't really much to gain so I rather played it a bit safe. |
Beta Was this translation helpful? Give feedback.
-
Will read through more later, but at least for this question I used 4 bytes for AGC Preamble and 91 bytes for payload (this is 1663 uS above) Per the datasheet need at least 2 bytes for AGC Preamble and since there is extra buffer in the time figured that it couldn't hurt to have 4: |
Beta Was this translation helpful? Give feedback.
-
Certainly agree that what you've outlined is a better way to do the Tx<>radio piece, so will leave that for the moment.
ELRS terminology counts all of the packets, so what is called 100 Hz would be 200 Hz and 125 would be 250 :)
If 2 modes make sense, then could have 125 and 143 Hz (using no FEC, see note below about packet size): The sensitivity options for .65 bandwidth are -99, -103, -104.
I tried a few things with packet size and found that because the frame times aren't very granular at these high rates can actually get away with the current packet size. Although there must be some theoretical gains from a packet that is smaller.
I'm not sure how to test this, perhaps could measure this with debug or a GPIO changing state that could be measured on the scope? |
Beta Was this translation helpful? Give feedback.
-
I think we can go to 1.7ms gap and then use 0.65, 3/4, with 87 bytes at 150Hz so should we for the moment go with 143 Hz and the said settings? When we find it's to tight we could easily lower to 125 Hz, or then it works well and issues got sorted out, we still can evaluate what it would involve to go to 150 Hz instead. 0.65, 3/4, 4, 32, 87, 2, disabled? |
Beta Was this translation helpful? Give feedback.
-
Works for me, I have 0.65, 3/4, 4, 32, 91 (original packet), 2, disabled at 143 Hz working on the bench and interestingly all the Lua problems went away (still using 921600 and 2 ms gaps). Only thing I'm noticing is that TQly is consistently in the 95 to 99% range. Update: TQly seems to stay in the 95% range when the Coding Rate is set to 3/4, I tried out 0.65 at 1/2 (at 100 & 125 Hz) and TQly didn't drop below 99%. Note for self, RQly had no issues but it is only measuring up to crc1: https://github.com/olliw42/mLRS/blob/main/mLRS/CommonRx/rxstats.h#L33 Updated proof of concept branch: https://github.com/jlpoltrack/mLRS/tree/FLRC-Proof-of-Concept |
Beta Was this translation helpful? Give feedback.
-
Couple of quick notes:
|
Beta Was this translation helpful? Give feedback.
-
I can't explain but this sort of arbitrary behavor strongly suggests that there is a fundamental issue somewhere in the code, probably timing
this IMHO should be done higher up, i.e., here I would add a function GetPacketStatusFLRC |
Beta Was this translation helpful? Give feedback.
-
@jlpoltrack
I can't yet get it to work. it hangs up. As much as I could see there are only changes in sx128x_driver.h, and the baudrate for jrpin5. Or do I miss anything important, which would make it hang up for me? |
Beta Was this translation helpful? Give feedback.
-
This was just a hardcoded value I forgot to update - is TOA used for anything?
Hehehe, the calculator doesn't have this option so I missed it. Yes, we should use this instead.
Did you see my changes to crsf_interface_tx.h ? The original logic will prevent these fast updates from working: main...jlpoltrack:mLRS:FLRC-Proof-of-Concept#diff-c2a2a9daf28d200b24703012c9c608597d9ce3b14d42f7e722a1ffe656417e15R310 |
Beta Was this translation helpful? Give feedback.
-
THX it is working now for me!!! it was a totally dump mistake which I'm not going to tell LOL
I have set ChSource to none momentarily, to avoid any such issues. Want to go through it step by step :) I'm using btw my sx1280 modules, i.e., naked sx1280 chips. anyway, key message: It is doing something :):) |
Beta Was this translation helpful? Give feedback.
-
This is because the RSSI calc is wrong :), set the SNR to 0 here for real values: https://github.com/olliw42/sx12xx-lib/blob/main/src/sx128x.cpp#L310. This was fun to see while I was flying. |
Beta Was this translation helpful? Give feedback.
-
ah, it needs to be changed in the sx12xx-lib .. THX well, then we have that issue that LQ is not as solid as it is in lora mode ... |
Beta Was this translation helpful? Give feedback.
-
Are you seeing issues with RQly? I saw only TQly being not great. I also found much better results using 1/2 Coding Rate (at 100 Hz). |
Beta Was this translation helpful? Give feedback.
-
it looks as if the LQ reported by the tx is more often below 100% than that reported by the receiver (I don't want to talk about R/TQLy since I do not have crsf yet working, that's what I see on the OLED), but that's not really sicentifically taken data. I have noted that enabling the diversity did help quite a bit. So, at this moment it seems like the transmission is indeed just not so great. I ownder if that's somehow related to the x-tal accuracy. I mean, the SxConfigurator gieves an estimate for how accurate it needs to be and it is essentially impossible to achieve, ± 0,15 ppm. Not even most TCXOs do that. There had been some noise on this in the web, but I haven't followed up and don't know what the final outcome/conclusion is. anyway, I think we first want to get all the other pieces in the code working fine, and then come back to iron out what's up with FLRC |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
yo, but even 10ppm is in TXCO range, normal XCO are substantially worse
ABSOLUTELY! |
Beta Was this translation helpful? Give feedback.
-
I have pushed what I currently have to here https://github.com/olliw42/mLRS/tree/dev-flrc It's basically your additions, just a bit better intergrated, i.e., there is a dedciated 143 Hz mode now, which you can set like the other modes (cli, lua, oled) I also made an attempt at slowing down the crsf. And for much it appears to be ok. However, I consistently do get "IRQ2 RX DONE FAIL" hang ups when I have diversity activated and use the lua script. So, there is something not ok with the timing, and I guess it will be a difficult work to iron this out. I would like to encourage you to streamline your branch, since ventually this shoudl be a PR by you to keep teh credit. |
Beta Was this translation helpful? Give feedback.
-
@jlpoltrack when in 143Hz mode, bind doesn't seem to work anymore and there remains the issue with the low LQ, which however is another beast, probably for you to figure out :) again, maybe you want to update your FLRC branch, as eventually this really should be your PR :) |
Beta Was this translation helpful? Give feedback.
-
Spent some time this morning with the latest - only thing I found that helped TxLQ was to lower the rate down to 100 Hz. Am using STM32F1 - so not sure if that is a bottleneck or not. Will update my branch at somepoint and create a PR - will add a few small tweaks. |
Beta Was this translation helpful? Give feedback.
-
so you are saying then going to 100 Hz, LQ stays at 100, while at 143Hz it does not ?? I would not have expected that ... I mean, there should be still plenty of time ... 7 ms - 2x1.67 ms = 3.66 ms ... I guess we need to measure the timing, it appears to me that something in the main loop started to take up too much time ... |
Beta Was this translation helpful? Give feedback.
-
the FRM303 will run at only 48 MHz ... so it will be a bench mark LOL |
Beta Was this translation helpful? Give feedback.
-
Here are the numbers that I recorded for TxLq (1 minute sample logged at 10 Hz on EdgeTx):
Lower rates allow for increased coding rates so did that where I could. RxLQ (up to CRC1) was 99 for all of these.
Will certainly be interesting to know what you see here :) |
Beta Was this translation helpful? Give feedback.
-
PR is here: #98 |
Beta Was this translation helpful? Give feedback.
-
@jlpoltrack has added FLRC support to the sx1280 library, see PR olliw42/sx12xx-lib#6, and also did a basic proof of principle, see his branch https://github.com/jlpoltrack/mLRS/tree/FLRC-Proof-of-Concept.
This thread is for discussing details of a possible implementation of a FLRC mode.
Some random notes:
Beta Was this translation helpful? Give feedback.
All reactions