janh / go-dsl

Library and application for reading xDSL stats
Mozilla Public License 2.0
31 stars 2 forks source link

potential cahnnel characteristic/hlog upload plotting for Fritzbox on profile 35b #14

Closed moeller0 closed 11 months ago

moeller0 commented 11 months ago

Please have a look at:

this

The channel characteristic plot looks like the upload data is misaligned (and potentially mis-scaled), this might be a peculiarity of the Fritzbox output for profile 35b or some other minor issue. Maybe worth looking into?

P.S.: The really cool thing about this plot is that is actually shows the QLN and hlog plots, something FritzOS seems to consider unimportant even though the Australians make a point about especially hlog's utility in diagnosing line faults....

janh commented 11 months ago

Do you have a copy of the raw data? If you don't want to share the entire data, then please send at least the main "DSL Spectrum" section and the section with the same name from the support data.

The channel characteristic plot looks like the upload data is misaligned (and potentially mis-scaled)

It probably just lacks scaling by a factor of two. And for the raw data directly from the modem that difference would actually expected due to different group sizes for upstream and downstream data in this case.

However, AVM usually reports all spectrum data already normalized to 512 values covering the entire spectrum range, so I'm wondering why this is an issue here. (When I last used a Fritzbox 7530 with original firmwarre on my own line using profile 35b, both downstream and upstream Hlog data where scaled that way. But that was at the end of 2021, so maybe the newer firmware is different.)

moeller0 commented 11 months ago

Mmmh, this is not my data, alas, but I can ask for the raw data, how does on best export this?

janh commented 11 months ago

It is included in the archive which is generated by the "Save" button.

janh commented 11 months ago

And for the raw data directly from the modem that difference would actually expected due to different group sizes for upstream and downstream data in this case.

Actually, if the scaling of the raw data was the issue, it should be the other way round, i.e. the upstream data should be stretched (and not squished). So I'm not sure what's really going on here.

moeller0 commented 11 months ago

Mmmh, this is not my link or modem, will ask for a saved file....

janh commented 11 months ago

So, I have to correct myself again: I said that the data reported by a Fritzbox is already scaled, but that is not necessarily true. There is actually some code to adjust scaling in the Fritzbox client, which I forgot about.

I can reproduce the issue with my old data, so this seems to be a regression, and I don't need additional data to fix it!

(It would probably make sense to implement tests to avoid such issues in the future.)

janh commented 11 months ago

I did several tests with different profiles and customized band limits (but not using profile 35b, because my ALL126AM2 does not support that). In all cases, the QLN and Hlog data in the support data appeared to be entirely unscaled, so that the current code worked fine.

To me this looks like there is most likely a special case for VDSL2 profile 35b in the AVM firmware. Assuming that they just do a unconditional scaling of the upstream data, I also added a special case for profile 35b to undo that scaling. That seems to work at least for now.

Thank you for the report!