Wifi feature

command messageolympe.messages.wifi.scan(band, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Wifi.Scan

Launches wifi network scan for a given band to get a list of all wifi networks found by the drone.

Parameters:
  • band (BitfieldOf(olympe.enums.wifi.band, u8)) –
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: Event scanned_item() is triggered with all networks found.

Expectations: scanned_item(_policy='wait')

event messageolympe.messages.wifi.scanned_item(ssid=None, rssi=None, band=None, channel=None, list_flags=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Scanned_item

Wifi scan results.

Parameters:
  • ssid (string) – SSID of the AP
  • rssi (i16) – RSSI of the AP.
  • band (olympe.enums.wifi.band) –
  • channel (u8) – Channel of the AP
  • list_flags (BitfieldOf(olympe.enums.wifi.list_flags, u8)) –
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered for each wifi scanned after a scan().

command messageolympe.messages.wifi.update_authorized_channels(_timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Wifi.Update_authorized_channels

Get all available Wifi channels. The list of available Wifi channels is related to the country of the drone. You can get this country with the event [WifiCountryChanged](#wifi-CountryChanged).

Parameters:
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: Event authorized_channel() is triggered with all authorized channels.

Expectations: authorized_channel(_policy='wait')

event messageolympe.messages.wifi.authorized_channel(band=None, channel=None, environment=None, list_flags=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Authorized_channel

Available channel results.

Parameters:
  • band (olympe.enums.wifi.band) –
  • channel (u8) – The channel number
  • environment (BitfieldOf(olympe.enums.wifi.environment, u8)) –
  • list_flags (BitfieldOf(olympe.enums.wifi.list_flags, u8)) –
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered for each channels found after a update_authorized_channels().

command messageolympe.messages.wifi.set_ap_channel(type, band, channel, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Wifi.Set_ap_channel

Select channel of choosen band to put the drone’s access point on this channel.

Parameters:
  • type (olympe.enums.wifi.selection_type) –
  • band (olympe.enums.wifi.band) –
  • channel (u8) – The channel you want to select. Used only when type is manual.
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The wifi channel changes according to given parameters. Watch out, a disconnection might appear. Then, event ap_channel_changed() is triggered.

Expectations: ap_channel_changed(type=self.type, _policy='wait')

event messageolympe.messages.wifi.ap_channel_changed(type=None, band=None, channel=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Ap_channel_changed

Wifi selection changed.

Parameters:
  • type (olympe.enums.wifi.selection_type) –
  • band (olympe.enums.wifi.band) –
  • channel (u8) – The channel of the drone’s access point
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_ap_channel().

command messageolympe.messages.wifi.set_security(type, key, key_type, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Wifi.Set_security

Set the wifi security. The security is changed on the next boot.

Parameters:
  • type (olympe.enums.wifi.security_type) –
  • key (string) – The key to secure the network. Not used if type is open
  • key_type (olympe.enums.wifi.security_key_type) –
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The wifi security is set. Then, event security_changed() is triggered.

Expectations: security_changed(type=self.type, _policy='wait')

event messageolympe.messages.wifi.security_changed(type=None, key=None, key_type=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Security_changed

Wifi security changed

Parameters:
  • type (olympe.enums.wifi.security_type) –
  • key (string) – The key to secure the network. Not used if type is open
  • key_type (olympe.enums.wifi.security_key_type) –
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_security().

command messageolympe.messages.wifi.set_country(selection_mode, code, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Wifi.Set_country

Set the wifi country.

Parameters:
  • selection_mode (olympe.enums.wifi.country_selection) –
  • code (string) – Country code with ISO 3166 format. Not used if automatic is 1.
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The country of the product is changed. Then, it will trigger country_changed().

Expectations: country_changed(selection_mode=self.selection_mode, _policy='wait')

event messageolympe.messages.wifi.country_changed(selection_mode=None, code=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Country_changed

Wifi country changed.

Parameters:
  • selection_mode (olympe.enums.wifi.country_selection) –
  • code (string) – Country code with ISO 3166 format, empty string means unknown country.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_country().

command messageolympe.messages.wifi.set_environment(environment, _timeout=10, _no_expect=False, _float_tol=(1e-07, 1e-09))

Wifi.Set_environment

Set indoor or outdoor wifi settings.

Parameters:
  • environment (olympe.enums.wifi.environment) –
  • _timeout (int) – command message timeout (defaults to 10)
  • _no_expect (bool) – if True for,do not expect the usual command expectation (defaults to False)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Result: The product change its indoor/outdoor wifi settings. Then, it will trigger environment_changed(). According to the country (defined by [SetAutoCountry](#wifi-AutoCountry) or [SetCountry](#wifi-Country)) laws the drone might change its wifi band and channel. So a disconnection might appear.

Expectations: environment_changed(environment=self.environment, _policy='wait')

event messageolympe.messages.wifi.environment_changed(environment=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Environment_changed

Status of the wifi config : either indoor or outdoor.

Parameters:
  • environment (olympe.enums.wifi.environment) – 1 if it uses outdoor wifi settings, 0 otherwise
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered by set_environment().

event messageolympe.messages.wifi.rssi_changed(rssi=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Rssi_changed

Rssi Changed. This is an information about the Wifi link quality.

Parameters:
  • rssi (i16) – Rssi on the connected wifi network. Rssi values are generally between -30 and -120dBm. The nearest of 0 is the better.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered regularly when the link quality changes.

event messageolympe.messages.wifi.supported_countries(countries=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Supported_countries

List of countries supported by the drone.

Parameters:
  • countries (string) – List of country code in ISO 3166 format separated by “;”
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered when the supported countries list changed.

event messageolympe.messages.wifi.supported_security_types(types=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Wifi.Supported_security_types

List of security types supported by the drone.

Parameters:
  • types (BitfieldOf(olympe.enums.wifi.security_type, u8)) – Bitfield of supported security types.
  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)
  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered during connection and when the supported security types changes.

enumolympe.enums.wifi.band

The band : 2.4 Ghz or 5 Ghz

2_4_ghz:2.4 GHz band (0)
5_ghz:5 GHz band (1)
enumolympe.enums.wifi.selection_type

The wifi selection type available

auto_all:Auto selection on all channels (0)
auto_2_4_ghz:Auto selection 2.4ghz (1)
auto_5_ghz:Auto selection 5 ghz (2)
manual:manual selection (3)
enumolympe.enums.wifi.security_type

The type of wifi security (open, wpa2)

Enum aliases:

  • olympe.enums.ardrone3.WifiSecurityChanged_Type
  • olympe.enums.skyctrl.WifiSecurity_Security_type
  • olympe.enums.ardrone3.WifiSecurity_Type
  • olympe.enums.ardrone3.WifiSecurity_Type
  • olympe.enums.skyctrl.WifiSecurityChanged_Security_type
  • olympe.enums.wifi.security_type
open:Wifi is not protected by any security (default) (0)
wpa2:Wifi is protected by wpa2 (1)
enumolympe.enums.wifi.security_key_type

Type of the key sent

Enum aliases:

plain:Key is plain text, not encrypted (0)
enumolympe.enums.wifi.environment

Type of environment

Enum aliases:

indoor:indoor environment (0)
outdoor:outdoor environment (1)
enumolympe.enums.wifi.country_selection

Type of country selection

manual:Manual selection. (0)
auto:Automatic selection. (1)
enumolympe.enums.wifi.list_flags

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages

First: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (0)
Last: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (1)
Empty: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (2)
Remove: Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (3)