digi.xbee.models.accesspoint module

class digi.xbee.models.accesspoint.AccessPoint(ssid, encryption_type, channel=0, signal_quality=0)[source]

Bases: object

This class represents an Access Point for the Wi-Fi protocol. It contains SSID, the encryption type and the link quality between the Wi-Fi module and the access point.

This class is used within the library to list the access points and connect to a specific one in the Wi-Fi protocol.

Class constructor. Instantiates a new AccessPoint object with the provided parameters.

Parameters
  • ssid (String) – the SSID of the access point.

  • encryption_type (WiFiEncryptionType) – the encryption type configured in the access point.

  • channel (Integer, optional) – operating channel of the access point. Optional.

  • signal_quality (Integer, optional) – signal quality with the access point in %. Optional.

Raises
  • ValueError – if length of ssid is 0.

  • ValueError – if channel is less than 0.

  • ValueError – if signal_quality is less than 0 or greater than 100.

property ssid

String. SSID of the access point.

property encryption_type

WiFiEncryptionType. Encryption type of the access point.

property channel

String. Channel of the access point.

property signal_quality

String. The signal quality with the access point in %.

class digi.xbee.models.accesspoint.WiFiEncryptionType(value)[source]

Bases: enum.Enum

Enumerates the different Wi-Fi encryption types.

Values:
WiFiEncryptionType.NONE = (0, ‘No security’)
WiFiEncryptionType.WPA = (1, ‘WPA (TKIP) security’)
WiFiEncryptionType.WPA2 = (2, ‘WPA2 (AES) security’)
WiFiEncryptionType.WEP = (3, ‘WEP security’)

classmethod get(code)[source]

Returns the Wi-Fi encryption type for the given code.

Parameters

code (Integer) – the code of the Wi-Fi encryption type to get.

Returns

the WiFiEncryptionType with the given code, None if there is

not any Wi-Fi encryption type with the provided code.

Return type

WiFiEncryptionType

property code

Integer. The Wi-Fi encryption type code.

property description

String. The Wi-Fi encryption type description.