Module hwPortUtils
[hide private]
[frames] | no frames]

Module hwPortUtils

source code

Classes [hide private]
  PDWORD
  ULONG_PTR
  GUID
  SP_DEVINFO_DATA
  PSP_DEVINFO_DATA
  SP_DEVICE_INTERFACE_DATA
  PSP_DEVICE_INTERFACE_DATA
  dummy
  SYSTEMTIME
  BLUETOOTH_DEVICE_INFO
Functions [hide private]
 
ValidHandle(value) source code
generator of (str, str, str)
listComPorts(onlyAvailable=True)
List com ports on the system.
source code
 
getBluetoothDeviceInfo(address) source code
Variables [hide private]
  NULL = 0
  SIZEOF_SP_DEVICE_INTERFACE_DETAIL_DATA_W = 6
  SetupDiDestroyDeviceInfoList = ctypes.windll.setupapi.SetupDiD...
  SetupDiGetClassDevs = ctypes.windll.setupapi.SetupDiGetClassDevsW
  SetupDiEnumDeviceInterfaces = ctypes.windll.setupapi.SetupDiEn...
  SetupDiGetDeviceInterfaceDetail = ctypes.windll.setupapi.Setup...
  SetupDiGetDeviceRegistryProperty = ctypes.windll.setupapi.Setu...
  GUID_CLASS_COMPORT = GUID(0x86e0d1e0L, 0x8089, 0x11d0, (ctypes...
  DIGCF_PRESENT = 2
  DIGCF_DEVICEINTERFACE = 16
  INVALID_HANDLE_VALUE = 0
  ERROR_INSUFFICIENT_BUFFER = 122
  SPDRP_HARDWAREID = 1
  SPDRP_FRIENDLYNAME = 12
  SPDRP_LOCATION_INFORMATION = 13
  ERROR_NO_MORE_ITEMS = 259
  DICS_FLAG_GLOBAL = 1
  DIREG_DEV = 1
  BLUETOOTH_MAX_NAME_SIZE = 248
  __package__ = None
hash(x)
Function Details [hide private]

listComPorts(onlyAvailable=True)

source code 

List com ports on the system.

Parameters:
  • onlyAvailable (bool) - Only return ports that are currently available.
Returns: generator of (str, str, str)
Generates dicts including keys of port, friendlyName and hardwareID.

Variables Details [hide private]

SetupDiDestroyDeviceInfoList

Value:
ctypes.windll.setupapi.SetupDiDestroyDeviceInfoList

SetupDiEnumDeviceInterfaces

Value:
ctypes.windll.setupapi.SetupDiEnumDeviceInterfaces

SetupDiGetDeviceInterfaceDetail

Value:
ctypes.windll.setupapi.SetupDiGetDeviceInterfaceDetailW

SetupDiGetDeviceRegistryProperty

Value:
ctypes.windll.setupapi.SetupDiGetDeviceRegistryPropertyW

GUID_CLASS_COMPORT

Value:
GUID(0x86e0d1e0L, 0x8089, 0x11d0, (ctypes.c_ubyte* 8)(0x9c, 0xe4, 0x08\
, 0x00, 0x3e, 0x30, 0x1f, 0x73))