Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script fails if not connected to 5G band #75

Closed
tarunVreddy opened this issue Aug 5, 2022 · 2 comments
Closed

Script fails if not connected to 5G band #75

tarunVreddy opened this issue Aug 5, 2022 · 2 comments
Labels
bug Something isn't working firmware-change

Comments

@tarunVreddy
Copy link

tarunVreddy commented Aug 5, 2022

Executing:

tmo-monitor.py --ping-count 3 -4 B2 -5 n41 -5 n71 --model ARCKVD21

When the Ark device isn't connected to a 5g band, the JSON no longer contains a 5g section in the output, resulting in the following error:

2022/08/05 10:04:00 [DEBUG] Starting new HTTP connection (1): 192.168.12.1:80
2022/08/05 10:04:00 [DEBUG] http://192.168.12.1:80 "GET /TMI/v1/gateway?get=all HTTP/1.1" 200 906
Traceback (most recent call last):
File "/home/treddy/.local/bin/tmo-monitor.py", line 83, in
signal_info = gw_control.get_signal_info()
File "/home/treddy/.local/lib/python3.9/site-packages/tmo_monitor/gateway/arcadyan.py", line 69, in get_signal_info
nr_info = info['signal']['5g']['bands']
KeyError: '5g'

Output from gateway endpoint:

{
"device": {
"friendlyName": "5G Gateway",
"hardwareVersion": "R01",
"isEnabled": true,
"isMeshSupported": true,
"macId": "",
"manufacturer": "Arcadyan",
"manufacturerOUI": "001A2A",
"model": "KVD21",
"name": "5G Gateway",
"role": "gateway",
"serial": "",
"softwareVersion": "1.00.16",
"type": "HSID",
"updateState": "latest"
},
"signal": {
"4g": {
"bands": [
"b12"
],
"bars": 5.0,
"cid": 22,
"eNBID": ,
"rsrp": -73,
"rsrq": -6,
"rssi": -67,
"sinr": 17
},
"generic": {
"apn": "FBB.HOME",
"hasIPv6": true,
"registration": "registered",
"roaming": false
}
},
"time": {
"daylightSavings": {
"isUsed": false
},
"localTime": 1659687085,
"localTimeZone": "<-06>6",
"upTime": 306
}
}

@highvolt-dev
Copy link
Owner

Thank you for the report - this will be an easy fix.

Appreciate the JSON response sample!

@highvolt-dev highvolt-dev added bug Something isn't working firmware-change labels Aug 5, 2022
highvolt-dev added a commit that referenced this issue Aug 6, 2022
safely access 5g band info for arcadyan gateway - fixes #75
@highvolt-dev
Copy link
Owner

@tarunVreddy this should be fixed in the latest release now, thanks again for reporting

hugoh added a commit to hugoh/tmo-monitor that referenced this issue May 26, 2023
* Fixed tmo_monitor.gateway module installation

* Update README.md

add Windows directions

* use meaningful exit status codes, fixes highvolt-dev#52

* clarify that a clean run will exit with status code 0 as expected

* add project logo

* First commit to log to syslog - not working yet

Moved all the logging from print_and_log to logging, but syslog doesn't
work. Need to debug.

* Made Linux syslog logging work

* Moved away from f-Strings to lower Python version requirement

* Added support for Windows (untested)

* Fixed log message format

* Fixed out-of-scope use of syslog_socket

* Fixed missing leading space

* add missing import

* fixes highvolt-dev#56 breaking change to webapp login after Nokia firmware upgrade to 1.2103.00.0338

* version bump

* add IPv6 ping support, fixes highvolt-dev#43

* use ping6 binary if available for ipv6 ping functionality, fixes highvolt-dev#43

* fix setting IPv6 ping via .env

* conditionally check for lsid cookie to avoid runtime error with nokia 2104 firmware update

* calculate arcaydyan eNB ID using decimal base fixes highvolt-dev#68 caused by firmware update

* safely access 5g band info for arcadyan gateway - fixes highvolt-dev#75

* add support for alternative connectivity checks - fixes highvolt-dev#13 highvolt-dev#78 ; add explicit support for Sagecom gateway

* correct README

* explicitly pass -4 flag to ping command to try ipv4 with ping command except for OS X clients, fixes highvolt-dev#77

---------

Co-authored-by: highvolt-dev <highvoltage@gmail.com>
hugoh added a commit to hugoh/tmo-monitor that referenced this issue May 26, 2023
* Fixed tmo_monitor.gateway module installation

* Update README.md

add Windows directions

* use meaningful exit status codes, fixes highvolt-dev#52

* clarify that a clean run will exit with status code 0 as expected

* add project logo

* First commit to log to syslog - not working yet

Moved all the logging from print_and_log to logging, but syslog doesn't
work. Need to debug.

* Made Linux syslog logging work

* Moved away from f-Strings to lower Python version requirement

* Added support for Windows (untested)

* Fixed log message format

* Fixed out-of-scope use of syslog_socket

* Fixed missing leading space

* add missing import

* fixes highvolt-dev#56 breaking change to webapp login after Nokia firmware upgrade to 1.2103.00.0338

* version bump

* add IPv6 ping support, fixes highvolt-dev#43

* use ping6 binary if available for ipv6 ping functionality, fixes highvolt-dev#43

* fix setting IPv6 ping via .env

* conditionally check for lsid cookie to avoid runtime error with nokia 2104 firmware update

* calculate arcaydyan eNB ID using decimal base fixes highvolt-dev#68 caused by firmware update

* safely access 5g band info for arcadyan gateway - fixes highvolt-dev#75

* add support for alternative connectivity checks - fixes highvolt-dev#13 highvolt-dev#78 ; add explicit support for Sagecom gateway

* correct README

* explicitly pass -4 flag to ping command to try ipv4 with ping command except for OS X clients, fixes highvolt-dev#77

* Pushing on docker-image

---------

Co-authored-by: highvolt-dev <highvoltage@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working firmware-change
Projects
None yet
Development

No branches or pull requests

2 participants