Device finder

API function description

class pywpc.DeviceFinder(verbose=True)
Bcst_checkMACAndReboot(mac_addr)

Reboot device with broadcast mode.

Parameters
mac_addrstr of 6 int separated by colon.

MAC address.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Bcst_checkMACAndReboot_async(mac_addr)

Reboot device with broadcast mode with async mode.

Parameters
mac_addrstr of 6 int separated by colon.

MAC address.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Bcst_checkMACAndRing(mac_addr)

Ring the device with broadcast mode.

Parameters
mac_addrstr of 6 int separated by colon.

MAC address.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Bcst_checkMACAndRing_async(mac_addr)

Ring the device with broadcast mode with async mode.

Parameters
mac_addrstr of 6 int separated by colon.

MAC address.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Bcst_checkMACAndSetIP(ip_addr, mac_addr, gateway, subnet_mask='255.255.255.0')

Set IP with broadcast mode.

Parameters
ip_addrstr of 4 int separated by period.

IP network address.

mac_addrstr of 6 int separated by colon.

MAC address.

gatewaystr of 4 int separated by period.

Gateway address.

subnetstr of 4 int separated by period.

Subnet address.

Returns
——-
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Bcst_checkMACAndSetIP_async(ip_addr, mac_addr, gateway, subnet_mask='255.255.255.0')

Set IP with broadcast mode with async mode.

Parameters
ip_addrstr of 4 int separated by period.

IP network address.

mac_addrstr of 6 int separated by colon.

MAC address.

gatewaystr of 4 int separated by period.

Gateway address.

subnetstr of 4 int separated by period.

Subnet address.

Returns
——-
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Bcst_enumerateNetworkDevices()

Get all network device information from broadcasting.

Returns
dev_info_listlist of list of string
  • Each element of dev_info_list is a device information.

  • Device information contains IP address, subnet mask, MAC address , firmware model, serial number, device alias, application_infomation and gateway.

async Bcst_enumerateNetworkDevices_async()

Get all network device information from broadcasting with async mode.

Returns
dev_info_listlist of list of string
  • Each element of dev_info_list is a device information.

  • Device information contains IP address, subnet mask, MAC address , firmware model, serial number, device alias, application_infomation and gateway.

Bcst_enumerateUSBDevices()
close(verbose=True)

Close device finder handle.

Parameters
verbose: bool, default: True

Whether to print out messages or not.

Returns
None
connect(verbose=True)

Connect device finder to network.

Parameters
verbose: bool, default: True

Whether to print out messages or not.

Returns
None
disconnect(verbose=True)

Disonnect device finder from network.

Parameters
verbose: bool, default: True

Whether to print out messages or not.

Returns
None