6 years, 2 months ago.

re-init ethernet connection with new ip address

Dear all,

Is it possible to restart the ethernet connection with a new ip address in a program. I have done with mbed os 5 before, but i can't get it working with mbed os 2.

I am using the ethernet interface library - https://os.mbed.com/handbook/Ethernet-Interface When i want to restart the ethernet interface: - close sockets - disconnect interface - eth.init(new_ip, subnet, gateway) - eth.connect

But when i run eth.init a second time i get the error: sys_init error

Does anyone know how to solve?

Be the first to answer this question.