I have tried this before with LoRa and it didn't work. I expect the same result with Wi-Fi as the clock and other network delays are the biggest problems. To get accurate results you would need a very reliable clock, which isn't available. Also ntp servers will only let you sync up to a certain accuracy which is not good enough by far. Fingerprinting, multilateration etc. are maybe alternatives you could check out.
@livius Node should talk about each hour (or maybe less, but I don't think I'll go lower than 10 minutes) do to a keep alive and update informations or "right away" if there's a trigger trigged (alarm).
I'm pretty sure the hardware can do it, I was less sure about the MicroPython (I saw there was some limitation if we compare to the Python3).
@shariq I have the code below in main.py, which sets up the device for connecting to my router with a fixed IP, which you then can use to access the device.
WIFI_IP = "aa.bb.cc.ss"
ROUTER_IP = "aa.bb.cc.rr")
WIFI_SSID = "your AP SSID"
WIFI_PASS = "your AP Password"
wlan = network.WLAN(mode=network.WLAN.STA) # create station interface
if not wlan.isconnected(): # check if the station is connected to an AP
wlan.ifconfig(config=(WIFI_IP, "255.255.255.0", ROUTER_IP, ROUTER_IP))
wlan.connect(ssid=WIFI_SSID, auth=(network.WLAN.WPA2, WIFI_PASSWD))
for _ in range(100):
if wlan.isconnected(): # check if the station is connected to an AP
print("Connect attempt timed out\n")
print('\nnetwork config:', wlan.ifconfig())