Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

FRITZ!Box Fon WLAN 7360: Can't parse inetstats #184

Closed
juergenhoetzel opened this issue Dec 10, 2018 · 3 comments
Closed

FRITZ!Box Fon WLAN 7360: Can't parse inetstats #184

juergenhoetzel opened this issue Dec 10, 2018 · 3 comments
Labels
Compatibility Compatibility tensor: API vs Hardware vs FRITZ!OS

Comments

@juergenhoetzel
Copy link

My boxinfo:

Model:     FRITZ!Box Fon WLAN 7360, ADSL standard 'B', branded as 'avm'
Firmware:  FRITZ!OS 06.85 (124.06.85 revision 61714)
Running:   5 years, 2 months, 7 days, 4 hours, 517 reboots

when running fritzctl list inetstats, I get:

2018/12/10 16:39:43 Login successful
2018/12/10 16:39:43 Recent upstream/downstream time series:


Downstream/internet       [kb/s]:  
Downstream/media          [kb/s]:  
Downstream/guest          [kb/s]:  
Upstream/low priority     [kb/s]:  
Upstream/default priority [kb/s]:  
Upstream/high priority    [kb/s]:  
Upstream/realtime         [kb/s]:  
Upstream/guest            [kb/s]:  0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

TCPDump:

GET /internet/inetstat_monitor.lua?action=get_graphic&sid=XXXXXXXXXX&myXhr=1&xhr=1&useajax=1 HTTP/1.1
Host: 192.168.178.1:80
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-type: text/html; charset=utf-8
Date: Sat, 08 Dec 2018 14:47:31 GMT
Expires: -1
Pragma: no-cache
Keep-Alive: timeout=60, max=300

[{"downstream":25088000,"upstream":5054000,"prio_realtime_bps":[129,525,1422,844,960,3830,742,5002,161,328,550,583,2452,1923,396,316,434,4498,4122,434],"max_us":631750,"dynamic":false,"guest_us_bps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"prio_low_bps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ds_guest_current_bps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"_node":"sg0","prio_default_bps":[89,258,159,112,697,0,89,701,1113,1082,534,342,320,428,499,545,89,0,361,0],"ds_current_bps":[983,2781,4284,1717,3713,359,5310,17212,2058,16130,1282,1434,9757,3921,1961,453,1241,4044,7132,420],"name":"sync_dsl","max_ds":3136000,"mc_current_bps":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"prio_high_bps":[48,291,381,73,86,0,86,173,48,95,48,41,454,128,65,0,48,91,841,32],"mode":"VDSL"}]

seems the fritzctl JSON schema doesn't match the data returned by my box:

type TrafficMonitoringData struct {
	DownstreamInternet      []float64 `json:"ds_bps_curr"`
	DownStreamMedia         []float64 `json:"ds_mc_bps_curr"`
	DownStreamGuest         []float64 `json:"ds_guest_bps_curr"`
	UpstreamRealtime        []float64 `json:"us_realtime_bps_curr"`
	UpstreamHighPriority    []float64 `json:"us_important_bps_curr"`
	UpstreamDefaultPriority []float64 `json:"us_default_bps_curr"`
	UpstreamLowPriority     []float64 `json:"us_background_bps_curr"`
	UpstreamGuest           []float64 `json:"guest_us_bps"`
}
@bpicode bpicode added the Compatibility Compatibility tensor: API vs Hardware vs FRITZ!OS label Dec 10, 2018
@bpicode
Copy link
Owner

bpicode commented Dec 10, 2018

Hi @juergenhoetzel,

thanks for reporting this issue. I assume that you are using a very recent version from git/master. There is a known incompatibility between FRITZ!OS 6.x and 7.x. The commit f117d8a broke support for 6.x. Is it an option for you to use one of the releases, e.g. v1.4.23 or earlier?

Greets

@juergenhoetzel
Copy link
Author

Hi @juergenhoetzel,

thanks for reporting this issue. I assume that you are using a very recent version from git/master. There is a known incompatibility between FRITZ!OS 6.x and 7.x. The commit f117d8a broke support for 6.x.

Thanks for the hint!

Is it an option for you to use one of the releases, e.g. v1.4.23 or earlier?

I just reversed the commit and get the correct stats:

[master 861deff] Revert "Fix 'list inetstats' for FRITZ!OS 07.x, breaking change"

→ fritzctl   list inetstats 
2018/12/11 19:23:59 Login successful
2018/12/11 19:24:00 Recent upstream/downstream time series:


Downstream/internet       [kb/s]:  644.09 0.32 75.43 4.73 9.66 47.34 16.93 0.28 1.92 2.01 3.43 1.43 3.27 2.84 360.00 24.76 2.91 92.16 2.84 1.77
Downstream/media          [kb/s]:  0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Upstream/low priority     [kb/s]:  0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Upstream/default priority [kb/s]:  0.11 0.00 0.11 0.00 0.38 1.86 0.44 0.02 0.11 0.04 0.11 0.00 6.02 0.00 0.11 0.04 0.09 0.02 0.09 0.00
Upstream/high priority    [kb/s]:  17.64 0.00 0.12 0.19 0.06 0.67 0.06 0.00 0.09 0.05 0.11 0.00 0.05 0.00 6.20 0.21 0.05 1.98 0.17 0.07
Upstream/realtime         [kb/s]:  0.22 3.49 1.93 1.52 0.92 0.55 1.79 0.09 0.21 0.86 1.37 0.00 0.43 3.63 2.81 3.78 0.19 5.42 0.23 0.21

@bpicode
Copy link
Owner

bpicode commented Dec 18, 2018

@juergenhoetzel Closing this issue as it is related to FRITZ!OS Compatibility. Currently git/master addresses firmwares 7.x.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Compatibility Compatibility tensor: API vs Hardware vs FRITZ!OS
Projects
None yet
Development

No branches or pull requests

2 participants