Skip to content

Commit

Permalink
Fix upstream Hlog scaling for Fritzbox devices on VDSL2 Profile 35b
Browse files Browse the repository at this point in the history
Normally, the QLN and Hlog data in the support data seem to be reported
in groups as defined by the VDSL2 specification. The group size is not
reported, so it is guessed from the bands data.

However, it looks like AVM applies some scaling to the upstream data
when VDSL2 Profile 35b is in use, so that the guessed group size is
incorrect. As an attempt to fix this, adjust the group size by a factor
of 2 in that case.
  • Loading branch information
janh committed Oct 6, 2023
1 parent 2cbf152 commit 79ee2f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fritzbox/supportdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ func parseSupportData(status *models.Status, bins *models.Bins, d *rawDataSuppor

bins.QLN.Downstream = parseSupportDataBins(bins.Bands.Downstream, values, "QLN DS Array", "QLN Array")
bins.QLN.Upstream = parseSupportDataBins(bins.Bands.Upstream, values, "QLN US Array")

if bins.Mode.Type == models.ModeTypeVDSL2 && bins.Mode.Subtype == models.ModeSubtypeProfile35b {
// It seems like the AVM firmware applies some scaling to the upstream data for VDSL2 Profile 35b,
// so adjust the guessed group size to take this into account.
bins.Hlog.Upstream.GroupSize *= 2
bins.QLN.Upstream.GroupSize *= 2
}
}

func parseSupportDataValues(supportData string) map[string]string {
Expand Down

0 comments on commit 79ee2f5

Please sign in to comment.