The log is actually useless:
Code: Select all
26.10.2016 00:25:04.130 Debug Log active
26.10.2016 00:46:29.661 Debug Log inactive
I have three access points. A with 2.4 and 5 GHz (with bsids <MAC_A1> and <MAC_A2>), B 2.4 GHz (with bssid <MAC_B>) and C 2.4 GHz (with bssid <MAC_C>)
My phone was connected to A. I walked to B and back. Then I enabled Llama and did that again. I got again a log like this:
Code: Select all
26.10.2016 00:51:09.581 Debug Log active
26.10.2016 00:55:37.073 Debug Log inactive
Log A says:
Code: Select all
26.10.16 00:54:00 WLAN-Gerät hat sich neu angemeldet (2,4 GHz), 72 Mbit/s, <NAME_PHONE>, IP <IP_PHONE>, MAC <MAC_PHONE>.
Log B says:
Code: Select all
26.10.16 00:52:26 WLAN-Gerät angemeldet , 72 Mbit/s, <NAME_PHONE>, IP <IP_PHONE>, MAC <MAC_PHONE>. [2 Meldungen seit 26.10.16 00:32:49]
Llama log contains:
Code: Select all
[...]
2016/10/26 00:52:25 - Events to Enqueue 0
2016/10/26 00:52:25 - IntentReceiver.onReceive
2016/10/26 00:52:25 - Service already started
2016/10/26 00:52:25 - Intent Action is android.net.wifi.supplicant.STATE_CHANGE
2016/10/26 00:52:25 WifiCond WifiCond: Wifi state is ASSOCIATED
2016/10/26 00:52:25 IntentProfile IntentProfile: android.net.wifi.supplicant.STATE_CHANGE = 6ms
2016/10/26 00:52:25 SW-RtcWakeLock SW-RtcWakeLock: RtcWakeLock wakelock not held
2016/10/26 00:52:26 - IntentReceiver.onReceive
2016/10/26 00:52:26 - Service already started
2016/10/26 00:52:26 - Intent Action is android.net.wifi.supplicant.STATE_CHANGE
2016/10/26 00:52:26 WifiCond WifiCond: Wifi state is COMPLETED
2016/10/26 00:52:26 WifiDebug WifiDebug: Handling wifi disconnect, seeing if we had a previous network
2016/10/26 00:52:26 WifiCond WifiCond: Last Wifi network was <SSID> with <MAC_A2>, running disconnect events
2016/10/26 00:52:26 EventBuffer EventBuffer: TestEvent: StateChange triggertype=16 got 2 triggerable events.
[...]
2016/10/26 00:52:26 - Events to Enqueue 0
2016/10/26 00:52:26 WifiCond WifiCond: New Wifi network is <SSID> with <MAC_B>
2016/10/26 00:52:26 EventBuffer EventBuffer: TestEvent: StateChange triggertype=15 got 2 triggerable events.
[...]
Ran actions for action with ID lo
2016/10/26 00:52:26 - Events to Enqueue 0
2016/10/26 00:52:26 IntentProfile IntentProfile: android.net.wifi.supplicant.STATE_CHANGE = 36ms
2016/10/26 00:52:26 SW-RtcWakeLock SW-RtcWakeLock: RtcWakeLock wakelock not held
2016/10/26 00:52:33 SignalStrength SignalStrength: Signal strength is -97 (8,-120,-120)
2016/10/26 00:52:33 EventBuffer EventBuffer: TestEvent: StateChange triggertype=45 got 0 triggerable events.
[...]
2016/10/26 00:54:00 - Events to Enqueue 0
2016/10/26 00:54:00 - IntentReceiver.onReceive
2016/10/26 00:54:00 - Service already started
2016/10/26 00:54:00 - Intent Action is android.net.wifi.supplicant.STATE_CHANGE
2016/10/26 00:54:00 WifiCond WifiCond: Wifi state is COMPLETED
2016/10/26 00:54:00 WifiDebug WifiDebug: Handling wifi disconnect, seeing if we had a previous network
2016/10/26 00:54:00 WifiCond WifiCond: Last Wifi network was <SSID> with <MAC_B>, running disconnect events
2016/10/26 00:54:00 EventBuffer EventBuffer: TestEvent: StateChange triggertype=16 got 2 triggerable events.
[...]
2016/10/26 00:54:00 - Events to Enqueue 0
2016/10/26 00:54:00 WifiCond WifiCond: New Wifi network is <SSID> with <MAC_A2>
2016/10/26 00:54:00 EventBuffer EventBuffer: TestEvent: StateChange triggertype=15 got 2 triggerable events.
TestEvent: Event 'Zuhause Licht aus' failed at condition com.kebab.Llama.EventConditions.WifiNetworkConnectedCondition
TestEvent: Event Zuhause Licht aus success but NO trigger condition
2016/10/26 00:54:00 - Events to Enqueue 0
2016/10/26 00:54:00 IntentProfile IntentProfile: android.net.wifi.supplicant.STATE_CHANGE = 54ms
2016/10/26 00:54:00 SW-RtcWakeLock SW-RtcWakeLock: RtcWakeLock wakelock not held
2016/10/26 00:54:01 - IntentReceiver.onReceive
2016/10/26 00:54:01 - Service already started
2016/10/26 00:54:01 - Intent Action is android.intent.action.SCREEN_OFF
2016/10/26 00:54:01 EventBuffer EventBuffer: TestEvent: StateChange triggertype=14 got 0 triggerable events.
[...]
Looks like Llama is using SUPPLICANT_STATE_CHANGED_ACTION:
https://developer.android.com/reference ... State.html .
The phone has Android 4.2.2. I tried also another device with Android 5.1.1 and get the same behaviour. One time the switch from B to A was successful. Maybe that was because there was a disconnect before the connect.
Code: Select all
25.10.2016 23:20:43.366 Received intent Intent { act=android.net.wifi.flg=0x8000010 STATE_CHANGE (has extras) } extras: networkInfo=NetworkInfo: type: WIFI[], state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: <unknown ssid>, roaming: false, failover: false, isAvailable: true, bssid=<MAC_B>, linkProperties=InterfaceName: wlan0 LinkAddresses: [<IP_PHONE>/24,] Routes: [0.0.0.0/0 -> <IP_ROUTER>,] DnsAddresses: [<IP_ROUTER>,] HttpProxy: [ProxyProperties.mHost == null]
25.10.2016 23:20:43.370 Received intent finished
25.10.2016 23:20:43.752 Received intent Intent { act=android.net.wifi.STATE_CHANGE flg=0x8000010 (has extras) } extras: networkInfo=NetworkInfo: type: WIFI[], state: CONNECTING/OBTAINING_IPADDR, reason: (unspecified), extra: "<SSID>", roaming: false, failover: false, isAvailable: true, bssid=<MAC_A2>, linkProperties=LinkAddresses: [] Routes: [] DnsAddresses: []
25.10.2016 23:20:43.753 Received intent finished
25.10.2016 23:20:44.681 Received intent Intent { act=android.net.wifi.STATE_CHANGE flg=0x8000010 (has extras) } extras: networkInfo=NetworkInfo: type: WIFI[], state: CONNECTING/VERIFYING_POOR_LINK, reason: (unspecified), extra: "<SSID>", roaming: false, failover: false, isAvailable: true, bssid=<MAC_A2>, wifiInfo=, Supplicant state: COMPLETED, RSSI: -50, Link speed: 72, Net ID: 1, Metered hint: false, mFrequency: 2412, linkProperties=InterfaceName: wlan0 LinkAddresses: [<IP_PHONE>/24,] Routes: [0.0.0.0/0 -> <IP_ROUTER>,] DnsAddresses: [<IP_ROUTER>,] HttpProxy: [ProxyProperties.mHost == null]
25.10.2016 23:20:44.683 Received intent finished
25.10.2016 23:20:44.686 Received intent Intent { act=android.net.wifi.STATE_CHANGE flg=0x8000010 (has extras) } extras: networkInfo=NetworkInfo: type: WIFI[], state: CONNECTING/CAPTIVE_PORTAL_CHECK, reason: (unspecified), extra: "<SSID>", roaming: false, failover: false, isAvailable: true, bssid=<MAC_A2>, linkProperties=InterfaceName: wlan0 LinkAddresses: [<IP_PHONE>/24,] Routes: [0.0.0.0/0 -> <IP_ROUTER>,] DnsAddresses: [<IP_ROUTER>,] HttpProxy: [ProxyProperties.mHost == null]
25.10.2016 23:20:44.693 Received intent finished
25.10.2016 23:20:44.696 Received intent Intent { act=android.net.wifi.STATE_CHANGE flg=0x8000010 (has extras) } extras: networkInfo=NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: "<SSID>", roaming: false, failover: false, isAvailable: true, bssid=<MAC_A2>, wifiInfo=, Supplicant state: COMPLETED, RSSI: -50, Link speed: 72, Net ID: 1, Metered hint: false, mFrequency: 2412, linkProperties=InterfaceName: wlan0 LinkAddresses: [<IP_PHONE>/24,] Routes: [0.0.0.0/0 -> <IP_ROUTER>,] DnsAddresses: [<IP_ROUTER>,] HttpProxy: [ProxyProperties.mHost == null]
25.10.2016 23:20:44.698 Trigger 'WLAN Verbunden: Alle SSIDs' action matches, executing flows
25.10.2016 23:20:44.781 Trigger 'WLAN Verbunden: Alle SSIDs' going to execute flows
25.10.2016 23:20:44.782 Execution context acquire
25.10.2016 23:20:44.814 [WLAN connect] Starting to execute flow 'WLAN connect' with Context{global{},local{flow_name=WLAN connect,trigger=WLAN Verbunden: Alle SSIDs,triggertime=1477430444781,bssid=<MAC_A2>,ssid=<SSID>}}
25.10.2016 23:20:44.816 [WLAN connect] Start executing condition 'Expression: trigger == "Manual"'
25.10.2016 23:20:44.824 Removed worker
25.10.2016 23:20:44.825 Queue contains 0 workerInfos
25.10.2016 23:20:44.826 Received intent finished
25.10.2016 23:20:44.839 [WLAN connect] End executing condition 'Expression: trigger == "Manual"' with return value false
25.10.2016 23:20:44.840 [WLAN connect] Flow continues executing with the next step.
25.10.2016 23:20:44.841 [WLAN connect] Start executing action 'Meldungsdialog: WLAN Connect {bssid}'
25.10.2016 23:21:38.547 [WLAN connect] End executing action 'Meldungsdialog: WLAN Connect {bssid}'
25.10.2016 23:21:38.558 [WLAN connect] Flow ended.
25.10.2016 23:21:38.559 Flows need not to be saved
}
It also works most time if I switch between A and C with FRITZ!WLAN app. Then this looks also like a disconnect and a connect.
I read
https://developer.android.com/reference ... GED_ACTION :
WIFI_STATE_CHANGED_ACTION
Added in API level 1
String WIFI_STATE_CHANGED_ACTION
Broadcast intent action indicating that Wi-Fi has been enabled, disabled, enabling, disabling, or unknown. One extra provides this state as an int. Another extra provides the previous state, if available.
As fare as I understand this will not report a change from enabled to enabled with a changed wifi connection. Maybe I am wrong. I have no experience in Android programming.