(first post so if this is old news or not applicableā¦sorry)
Anyways, Iāve been playing around with this component for the past week, and in addition to the API methods, there also appears to be log files that can be scraped for component info like RSSI and the Public IP as tsimons78 requested.
Looking into the API a bit more, I found this link (google cache as the site went down in the last 10 minutes after I found it):
Quantum Gateway Vulnerability Disclosure
The log files listed in the link are available to ANY connected device on the LAN/WLAN interface, without authentication.
Specifically, the log:
http://192.168.1.1:1901/logs/sdhl_operation - contains WWAN connected devices and their stats,external IP, and other info.
Device Info from log file:
{ x_d4a928_cur-snr=30,
associateddevicemacaddress=5c:cf:7f:7d:d4:2b,
x_d4a928_packetstransmitted=3774087,
x_d4a928_packetsreceived=92591,
x_d4a928_standard=N,
sample={x_d4a928_airtime_allocation=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
x_d4a928_curtxmodulationrate=58.5,58.5,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,72.2,72.2,72.2,
currssi=-42,-42,-42,-42,-42,-42,-42,-42,-41,-41,-42,-42,-42,-42,-42,-42,-42,-42,-42,-42,
x_d4a928_currxmodulationrate=54,54,54,54,54,54,54,54,48,48,54,54,54,54,54,54,54,54,54,54},
x_d4a928_airtime_allocation=0.0%,
x_d4a928_transceiversetting=NA x 3 : 1,
x_d4a928_curtxmodulationrate=72.2 Mbps,
currssi=-42,
x_d4a928_currxmodulationrate=54 Mbps,
x_d4a928_channel=1,
x_d4a928_maxtxmodulationrate=72.2 Mbps,
x_d4a928_curbandwidth=20Mhz,
x_d4a928_maxrxmodulationrate=72.2 Mbps,
associateddeviceauthenticationstate=true}
The only āproblemā I can see with this being used for real-time tracking is that it is only logged/sent once an hour. So while it should be good to keep track of your external IP - it prob wont for RSSI tracking unless we can trigger the log to update on demand. (this might be possible but I have not looked into it this far yet)
in case anyone wants to try, here is a quick script I created to scrap that log for the MAC, RSSI, and External IP, and get the names from the mac address: (This is also my first Python script, and is just a āproof of conceptā that data can be extracted and used from those files)
import urllib3
#Connect with quantum_gateway to find the names of the devices
from quantum_gateway import QuantumGatewayScanner
gateway = QuantumGatewayScanner('192.168.1.1', 'password')
gateway.success_init
gateway.scan_devices()
#Read log from router
url = 'http://192.168.1.1:1901/logs/sdhl_operation'
http = urllib3.PoolManager()
logData = http.request('GET', url)
'
#Split log into readable lines
array = logData.data.decode().split('\n')
#Create Variables to store found Device Info and External IP
externalip = ""
deviceInfo = []
#Read each Line of the log to find lines with Device Data and External IP
for line in array:
if line.find('justlog.tr98.wificlients,wlanconfiguration/1/associateddevice,[{') > 0:
deviceInfo.append(line)
elif line.find(',justlog.tr98.networkresource,externalipaddress,') > 0 and externalip == "":
exip = line.split(',')
externalip = exip[(len(exip) -1)]
print("External IP: " + externalip)
#Select and split the last object in the deviceInfo array as it (should) be the latest
deviceData = deviceInfo[(len(deviceInfo) - 1)].split(';')
#Go through each device
for device in deviceData:
#Create Variables to store found info before we go to a new device
foundrssi = 0
foundname = ""
runonce = 0
data = device.split(',')
#Look through the date each device provides to find RSSI, MAC, and name.
for item in data:
#RSSI
if item.find('currssi=') > 0 and foundrssi == 0:
rssi = item.split('=')
foundrssi = rssi[1]
#MAC Address and Name
elif item.find('associateddevicemacaddress=') > 0 and foundname == "":
mac = item.split("=")
foundname = gateway.get_device_name(mac[1])
#Print to screen(for now)
elif foundrssi != 0 and foundname != "" and runonce == 0:
printstring = "Device Name: " + foundname
rssistring = "Device RSSI: " + foundrssi
print(printstring)
print(rssistring)
runonce = 1
gateway._log_out()
Here is the output I get:
External IP: ...
Device Name: Onkyo
Device RSSI: -39
Device Name: PowerMeter
Device RSSI: -42
Device Name: ESPSensor02
Device RSSI: -40
Device Name: DeskLamp
Device RSSI: -40
Device Name: GH_Heater
Device RSSI: -55
Device Name: amazon-6d6ffd85f
Device RSSI: -47
Device Name: Google-Home-Mini-LR
Device RSSI: -43
Device Name: Google-Home-Mini-KT
Device RSSI: -47
Device Name: new-host-1
Device RSSI: -54
Device Name: ESPSensor03
Device RSSI: -54