NM.AccessPoint

g GObject.Object GObject.Object NM.Object NM.Object GObject.Object->NM.Object NM.AccessPoint NM.AccessPoint NM.Object->NM.AccessPoint

Subclasses:

None

Methods

Inherited:

NM.Object (2), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

connection_valid (connection)

filter_connections (connections)

get_bandwidth ()

get_bssid ()

get_flags ()

get_frequency ()

get_last_seen ()

get_max_bitrate ()

get_mode ()

get_rsn_flags ()

get_ssid ()

get_strength ()

get_wpa_flags ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Object (2)

Name

Type

Flags

Short Description

bandwidth

int

r

bssid

str

r

flags

NM.80211ApFlags

r

frequency

int

r

hw-address

str

r

deprecated

last-seen

int

r

max-bitrate

int

r

mode

NM.80211Mode

r

rsn-flags

NM.80211ApSecurityFlags

r

ssid

GLib.Bytes

r

strength

r

wpa-flags

NM.80211ApSecurityFlags

r

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.AccessPoint(**kwargs)
Bases:

NM.Object

Abstract:

No

Structure:

NM.AccessPointClass

connection_valid(connection)
Parameters:

connection (NM.Connection) – an NM.Connection to validate against self

Returns:

True if the connection may be activated with this Wi-Fi AP, False if it cannot be.

Return type:

bool

Validates a given connection against a given Wi-Fi access point to ensure that the connection may be activated with that AP. The connection must match the self's SSID, (if given) BSSID, and other attributes like security settings, channel, band, etc.

filter_connections(connections)
Parameters:

connections ([NM.Connection]) – an array of NM.Connections to filter

Returns:

an array of NM.Connections that could be activated with the given self. The array should be freed with g_ptr_array_unref() when it is no longer required.

WARNING: the transfer annotation for this function may not work correctly with bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305. You can filter the list yourself with NM.AccessPoint.connection_valid().

Return type:

[NM.Connection]

Filters a given array of connections for a given NM.AccessPoint object and returns connections which may be activated with the access point. Any returned connections will match the self's SSID and (if given) BSSID and other attributes like security settings, channel, etc.

To obtain the list of connections that are compatible with this access point, use NM.Client.get_connections() and then filter the returned list for a given NM.Device using NM.Device.filter_connections() and finally filter that list with this function.

get_bandwidth()
Returns:

the advertised bandwidth (MHz)

Return type:

int

Gets the bandwidth advertised by the access point in MHz.

New in version 1.46.

get_bssid()
Returns:

the BSSID of the access point. This is an internal string and must not be modified or freed.

Return type:

str

Gets the Basic Service Set ID (BSSID) of the Wi-Fi access point.

get_flags()
Returns:

the flags

Return type:

NM.80211ApFlags

Gets the flags of the access point.

get_frequency()
Returns:

the frequency in MHz

Return type:

int

Gets the frequency of the access point in MHz.

get_last_seen()
Returns:

the last seen time in seconds

Return type:

int

Returns the timestamp (in CLOCK_BOOTTIME seconds) for the last time the access point was found in scan results. A value of -1 means the access point has not been found in a scan.

New in version 1.2.

get_max_bitrate()
Returns:

the maximum bit rate (kbit/s)

Return type:

int

Gets the maximum bit rate of the access point in kbit/s.

get_mode()
Returns:

the mode

Return type:

NM.80211Mode

Gets the mode of the access point.

get_rsn_flags()
Returns:

the RSN flags

Return type:

NM.80211ApSecurityFlags

Gets the RSN (Robust Secure Network, ie WPA version 2) flags of the access point.

get_ssid()
Returns:

the GLib.Bytes containing the SSID, or None if the SSID is unknown.

Return type:

GLib.Bytes

Gets the SSID of the access point.

get_strength()
Returns:

the signal strength (0 to 100)

Return type:

int

Gets the current signal strength of the access point as a percentage.

get_wpa_flags()
Returns:

the WPA flags

Return type:

NM.80211ApSecurityFlags

Gets the WPA (version 1) flags of the access point.

Property Details

NM.AccessPoint.props.bandwidth
Name:

bandwidth

Type:

int

Default Value:

0

Flags:

READABLE

The channel bandwidth announced by the AP in MHz.

New in version 1.46.

NM.AccessPoint.props.bssid
Name:

bssid

Type:

str

Default Value:

None

Flags:

READABLE

The BSSID of the access point.

NM.AccessPoint.props.flags
Name:

flags

Type:

NM.80211ApFlags

Default Value:

NM.80211ApFlags.NONE

Flags:

READABLE

The flags of the access point.

NM.AccessPoint.props.frequency
Name:

frequency

Type:

int

Default Value:

0

Flags:

READABLE

The frequency of the access point.

NM.AccessPoint.props.hw_address
Name:

hw-address

Type:

str

Default Value:

None

Flags:

READABLE

Alias for NM.AccessPoint :bssid.

Deprecated since version 1.0: Use NM.AccessPoint :bssid.

NM.AccessPoint.props.last_seen
Name:

last-seen

Type:

int

Default Value:

-1

Flags:

READABLE

The timestamp (in CLOCK_BOOTTIME seconds) for the last time the access point was found in scan results. A value of -1 means the access point has not been found in a scan.

New in version 1.2.

NM.AccessPoint.props.max_bitrate
Name:

max-bitrate

Type:

int

Default Value:

0

Flags:

READABLE

The maximum bit rate of the access point in kbit/s.

NM.AccessPoint.props.mode
Name:

mode

Type:

NM.80211Mode

Default Value:

NM.80211Mode.UNKNOWN

Flags:

READABLE

The mode of the access point; either “infrastructure” (a central coordinator of the wireless network allowing clients to connect) or “ad-hoc” (a network with no central controller).

NM.AccessPoint.props.rsn_flags
Name:

rsn-flags

Type:

NM.80211ApSecurityFlags

Default Value:

NM.80211ApSecurityFlags.NONE

Flags:

READABLE

The RSN flags of the access point.

NM.AccessPoint.props.ssid
Name:

ssid

Type:

GLib.Bytes

Default Value:

None

Flags:

READABLE

The SSID of the access point, or None if it is not known.

NM.AccessPoint.props.strength
Name:

strength

Type:

Default Value:

0

Flags:

READABLE

The current signal strength of the access point.

NM.AccessPoint.props.wpa_flags
Name:

wpa-flags

Type:

NM.80211ApSecurityFlags

Default Value:

NM.80211ApSecurityFlags.NONE

Flags:

READABLE

The WPA flags of the access point.