Table of Contents

getusbstat

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Get USB host status information

Description

array getusbstat ( )

Return an array containing information about the state of the USB interface

Parameters

None

Return Values

Array containing the following keys and values:

KEYTYPEVALUE
enabledint1 if USB support is enabled, 0 if disabled
statestringUSB state, one of the following:
DETACHED - Device is detached
ATTACHED - Device is attached
ADDRESSING - Device is acquiring address
CONFIGURING - Device is being configured
RUNNING - Device is running
HOLDING - Device is holding
STATE=x - Other state (x)
VIDintUSB Device VID (16bit)
PIDintUSB Device PID (16bit)
devicestringName of the device (if a driver is found)
CDC1)int1 if the device supports CDC, otherwise 0

Example

<?
  $arr=getusbstat();
  print("USB device ID is: ".$arr['VID'].":".$arr['PID']\r\n");
?>

See Also

setusbpower() - Enable or disable USB power

net_enable3g() - Enable 3G support for the dongle

net_disable3g() - Disable 3G support for the dongle

getethstat() - Get Ethernet connection status information

1)
CDC stands for Communications Device Class, which is a composite USB device class that supports communication. The class may include more than one interface, such as a custom control interface, data interface, audio, or mass storage related interfaces. Currently the Wattmon only supports CDC devices for cellular data communication.