Wireless API¶
Wireless configuration classes.
WirelessConfig¶
WirelessConfig
¶
Bases: UCISection
Wireless configuration manager.
Source code in src/wrtkit/wireless.py
WirelessRadio¶
WirelessRadio
¶
Bases: UCISection
Represents a wireless radio configuration.
Source code in src/wrtkit/wireless.py
WirelessInterface¶
WirelessInterface
¶
Bases: UCISection
Represents a wireless interface configuration.
Source code in src/wrtkit/wireless.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
with_device(value)
¶
with_mode(value)
¶
with_network(value)
¶
with_ssid(value)
¶
with_encryption(value)
¶
Set the encryption type (e.g., 'psk2', 'sae', 'none') (returns new copy).
with_key(value)
¶
with_ifname(value)
¶
with_mesh_id(value)
¶
with_mesh_fwding(value)
¶
with_mcast_rate(value)
¶
with_ieee80211r(value)
¶
with_ft_over_ds(value)
¶
with_ft_psk_generate_local(value)
¶
Enable or disable local PSK generation for FT (returns new copy).
with_ap(ssid, encryption='psk2', key=None)
¶
Configure as access point (returns new copy).
Source code in src/wrtkit/wireless.py
with_mesh(mesh_id, encryption='sae', key=None)
¶
Configure as mesh interface (returns new copy).
Source code in src/wrtkit/wireless.py
Usage Example¶
from wrtkit import UCIConfig
from wrtkit.wireless import WirelessRadio, WirelessInterface
config = UCIConfig()
# Create a radio
radio = WirelessRadio("radio0")\
.with_channel(11)\
.with_htmode("HT20")\
.with_country("US")\
.with_disabled(False)
config.wireless.add_radio(radio)
# Create an AP interface
ap = WirelessInterface("ap")\
.with_device("radio0")\
.with_ap("MyNetwork", "psk2", "password123")\
.with_network("lan")
config.wireless.add_interface(ap)