Connecting to static IP

I want to connect to a router that has a static IP assigned. I have used the example, which works when connected to a DHCP server. I have been reading the documentation and I have changed some line of the code but I cannot make it work.
Best regards.

# Init wlan module and connect to network
print("Trying to connect... (may take a while)...")
wlan = network.WINC()
wlan.connect(SSID, key=KEY, security=wlan.WPA_PSK)

Hi, I’ll test this and get back to you.

Seems our ifconfig doesn’t support static IPs. I’ll add support for this in the next release. It would be helpful if you can open an issue on github Issues · openmv/openmv · GitHub

Hi, ifconfig now supports static IPs. To set a static IP you should call ifconfig((ip, subnet, gateway, dns)) before calling connect(). This will be available in the next release, alternatively you can download the development firmware images from github:

That’s great. Thank you very much for your work. It’s amazing.