Table des matières

TNY-360 Documentation

Wi-Fi

Wi-Fi module of the TNY-360 API (code 0x10).

This module contains actions related to the Wi-Fi management of the robot, such as connecting to access points.


List of actions

Here's a list of all the actions available in the wifi module:

0x10 - 0x00

wifi.ConnectToAP

Connects to a Wi-Fi access point with the given SSID and password.


Arguments

  • ssidstring

    -

    The SSID of the access point to connect to.

  • passwordstring

    -

    The password of the access point to connect to.


No return values

0x10 - 0x01

wifi.DisconnectFromAP

Disconnects from the currently connected access point.


No arguments


No return values

0x10 - 0x02

wifi.HasStoredAPCredentials

Returns whether a known access point is stored in the robot's memory.


No arguments


Return Values

  • has_credentialsbool

    -

    Whether a known access point is stored in the robot's memory

0x10 - 0x03

wifi.ForgetStoredAPCredentials

Forgets the stored access point credentials in the robot's memory.


No arguments


No return values

0x10 - 0x04

wifi.StartAP

Starts the robot's access point.


No arguments


No return values

0x10 - 0x05

wifi.StopAP

Stops the robot's access point.


No arguments


No return values

0x10 - 0x06

wifi.GetState

Returns the current state of the WiFiManager, see WiFiManager::State for more details.


No arguments


Return Values

0x10 - 0x07

wifi.GetMode

Returns the current mode of the WiFiManager, see WiFiManager::Mode for more details.


No arguments


Return Values

  • modeWiFi::Mode

    -

    Current mode of the WiFiManager, deduced from the current state.

0x10 - 0x08

wifi.GetSSID

Returns the SSID of the currently connected WiFi network.


No arguments


Return Values

  • ssidstring

    -

    The SSID of the currently connected WiFi network.

0x10 - 0x09

wifi.GetIPAddr

Returns the IP address of the robot on the currently connected WiFi network.


No arguments


Return Values

  • ip_addrstring

    -

    The IP address of the robot.

0x10 - 0x0A

wifi.GetMACAddr

Returns the MAC address of the robot.


No arguments


Return Values

  • mac_addrstring

    -

    The MAC address of the robot.

0x10 - 0x0B

wifi.ScanAP

Scans for available Wi-Fi access points and returns them as a list.


No arguments


Return Values

  • nb_apsuint16

    -

    The number of access points found.

  • apsWiFi::APDescription[]

    -

    An array of WiFi::APDescription structures, each containing the SSID, RSSI, and encryption type of an access point.

List of types

Here's a list of all the types used in the wifi module:

WiFi::State

The current state of the WiFiManager.


Values

  • Initializing

    -

    The WiFiManager is initializing. Will transition to Initialized or Error state after initialization.

  • Initialized

    -

    The WiFiManager is ready to be used, no STA or AP configured.

  • Error

    -

    The WiFiManager is in an error state.

  • Connecting

    -

    The WiFiManager is attempting to connect to an AP. Will transition to Connected or ConnectFailed state after attempting to connect.

  • Connected

    -

    The WiFiManager is connected to an AP.

  • ConnectFailed

    -

    The WiFiManager failed to connect to an AP.

  • Disconnecting

    -

    The WiFiManager is disconnecting from an AP. Will transition to Initialized state after disconnecting.

  • Starting

    -

    The WiFiManager is starting an AP. Will transition to Started or StartFailed state after attempting to start.

  • Started

    -

    The WiFiManager has started an AP.

  • StartFailed

    -

    The WiFiManager failed to start an AP.

  • Stopping

    -

    The WiFiManager is stopping an AP. Will transition to Initialized state after stopping.

WiFi::Mode

The current mode of the WiFiManager, deduced from the current state.


Values

  • STA

    -

    The WiFiManager is in Station mode. connecting, connected, or disconnecting from an AP (or in failure state).

  • AP

    -

    The WiFiManager is in Access Point mode. Starting, started, or stopping his AP (or in failure state).

  • None

    -

    The WiFiManager is in an unknown mode, in case of error or uninitialized state.

WiFi::APDescription

A description of a Wi-Fi access point.


Fields

  • ssidchar[32]

    -

    The SSID of the access point.

  • rssiint8

    -

    The signal strength of the access point.

  • authmodeWiFi::APAuthMode

    -

    The authentication mode used by the access point.

WiFi::APAuthMode

The authentication mode used by a Wi-Fi access point.


Values

  • OPEN

    -

    No authentication.

  • WEP

    -

    WEP authentication.

  • WPA_PSK

    -

    WPA-PSK authentication.

  • WPA2_PSK

    -

    WPA2-PSK authentication.

  • WPA_WPA2_PSK

    -

    WPA/WPA2-PSK authentication.

  • ENTERPRISE

    -

    Enterprise authentication (WPA/WPA2-Enterprise).

  • WPA2_ENTERPRISE

    -

    WPA2-Enterprise authentication.

  • WPA3_PSK

    -

    WPA3-PSK authentication.

  • WPA2_WPA3_PSK

    -

    WPA2/WPA3-PSK authentication.

  • WAPI_PSK

    -

    WAPI-PSK authentication.

  • OWE

    -

    OWE authentication.

  • WPA3_ENT_192

    -

    WPA3-Enterprise 192-bit authentication.

  • WPA3_EXT_PSK

    -

    WPA3-PSK with external authentication.

  • WPA3_EXT_PSK_MIXED_MODE

    -

    WPA3-PSK with external authentication in mixed mode.

  • DPP

    -

    DPP authentication.

  • WPA3_ENTERPRISE

    -

    WPA3-Enterprise authentication.

  • WPA2_WPA3_ENTERPRISE

    -

    WPA2/WPA3-Enterprise authentication.