www.beck-ipc.com
www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |
RegisterRegister   |LoginLogin

Check ethernet link/cable disconnected

Questions and discussions about the hardware of the IPC@CHIP® products SC123, SC143, SC23 and SC24.
Hi,
I am wondering if there is any way to check the ethernet link status in SC1x3 RTOS. I would like to trigger an ethernet reconfiguration in SC1x3 when a router has been rebooted or ethernet cable has been disconnected from SC1x3. Is there any callback function in the RTOS API we can use to check this kind of status of ethernet device?

We are currently using SC1x3 with DHCP and a router. Normally when the SC1x3 is rebooted, it will get a IP-address from the router and the router can show that this device is connected. But when the router is rebooted, then it cannot discover the SC1x3 anymore, this is due that SC1x3 has previously already got an IP-address so it doesn't make any new DHCP request anymore, and I need to reboot the SC1x3 as well to let it make a new DHCP request.
But when having several SC1x3 in a network, it is quite troublesome to reboot every SC1x3 device when the main router has been restarted.

My idea is to have each device reconfigure ethernet when it discovers that the ethernet link has been disconnected. Is it possible?

Thanks for any guidance or help!

/Jonas

Hello Jonas,

I am wondering if there is any way to check the ethernet link status in SC1x3 RTOS.


There certainly is. Please look into BIOS_Ethernet_State()

https://www.beck-ipc.com/api_files/scxxx/CLIB/BIOS/bios231.htm

You may use this function to check the state of the ETH0 interface (sorry, no asyc or callbacks, you will have to poll).

My idea is to have each device reconfigure ethernet when it discovers that the ethernet link has been disconnected. Is it possible?


Yes, this is possible to to via the clib API (use Dev_Config_Iface() to set the DHCP state). Please let us know if you require any further assistance.

Regards

Michail G. Etairidis
Michael G. Etairidis
Software Development
Beck IPC GmbH

Hello Michail,

Thank you for your help and guidance to look into BIOS_Ethernet_State(). It works nice for detecting the link status and I can now detect if the cable has been disconnected or router been rebooted. :-)

I am now trying a solution where I will call: Reconfigure_ethernet() to initiate a re-configuration.

Thanks once again!


Best regards,

Jonas

Return to SC1x3/SC2x


Who is online

Users browsing this forum: No registered users and 1 guest


cron