"Snipe hunt" was new to me but, yes, seems the same; chasing down a non-existent problem.Well, great work @hippy ! No idea what "I think we have been chasing a Snark and it has turned out to be a Boojum." Is that similar to a snipe hunt?
My reference is to Lewis Carroll's poem, The Hunting of the Snark - An Agony, in Eight fits, where a ship's crew hunt for a Snark only to find it is something else, a Boojum - https://www.poetryfoundation.org/poems/43909/the-hunting-of-the-snark
It is as simple as doing 'ifconfig' before 'connect' -Anyway, I would love to see your finished proof of concept code.
Code:
import secretsimport networkimport timeFIXED_IP = "192.168.0.150", "255.255.255.0", "192.168.0.1", "192.168.0.1"print("Starting")wlan = network.WLAN(network.STA_IF)wlan.active(True)wlan.ifconfig(FIXED_IP)wlan.connect(secrets.SSID, secrets.PASSWORD)while wlan.status() != 3: print("Waiting for connection") time.sleep(1)print("Connected")while wlan.isconnected(): print(wlan.ifconfig()) time.sleep(1)print("Disconnected")
Unfortunately my router doesn't log DHCP requests. So I imagine I will need a 'print' within the DHCP server, find a router which does, or would have to watch with WireShark or similar. With a mod to my MicroPython source code, LwIP tells me the IP Address I end up with wasn't assigned by DHCP but that's not proof it never sent any DHCP request.I think to know if it works, just watch your DHCP server log real-time and if you don't see any discover nor requests from the Pico W then it worked!
Statistics: Posted by hippy — Sat Jan 27, 2024 12:26 pm