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

Returns the SSID of the access point.

Returns

the SSID of the access point.

Return type

String

property encryption_type

Returns the encryption type of the access point.

Returns

the encryption type of the access point.

Return type

WiFiEncryptionType

property channel

Returns the channel of the access point.

Returns

the channel of the access point.

Return type

Integer

See also

AccessPoint.set_channel()
property signal_quality

Returns the signal quality with the access point in %.

Returns

the signal quality with the access point in %.

Return type

Integer

See also

AccessPoint.__set_signal_quality()
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’)

property code

Returns the code of the WiFiEncryptionType element.

Returns

the code of the WiFiEncryptionType element.

Return type

Integer

property description

Returns the description of the WiFiEncryptionType element.

Returns

the description of the WiFiEncryptionType element.

Return type

String

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 not found.

Return type

WiFiEncryptionType