PortsInfo
Get all port information for all ports. All available information for all ports as a dictionary of dictionaries. Most of these values can be queried individually
Syntax: see Call Structure
{ "method": "cbrx_connection_get", "params": [ connection-handle, "PortsInfo" ] } |
connection-handle is the Connection Handles as an integer.
Returns
{ "Port.1": { "Port":port-number, "Current_mA": Current_mA, "Flags": flags, "ProfileID":profile-ID, "TimeCharging_sec":charging-time, "TimeCharged_sec":charge-complete, "Energy_Wh":energy-Wh, "VID":Vendor-ID, "PID":product-ID, "Manufacturer": "device-manufacturer", "Description": "description", "SerialNumber": "usb-serial", "PhoneSerialNumber": "phone-serial", "PhoneIdentity": "phone-name", "IMEI": "IMEI-number", "MacAddress": "MacAdress", "PhoneSoftwareVersion": "phone-OS-version" "USBTree": { "USB2": { "LocationID":location-id, "VID":Vendor-ID, "PID":product-ID, "Manufacturer": "device-manufacturer", "Description": "description", "SerialNumber": "usb-serial", "USBVersion":usb-version, "Battery": { "DataSource": "battery-data-source", "TrustLevel": "trust-level", "PairingSupported":support-pairing, "HealthPercent":battery-health, "CurrentLevel":battery-current-level, "CurrentTime":current-hub-time, "StartingLevel":charge-start-level, "StartingTime":charge-start-time, "CapacityNew":new-battery-capacity, "Capacity":current-battery-capacity, "ChargingStatus": "charge-status", }, "PhoneSerialNumber": "phone-serial", "PhoneIdentity": "phone-name", "IMEI": "IMEI-number", "MacAddress": "MacAdress", "PhoneSoftwareVersion": "phone-OS-version" } }, "Battery": { "DataSource": "battery-data-source", "TrustLevel": "trust-level", "PairingSupported":support-pairing, "CurrentLevel":battery-current-level, "CurrentTime":current-hub-time, "StartingLevel":charge-start-level, "StartingTime":charge-start-time, "CapacityNew":new-battery-capacity, "Capacity":current-battery-capacity, "ChargingStatus": "charge-status", "HealthPercent":battery-health } } } |
Output | Description |
---|---|
port-number | The number of the port on the hub |
Current_mA | Current being delivered to the mobile device, in mA (milliamperes) |
flags | Flags on the port, see Syntax: see Call Structure |
profile-ID | The profile number, or 0 if not charging. |
charging-time | Time passed in seconds that a port has been charging a device. |
charge-complete | Time in seconds since the device completed charging |
energy-Wh | Power in Watt-hours (calculated every second), format of n.n |
Vendor-ID | Device Vedor ID number or VID. Displayed as an Integer |
product-ID | Product ID number or PID. Displayed as an Integer |
device-manufacturer | The name of the device manufacturer |
description | Name of the hardware |
usb-serial | USB serial number |
phone-serial | Phone serial number |
phone-name | Name of the phone |
IMEI-number | The IMEI number of the phone |
MacAdress | A unique address assigned to the mobile device. It is a 48 bit value, consisting of twelve hexadecimal characters |
phone-OS-version | Version number of the OS on the phone |
location-id | The Location IDs as an Integer |
usb-version | The USB version number of the connection to the hub. Format 'N.nn' |
battery-data-source | The source of the device battery information |
trust-level | Whether the device is trusted/ paired |
support-pairing | Whather the device supports being trusted/ paired |
battery-health | Battery health shown as a percentage |
battery-current-level | Current battery level of device displayed as a percentage |
current-hub-time | The hub time, shown as an integer in ms |
charge-start-level | Battery percentage level when device connected |
charge-start-time | The hub time charging started, shown as an integer in ms |
new-battery-capacity | The battery capacity of device from new |
current-battery-capacity | The battery capacity of the device now |
charge-status | Charging status of the battery i.e. full |
support-pairing | Whather the device supports being trusted/ paired |
battery-health | Battery health shown as a percentage |
Example
Trimmed example of information returned.
{
"json": "2.0",
"id": 0,
"Port.1": {
"Port": 1,
"Current_mA": 126,
"Flags": "R A S",
"ProfileID": 0,
"TimeCharging_sec": 0,
"TimeCharged_sec": 0,
"Energy_Wh": 0.0,
"VID": 1452,
"PID": 4776,
"Manufacturer": "SuperPhone Makers Inc.",
"Description": "SuperPhone",
"SerialNumber": "012a37d1fa07617ad7ef0430ba49f479ab9fb6b8",
"PhoneSerialNumber": "ZCZCZCZCZCZC",
"PhoneIdentity": "My Old SuperPhone",
"IMEI": "354430099009999",
"MacAddress": "aa:bb:cc:ff:ee:ff",
"PhoneSoftwareVersion": "12.4.8",
"USBTree": {
"USB2": {
"LocationID": 589570048,
"VID": 1452,
"PID": 4776,
"Manufacturer": "SuperPhone Makers Inc.",
"Description": "SuperPhone",
"SerialNumber": "012a37d1fa07617ad7ef0430ba49f479ab9fb6b8",
"USBVersion": 2.0,
"Battery": {
"DataSource": "imobiledevice",
"TrustLevel": "paired",
"PairingSupported": true,
"HealthPercent": 95,
"CurrentLevel": 100,
"CurrentTime": 1613056296,
"StartingLevel": 100,
"StartingTime": 1613056293,
"CapacityNew": 1751,
"Capacity": 1678,
"ChargingStatus": "full"
},
"PhoneSerialNumber": "ZCZCZCZCZCZC",
"PhoneIdentity": "My Old SuperPhone",
"IMEI": "354430099009999",
"MacAddress": "aa:bb:cc:ff:ee:ff",
"PhoneSoftwareVersion": "12.4.8"
}
},
"Battery": {
"DataSource": "imobiledevice",
"TrustLevel": "paired",
"PairingSupported": true,
"HealthPercent": 95,
"CurrentLevel": 100,
"CurrentTime": 1613056296,
"StartingLevel": 100,
"StartingTime": 1613056293,
"CapacityNew": 1751,
"Capacity": 1678,
"ChargingStatus": "full"
}
},
"Port.2": {
"Port": 2,
"Current_mA": 0,
"Flags": "R D S",
"ProfileID": 0,
"TimeCharging_sec": 0,
"TimeCharged_sec": 0,
"Energy_Wh": 0.0,
"VID": 0,
"PID": 0,
"Manufacturer": "",
"Description": "",
"SerialNumber": ""
},
"Port.3": ...
}