Help for change IP wio

I, I buy wio with wifi and esp32 inside board mini dev:
I would test this tutorial:

this is the screen shoot test but is fail error oserror -1:

Can we change Ip wio ? 192.168.3.127 to => 192.168.1.45 ??

this is the code:

import network
import usocket
from machine import Pin, I2C, ADC, UART, SPI, PWM
from time import sleep
 
N1 = network.WLAN_SPI(network.STA_IF)
N1.active(True)
 
print("API list:")
dir(N1)
 
print("wifi list:")
lis = N1.scan()
for q in lis:
    print(q)
 
N1.connect("SFR_3A30_GUEST","P34yN5lUuqFy8")
if N1.isconnected():
    print("    ip               gateway           netmask            MAC            ssid")
    print(N1.ifconfig())
    s=usocket.socket()
    addr=('192.168.1.44',9999)
    s.connect(addr)
    s.send('Hello! Wio RP2040')

thanks for help

Hi, from the picture you provided, the IP address set is not the same as the address of the software and is not turned on.

Thank’s for reply, Can we with code change ip fixe to ip dhcp in wio ?
I re test application serveur and now the “open” is RED (I know now muste change IP local windows 10 ).

We test to see are using the IP above the software, other IP addresses we have not tried.

thank’s a lot response, this is my vid\u00e9o to test success with ip 192.168.3.1, but I didn’t know how change IP wio to 192.168.1.44 (fore exemple) How i can do it ?
I must add middle switch to have local 192.168.3.1 for wio connecte to switch and connect to local (look at the end video …), I want to learn how change IP WIO to 192.168.1.44 instead of 192.168.3.123 witch script python,

I try this but not success

```
#LAN Communications - Seeed Wiki

import network
import usocket
from machine import Pin, I2C, ADC, UART, SPI, PWM
from time import sleep


N1 = network.WLAN_SPI(network.STA_IF)
N1.active(True)


print(“API list:”)
dir(N1)


print(“wifi list:”)
lis = N1.scan()
for q in lis:
*** print(q)***
***# ps://docs.micropython.org/en/v1.9.3/wipy/library/network.html
N1.connect(“password”,“ssid”)
if N1.isconnected():
print(" ip gateway netmask MAC ssid")
N1.ifconfig(config=(‘dhcp’)) <==== WANT DHCP to connecte my router 192.168.1.1
print(N1.ifconfig())
s=usocket.socket()
addr=(‘192.168.1.23’,9999)
s.connect(addr)
s.send(‘Hello! Wio RP2040’)

[look end video to success test only IP not dhcp](https://www.youtube.com/watch?v=nRk2UMP-Ufs)

Ok I sucess without GUI, I clean my box internet SFR and I throw this commande

pi@ohkod:~/automate/ohkod_relais/server/test $ nc -l -vv -p 9999
Listening on 0.0.0.0 9999
Connection received on espressif 62682
wio avec ohkod

that’s OK, the wio is connected DHCP without touch orignal example:

ecoute_message

import network
import usocket
from machine import Pin, I2C, ADC, UART, SPI, PWM
from time import sleep
 
N1 = network.WLAN_SPI(network.STA_IF)
N1.active(True)
print(N1.ifconfig())

print("API list:")
dir(N1)
 
print("wifi list:")
lis = N1.scan()
for q in lis:
    print(q)
 
N1.connect("name_ssid","mdpmdp...")
if N1.isconnected():
    print("    ip               gateway           netmask            MAC            ssid")
    print(N1.ifconfig())
    s=usocket.socket()
    addr=('192.168.1.46',9999)
    s.connect(addr)
    s.send("wio avec ohkod")