Fritzbox rollover bug fixed.

master
marcel 7 months ago
parent 6bc3c807b7
commit 68dda17ac4
  1. 18
      CHANGELOG.md
  2. 9
      fritz-api.sh

@ -0,0 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.
Added : for new features.
Changed : for changes in existing functionality.
Deprecated: for soon-to-be removed features.
Removed : for now removed features.
Fixed : for any bug fixes.
Security : in case of vulnerabilities.
## [1.0.0] - 2022-06-24
First working version.
## [1.0.1] - 2022-06-26
### Fixed
- Fritzbox roll over bug: downloaded/uploaded counters rolled over at about 4 GByte

@ -125,8 +125,13 @@ print_json(){
UPSTREAM=$(find_xml_value "${STATUS2}" NewLayer1UpstreamMaxBitRate)
BANDWIDTHDOWNBYTES=$(find_xml_value "${STATUS3}" NewByteReceiveRate)
BANDWIDTHUPBYTES=$(find_xml_value "${STATUS3}" NewByteSendRate)
TOTALBWDOWNBYTES=$(find_xml_value "${STATUS3}" NewTotalBytesReceived)
TOTALBWUPBYTES=$(find_xml_value "${STATUS3}" NewTotalBytesSent)
# NewByteReceiveRate and NewByteSendRate are 32 bit registers overflowing at 4.3*1e9 bytes
# Use the 64 bit registers instead:
# TOTALBWDOWNBYTES=$(find_xml_value "${STATUS3}" NewTotalBytesReceived)
# TOTALBWUPBYTES=$(find_xml_value "${STATUS3}" NewTotalBytesSent)
TOTALBWDOWNBYTES=$(find_xml_value "${STATUS3}" NewX_AVM_DE_TotalBytesReceived64)
TOTALBWUPBYTES=$(find_xml_value "${STATUS3}" NewX_AVM_DE_TotalBytesSent64)
if [ "${DEBUG}" -eq 1 ]; then
echo "DEBUG - Status:"
echo "$CONNECTIONSTATUS"

Loading…
Cancel
Save