Connection and programming control API test

async test.test_connect.test_get_device_by_name()[source]

Search for devices based on the suffix of the robot serial number

To search for the robot with the specified serial number (behind the robot’s butt), you can enter only the tail characters of the serial number, any length, it is recommended that more than 5 characters can be matched accurately, and a timeout of 10 seconds

Returns

Contains information such as robot name, ip, port, etc.

Return type

WiFiDevice

async test.test_connect.test_get_device_list()[source]

Search all devices

Search all devices, return results after 10s

Returns

All searched devices, WiFiDevice array

Return type

[WiFiDevice]

async test.test_connect.test_connect(dev: mini.dns.dns_browser.WiFiDevice) bool[source]

Connect the device

Connect the specified device

Parameters

dev (WiFiDevice) – The specified device object WiFiDevice

Returns

Whether the connection is successful

Return type

bool

async test.test_connect.test_start_run_program()[source]

Enter programming mode demo

Make the robot enter the programming mode, wait for the reply result, and delay 6 seconds, let the robot finish “Enter programming mode”

Returns

Return type

None

async test.test_connect.shutdown()[source]

Disconnect and release resources

Disconnect the currently connected device and release resources

async test.test_connect.main()[source]