station-api.txt (7394B)
1 Station hierarchy 2 ================= 3 4 Service net.connman.iwd 5 Interface net.connman.iwd.Station 6 Object path /net/connman/iwd/{phy0,phy1,...}/{1,2,...} 7 8 Methods void Scan() 9 10 Schedule a network scan. 11 12 Possible errors: net.connman.iwd.Busy 13 net.connman.iwd.Failed 14 15 void Disconnect() 16 17 Disconnect from the network. This also disables 18 iwd from trying to autoconnect to any other network 19 with this device. 20 21 Possible errors: net.connman.iwd.Busy 22 net.connman.iwd.Failed 23 net.connman.iwd.NotConnected 24 25 array(on) GetOrderedNetworks() 26 27 Return the list of networks found in the most recent 28 scan, sorted by their user interface importance 29 score as calculated by iwd. If the device is 30 currently connected to a network, that network is 31 always first on the list, followed by any known 32 networks that have been used at least once before, 33 followed by any other known networks and any other 34 detected networks as the last group. Within these 35 groups the maximum relative signal-strength is the 36 main sorting factor. 37 38 Every record returned contains a tuple of the 39 following values. 40 41 object Object 42 43 net.connman.iwd.Network object representing 44 the network. 45 46 int16 SignalStrength 47 48 Network's maximum signal strength expressed 49 in 100 * dBm. The value is the range of 0 50 (strongest signal) to -10000 (weakest signal) 51 52 array(sns) GetHiddenAccessPoints() [experimental] 53 54 Returns a list (possibly empty) of detected hidden 55 access points. The list is sorted according to the 56 relative signal strength of each access point. 57 58 Every record returned contains a 3-tuple of the 59 following values. 60 61 string Address 62 63 Access Point's address 64 65 int16 SignalStrength 66 67 Access Point's signal strength expressed in 68 100 * dBm. The value is the range of 0 69 (strongest signal) to -10000 (weakest signal) 70 71 string Type 72 73 The type of the hidden Access Point. Same 74 values as Network.Type. 75 76 void ConnectHiddenNetwork(string ssid) 77 78 Tries to find and connect to a hidden network for the 79 first time. Only hidden networks of type 'psk' and 80 'open' are supported. WPA-Enterprise hidden networks 81 must be provisioned. 82 83 The ssid parameter is used to find the hidden network. 84 If no network with the given ssid is found, an 85 net.connman.iwd.NotFound error is returned. 86 87 In the unlikely case that both an open and pre-shared 88 key hidden network with the given ssid is found an 89 net.connman.iwd.ServiceSetOverlap error is returned. 90 91 Once the hidden network is found, the connection will 92 proceed as normal. So the user agent will be asked 93 for a passphrase, etc. 94 95 This method should only be called once to provision 96 a hidden network. For all future connections the 97 regular Network.Connect() API should be used. 98 99 Possible errors: net.connman.iwd.Busy 100 net.connman.iwd.Failed 101 net.connman.iwd.InvalidArguments 102 net.connman.iwd.NotConfigured 103 net.connman.iwd.NotConnected 104 net.connman.iwd.NotFound 105 net.connman.iwd.ServiceSetOverlap 106 net.connman.iwd.AlreadyProvisioned 107 net.connman.iwd.NotHidden 108 109 void RegisterSignalLevelAgent(object path, 110 array(int16) levels) 111 112 Register the agent object to receive signal strength 113 level change notifications on the 114 net.connman.iwd.SignalLevelAgent interface, see 115 below. The "levels" parameters decides the 116 thresholds in dBm that will generate a call to the 117 agent's Changed method whenever current RSSI crosses 118 any of the values. The values must be passed in 119 descending order. The number and distance between 120 requested threshold values is a compromise between 121 resolution and the frequency of system wakeups and 122 context-switches that are going to be occurring to 123 update the client's signal meter. Only one agent 124 can be registered at any time. 125 126 Possible Errors: [service].Error.InvalidArguments 127 [service].Error.Failed 128 [service].Error.AlreadyExists 129 [service].Error.NotSupported 130 131 void UnregisterSignalLevelAgent(object path) 132 133 Unregister an existing agent. 134 135 Possible Errors: [service].Error.InvalidArguments 136 [service].Error.NotFound 137 138 Properties string State [readonly] 139 140 Reflects the general network connection state. One of: 141 142 "connected", "disconnected", "connecting", 143 "disconnecting", "roaming" 144 145 object ConnectedNetwork [readonly, optional] 146 147 net.connman.iwd.Network object representing the 148 network the device is currently connected to or to 149 which a connection is in progress. This property 150 will be updated with the object path of the Network 151 object as soon as the connection process is initiated, 152 and will remain for as long as the connection is in 153 progress, completed and the network has not been 154 disconnected. 155 156 On disconnection this property becomes invalid and 157 disappears from the property list. Refer to the 158 State property documentation if you need to track 159 the actual state of the connection. 160 161 boolean Scanning [readonly] 162 163 Reflects whether the station is currently scanning 164 for networks. net.connman.iwd.Network objects are 165 updated when this property goes from true to false. 166 167 object ConnectedAccessPoint [readonly, optional] 168 169 net.connman.iwd.BasicServiceSet object representing the 170 BSS the device is currently connected to or to which 171 a connection is in progress. 172 173 ao Affinities [optional] [experimental] 174 175 Array of net.connman.iwd.BasicServiceSet object paths 176 that will be treated with higher affinity compared to 177 other BSS's. Currently the only allowed value to be 178 set in this array is the path to the currently connected 179 BasicServiceSet object, i.e. 180 Station.ConnectedAccessPoint. 181 182 Setting the affinity will lower the roaming threshold, 183 effectively locking IWD to the current BSS unless the 184 RSSI drops below the critical threshold set by 185 [General].CriticalRoamThreshold{5G} at which point 186 IWD will proceed with normal roaming behavior. 187 188 This property is cleared on roams/disconnections. 189 190 SignalLevelAgent hierarchy 191 ========================== 192 193 Service unique name 194 Interface net.connman.iwd.SignalLevelAgent 195 Object path freely definable 196 197 Methods void Release(object device) [noreply] 198 199 This method gets called when the service daemon 200 unregisters the agent. An agent can use it to do 201 cleanup tasks. There is no need to unregister the 202 agent, because when this method gets called it has 203 already been unregistered. 204 205 void Changed(object device, uint8 level) [noreply] 206 207 This method gets called when the signal strength 208 measurement for the device's connected network changes 209 enough to go from one level to another out of the N 210 ranges defined by the array of (N-1) threshold values 211 passed to RegisterSignalLevelAgent(). It also gets 212 called immediately after the signal level agent is 213 registered. The level parameter is in the range from 0 214 to N, 0 being the strongest signal or above the first 215 threshold value in the array, and N being the weakest 216 and below the last threshold value. For example if 217 RegisterSignalLevelAgent was called with the array [-40, 218 -50, -60], the 'level' parameter of 0 would mean signal 219 is received at -40 or more dBm and 3 would mean below 220 -60 dBm and might correspond to 1 out of 4 bars on a UI 221 signal meter.