Was curious if anyone has built or considered building a logging option for the monitor? Something as simple as ASCII log (with timestamps) - or even something like a wireshark format (so they could be opened / read there)?
You could use a simple Python program like this (using the same library and the common module in config-tool):
from common import *
import struct
import time
REPORT_ID_MONITOR = 101
device = get_device()
data = struct.pack(
"<BBBB25B", REPORT_ID_CONFIG, CONFIG_VERSION, SET_MONITOR_ENABLED, 1, *([0] * 25)
)
device.send_feature_report(add_crc(data))
try:
while True:
data = device.read(64)
now = time.time()
if data[0] == 101:
for i in range(7):
(usage, value, hub_port) = struct.unpack("<LlB", data[1+i*9:1+i*9+9])
if usage != 0:
print("{:.3f}: ({}) 0x{:08x} {}".format(now, hub_port, usage, value))
except KeyboardInterrupt:
data = struct.pack(
"<BBBB25B", REPORT_ID_CONFIG, CONFIG_VERSION, SET_MONITOR_ENABLED, 0, *([0] * 25)
)
device.send_feature_report(add_crc(data))
brilliant! thank you @jfedor !!