Skip to content

Instantly share code, notes, and snippets.

@dnc40085
Created July 17, 2016 02:09
Show Gist options
  • Save dnc40085/8fa8dd753e23acdd1c9ed820b4fe6b90 to your computer and use it in GitHub Desktop.
Save dnc40085/8fa8dd753e23acdd1c9ed820b4fe6b90 to your computer and use it in GitHub Desktop.
event monitor code
wifi.eventmon.register(wifi.eventmon.STA_CONNECTED, function(T)
print("\n\tSTA - CONNECTED".."\n\tSSID: "..T.SSID.."\n\tBSSID: "..
T.BSSID.."\n\tChannel: "..T.channel.."\n")
end)
wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED, function(T)
print("\n\tSTA - DISCONNECTED".."\n\tSSID: "..T.SSID.."\n\tBSSID: "..
T.BSSID.."\n\treason: "..T.reason.."\n")
end)
wifi.eventmon.register(wifi.eventmon.STA_AUTHMODE_CHANGE, function(T)
print("\n\tSTA - AUTHMODE CHANGE".."\n\told_auth_mode: "..
T.old_auth_mode.."\n\tnew_auth_mode: "..T.new_auth_mode.."\n")
end)
wifi.eventmon.register(wifi.eventmon.STA_GOT_IP, function(T)
print("\n\tSTA - GOT IP".."\n\tIP: "..T.IP.."\n\tMASK: "..
T.netmask.."\n\tGW: "..T.gateway.."\n")
end)
wifi.eventmon.register(wifi.eventmon.STA_DHCP_TIMEOUT, function(T)
print("\n\tSTA - DHCP TIMEOUT".."\n")
end)
wifi.eventmon.register(wifi.eventmon.AP_STACONNECTED, function(T)
print("\n\tAP - STATION CONNECTED".."\n\tMAC: "..T.MAC.."\n\tAID: "..T.AID.."\n")
end)
wifi.eventmon.register(wifi.eventmon.AP_STADISCONNECTED, function(T)
print("\n\tAP - STATION DISCONNECTED".."\n\tMAC: "..T.MAC.."\n\tAID: "..T.AID.."\n")
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment