Problem with ETH wire connection to HikVision camera after network wake up

Hi I am using D-Link DIR-882 A1 with OpenWrt 21.02.1 r16325-88151b8303 / LuCI openwrt-21.02 branch git-21.357.58218-b3cd473. I have connected Camera HikVision systems to my router by ETH ports.

However, every time there is a power outage and the system comes back I can see that my HikVision system does not reconnect to my router. However it is not a problem with HikVision (since I tested it and it worked in the same scenario with other routers or PCs).

I see this in my logs:

Tue May 17 16:49:22 2022 kern.info kernel: [ 149.065360] mt7530 mdio-bus:1f lan4: Link is Up - 100Mbps/Full - flow control rx/tx
Tue May 17 16:49:22 2022 kern.info kernel: [ 149.080682] br-lan: port 4(lan4) entered blocking state
Tue May 17 16:49:22 2022 kern.info kernel: [ 149.091131] br-lan: port 4(lan4) entered forwarding state
Tue May 17 16:49:22 2022 daemon.notice netifd: Network device 'lan4' link is up
Tue May 17 16:49:23 2022 kern.info kernel: [ 150.089240] mt7530 mdio-bus:1f lan4: Link is Down
Tue May 17 16:49:23 2022 kern.info kernel: [ 150.098749] br-lan: port 4(lan4) entered disabled state
Tue May 17 16:49:23 2022 daemon.notice netifd: Network device 'lan4' link is down

It repeats every 10 seconds.

The only workaround is to restart the router physically or to replace eth cable from port4 to port3. Or the other way around. However this needs to be done by manual intervention.

I found some discussion about similar problem here: OpenWrt Forum Archive

However I didn't find a real solution there. The only advice which kind of helps is to have HikVision on the last eth3 or eth4 port, because in this way I will not kill the network on ports eth1, eth2. But that is just a partial solution.

Is there a workaround for this or maybe a patch?

Peter

Schematic view of the eth ports:

is the camera a PoE device ?

did you try the force_link switch mentioned in the archived thread ?

This particular Camera system is not PoE. However another one single camera is PoE (I have a separate concentrator with power) but that one is not causing any problems (it is on eth2 and on eth1 I have a TP-Link router).

force_link I didn't try, since it was mentioned in the thread itself that it does not work.

you're on a different hw platform, using a newer kernel, and a recent openwrt version, it won't hurt to try ...

1 Like

Good point. However I can't try it now. This router is physically on another continent than me :slight_smile:

So I am trying to gather some ideas before I commit myself to change something there and risk losing connectivity to my Open VPN. I need to be very careful with any changes. This is a production system supporting my business and not a sandpit environment.