fix agc reset on SX126x, SX1276 & LR11x0 chips#1743
fix agc reset on SX126x, SX1276 & LR11x0 chips#1743weebl2000 wants to merge 7 commits intomeshcore-dev:devfrom
Conversation
|
what boards do you think the AGC doesn't work on? On a V4, I've been watching closely at a terrible site I have with 945Mhz STL microwave and turned off agc.reset.interval and then back on. I think it "might" be working but not sold on that. |
I have reports that it gets stuck on V3 and T114, as well. My DIY node based on ESP32-S3 and E22 900M30S gets affected, too. |
|
I figured out why I'm not seeing this AGC problem. Its had me stumped on and off for a couple days. I set my repeaters to Zero on the int.thresh 0 Once I changes this back to default, yep, I can watch my noise floor eventually hit -120 on my V4 and be of course very desensitized. I tried @weebl2000 test firm builder and in fact it is fixed. also, no current spike on AGC rest every 12 seconds that mine is set for the test. |
840d1b7 to
ce05fed
Compare
|
@weebl2000 Your test firm still has the 22 second powersaving delay. Can you update your base 1.13 firm with that fix? I'm testing your AGC fix now but since I'm in a busy area, I'm never sleeping and its draining battery pretty good in our rain for days weather. |
the fixagcreset is up-to-date with the meshcore/dev branch. Are you building fixagcreset branch? https://mcimages.weebl.me/?commitId=fixagcreset what branch is the 22 second powersaving delay branch? I can merge that one with this one for you so you can test the combination. |
|
@weebl2000 the 22 second delay showed up in 1.13 and @IoTThinks Kevin made a hotfix on his github. They also also have powersaving13 as well. I've been testing it on 2, V4 boards and its awesome. It is not merged into the dev branch at this time. If you could do something temporary with ether the hot fix, that would allow me to test at 3 tower sites tomorrow for work that I'm taking an insurance agent to. All easy access repeaters in town. The hot fix on easy sky mesh is under Firmware, Testing, PR-1687, : heltec_v4_repeater-002878e.bin and I have that running in addition to stock 1.13 and its perfect. I'm guessing that would be the simplest? All 3 of these sites go numb -120 in just under 24 hrs and this AGC reset fix should be golden to find out really quick! |
|
@weebl2000 22-second delay in PowerSaving is likely the OLED issue on Heltec v4 in the current MC 1.13 (main and dev). It should not be related / affected to your PR. @towerviewcams The fix for 22-second powersaving delay in PowerSaving 13 is included in the bellow pending PR too. |
try this one: https://mcimages.weebl.me?commitId=agc-tower it includes this PR + #1687 + #1569 |
|
@weebl2000 Trying right now! |
|
@weebl2000 Wow! what a difference! I'm slamming 2 boards at the same time, with 2 different companions and 2 ios phones. So im connected at the same time. #1 V4 has the AGC/pwr save fix. This PR and 1687 and 1569 I'm slamming them both side by side and the AGC reset works every time. back down to -104 ish......... #2 is sticking and not resetting. Sometimes its slow, and others not. I'm sure if I let this run for a day we would see. -Field Test @IoTThinks, Keven, I know you told me on FaceBook that you haven't seen where you need to reset. Let me test this and I'll know very quickly. I'm sitting next to over 1 megawatt of power and 4 cellular companies all on my 800ft tower that I manage. |
|
90 mins in and holding -98 to -102 on noise floor readings. This is exciting so far!!!! |
|
The FAQ may need to be updated. |
|
@towerviewcams Well, 1MW interference. Then it makes sense. So your agc reset interval is 4? Besides the noise floor number, have you observed if the repeaters can receive more packets or better SNR...? I would love to have lower noise floor and better RX too. My noise floor for Heltec v3s with 3 and 5dbi is -97 to even -77 recently. |
My AGC reset is 8. Everything has been working great. Prior to this reset working properly, decoding packets was very intermitant and required a very strong signal as noise floor would increase to -86 or so and remain there. Now, I'm holding -97 to -102......I do see a suddon drop to -86 and then it pops back up with the AGC reset. So far so good! |
|
Today, I'm going to OTA this at another location that has 600,000 watts broadcast noise and 3 cellular tenants. My noise floor here drops slowly to -91 and I was going to do the LNA bypass. Not now, lets try this! Update soon! |
|
@towerviewcams Great. This symptom seems to happen to many boards including RAK4631. Not just Heltec v4. |
|
Now running this on another V4 in the field next to 600,000 ERP broadcast transmitter and AGC is working nicely. Taking my Wio down to power -9 and can trace now just fine! Before, my noise floor was holding -89 and could not. Let this run for rest of the day and I'll know for sure. now im at a very nice -96-98 ish. reset rate 8 seconds. If works great I'm going to set my reset timer to 16 on both tests. then more as time goes on to find the sweet spot where it starts to drop before reset |
80710c9 to
3f59f9d
Compare
|
I've tested this on a V3, works fine, just as well as with V4. |
80710c9 to
7f9107b
Compare
|
@towerviewcams I have tested with my Heltec v3 with 3dbi antenna for half a day. MC 1.13: This branch: (commit dbb739) All values for agc.reset.interval give the same noise floor.
|
@IoTThinks My noise is broadcast at 580Mhz so its far away from 910Mhz but a HUGE signal source for sure. I'm glad your seeing good results. Cellular is much closer to 910mhz and will get through your filter easier. So it doesn't surprise me. |
|
More then 32 hours and running perfectly on V4 still using the "agc-tower" firm build. Fantastic @weebl2000 Just as a thought, @IoTThinks Keven, will you please please put this into a test Powersaving13.1 beta test? Lets consider putting this together? |
@weebl2000 So this now has 1569, 1600 and 1687, correct? This would be @IoTThinks Kevin's latest as I understand and the 3 PR fixes. I will flash 3, V4 boards and test......... and now we have a V4.3 still figuring out how / when we can get it. |
correct! |
|
PR 1687 is latest PowerSaving. |
@IoTThinks Ok Kevin, you got it! flashing 3, V4 boards now with @weebl2000 merge :) |
Trying this out. Looks like the powersaving feature is too aggressive for CLI to work, you have to disable it to make changes to router config :) |
What are you trying to do in the CLI when you're testing this? |
Getting the state of variables, like tx, txdelay and the like. |
Works great via the app ota. you must be trying USB or something |
No, I'm using BLE. It seems to me that disabling powersaving makes the CLI more snappy in its responses to me, but maybe I'm mistaken. Or maybe it's something to do with my settings - AF 5, txdelay 0.5, rxdelay 0.5, int.thresh 10, agc.reset.interval 8. The current draw with powersaving on is 24 mA vs 57 mA with off. |
Oh, I'm sorry. I thought you were using it as a repeater my bad. |
I'm using it as a repeater obviously, accessing it over the LoRa remotely. With this power saving patch I can't even login half of the time now, and the app is less responsive in processing things like neighbors list and the like. It makes sense, if the ESP force-sleeps as soon as the packets leave the antenna :) Anyway, it's not a huge deal, if I need to change the settings, I can always turn power saving off. |
Would be good if you can add this as feedback in the original PR - it definitely seems like a bug. If you want to try all my open PRs you can try to build https://mcimages.weebl.me?commitId=dev_plus - it has some great improvements imho. |
1. warm sleep 2. wake to stdby 3. Calibrate(0x7F) to reset all internal blocks 4. re-apply DIO2 RF / boosted gain & register patch to make sure everything is as it was
Similar to SX126x but simpler.
9d7277e to
8771761
Compare
I'll test it more comprehensively over the next couple of days. Hate to give false positives.
I have most of them compiled in anyway :) Thank you for your outstanding work btw. |
|
@terminalvelocity23 I also have been having difficulty getting repeater admin CLI commands to work even with powersaving off. The good news is I havent seen the noise floor get stuck at -120, the bad news is that I am still having terrible RX performance with this v4 node on the roof with an acasom cavity filter. Here are noise floor readings with agc.reset.inverval=0 at with about a 2 seconds delay between reads. Some crazy swings happening. Was seeing better noise floor numbers with agc.reset.inverval=4 but still having poor trace success rates Was seeing some slightly worse noise floor numbers with agc.reset.inverval=8 pop up like -55, similar trace success rates When the traces are successful I am generally seeing much higher RX and TX db numbers with it on the roof vs 15 feet below indoors. And I can occasionally can get traces through to some way further nodes that I could never hit with the unit indoors but my general trace success rate is way worse now. Think I need to disable the boosted gain or something with this repeater installed on the roof as its having major issues dealing with the outdoor city noise / the wider audience of repeaters? Here is the build I'm using created today at 12:33pm from here https://mcimages.weebl.me/?commitId=agc-powersave |
|
@beachmiles do you have int.thresh set? If not, try setting it to anywhere between 5-10, or even lower if you have a proper filter. If you want to try all of my PRs you can build my dev_plus branch https://mcimages.weebl.me?commitId=dev_plus - it contains all my open PRs. I've been running it for over a month and haven't noticed any issues yet. dev_plus is what I'm running on all my devices. You can view all changes compared to dev here: dev...weebl2000:MeshCore:e488de5d0c25c9ee08fae6eb7fc18acfc4adbef0 |
|
For the powersaving, you are welcome to feedback on the PR #1687 For the responsiveness of the CLI, last time, I patched this to improve the responsiveness . I believe this PR will indirectly improve the CLI responsiveness due to better RX. Before Lunar new year, they are all at -97. May be last time, they are on MC 11. |
|
I may be seeing slightly more successful traces setting int.thresh to 10 or to 5. I am seeing better noise floor numbers now like -112 but prob cause its getting later in the night. Will try loading another build on Monday as its now on the roof in a steel case without an external wifi antenna. |
|
@weebl2000 @IoTThinks BIG UPDATE So the AGC-Powersave that has the three merged PR and the quick sleep does have serious login responsiveness issues. @beachmiles is totally correct. So I have pulled that from my tests that ran for 24hrs. -done there The dev_plus has a 16 second delay before power saving kicks in. current is 47mA and then will drop down to 11mA after the delay. I've done allot of testing ALLOT after it goes to sleep and it responds every single time, quickly! So, how can we get this delay down and still have it respond? That would then be perfect. In busy areas we may never sleep. -The dev-plus also has the hardware delay, and I have 3 repeaters LOS to my house that are high level, and I must say this is just fantastic. It checks briefly to see if there is on air traffic before it transmits. very good. |
|
@towerviewcams Why there is 16s delay? Then later, the repeater should sleep instantly, right? |







fixes #1716- see discussion there for initial test results
fixes #1209
I've referenced SX1262 datasheet to implement the calibration reset.
For LR1110 similar implementation, the 'AGC' is completely black boxed behind firmware so you can only reset it by resetting registers.
LR1110 datasheet page 9 section 1.2.1 states:
•Air interface fully compatible with the SX1261/2/8 family
Also see LR1110 user docs
So reset is very similar.