Proper way to change an IP address (W5500)
IO Modules
No replies yet. Be the first to reply.
Join the discussion.
IO Modules
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Proper way to change an IP address (W5500)
by TheoIm WIZnet ·
Hi,
Changing the IP address on the W5500 without rebooting may require more than simply calling
wizchip_setnetinfo(). A recommended sequence is to properly close all active sockets, wait until each socket reaches theSOCK_CLOSEDstate, apply the new network configuration usingwizchip_setnetinfo(), and then reinitialize your server sockets.If you are reopening a socket, do not immediately call
socket(). First, verify that the previous socket has actually transitioned to theSOCK_CLOSEDstate by checkinggetSn_SR().WIZnet provides reference projects based on the RP2040 and RP2350 MCUs. Although these examples target Raspberry Pi MCUs, the initialization sequence and application flow are generally applicable to other platforms as well. I recommend referring to these projects to see how the network initialization and server startup sequence are implemented.
https://github.com/WIZnet-ioNIC/WIZnet-PICO-C/tree/main/examples
Thanks