Problem with duplex mismatch on Octopi

Hello all,

Here is problem. I use OctoPi with the newest release and i noticed very unusual behavior. When i set up my switch to 100Mbps Full duplex all devices, using auto sens connect with 100 Full duplex. Only OctoPi set up automatically 100Mbps Half duplex.

I need to use sudo -i to use commend mii-tool eth0 -F 100baseTx-FD to force interface to use correct speed and duplex. Then all problems with slow camera, access to Pi vanish. Also issue is that sometimes when i rebooting OctoPi it set back from manual mode to auto-negotiation and problems starts again.

Is it any way to write such a settings for good? and switch off auto-negotiation for good? I have manageable switch - Netgear GS724Tv4 and many devices connected to it. I verify settings but auto-sens and auto-negotiation are basic functions and i can't change too much. I set up on switch 100Mbps Full-duplex, but Raspberry still likes to set up half-duplex. Funny fact - on switch i get information that device on the second end is Full duplex but on RPi i have information about Half Duplex. I check whole switch (change STP, flow control, EEE mode etc.) and i'm pretty sure that problem is in the Octopi or Raspberry network settings or maybe even in NIC firmware.

Worth to mention. I check cables (cat 6), connect directly to switch and same situation happens on 100mbit and 10 mbit.

I use Raspberry PI 3 B+

Any ideas what to do, because it's serious problem

You can try throwing the mii-tool command in /etc/rc.local or editing one of the network configs manually. But I should also mention, that I work with Linux systems and Cisco gear, and I have always noticed that Linux in general never liked when the switch was hard set to a duplex and speed. Usually when hard set, it has to be hard set on both sides. Is there a reason you are not setting the switch to auto negotiate? That will probably fix your problem.

Hi,

you should not have to force any side to a specific setting, switch and R-Pi should auto negotiate. If however you force one side, for example the switch to 100-FD you have to force the other end as well. In some cases it might work without but that's just luck. You could put the ethtool command in a little executable shell script and place that in one of the following folders.

/etc/network/if-pre-up.d

or

/etc/network/if-up.d

I am not sure which one would work but that would be my approach to this if I was unable to make both ends auto-negotiate.

Regards
Jan P.

Problem is that i need to set up in this cord 100Mbps even if i have 1Gbps switch. Don't ask...

that's i said about duplex missmatch. Switch working ok, but raspberry like a maniac during booting changing 100Base-TX from Full duplex to half duplex. no reason why. On the begging i was thinking that maybe i need to save or write config like on the Cisco or any other CLI switches, but not.

IMHO if i set now option for full duplex it should stay that way otherwise we will face duplex missmatch.

Unfortunately I'm not as good in Unix an Linux based systems (lazy M$ user) i don't have any knowledge of writing scripts. Still i believe it's a bug in system that it changing speed by itself even if auto negotiation is off, and i use manual mode.

Can someone can help me to write a script for automatically changing/checking this setting on startup? What a shape that WiFi has configuration, *txt file which You can edit but wired connection don't. It will solve problem immediately.

It is not a bug that the R-Pi running a Linux does auto-negotiation, its the default behaviour. Since you need it to do something that is not default you have to tell it to. Further up a good suggestion was made, just add your mii-tool command line to /etc/rc.local and see if that works. you should be able to edit that with nano or vi what ever editor you like on the command line.

sudo nano /etc/rc.local

after reboot and check if it worked. There are x ways of doing this and many locations where such config could go. rc.local or the network config would be the most obvious locations I guess.

Jan P.

It works. Sorry wrong click.