1 1
dwhacks

Orangepi One wont connect ethernet unless through switch

Recommended Posts

Well a little info, I've been using my orangepi one with an SDR dongle to track airplanes with flightradar24 for the last few months. My intentions were to use a POE adapter and run the board outside near the antenna at one point. I have now received the final parts and went to move it today. It has been running flawlessly for a month with my POE adapter off of a switch near my PC in my shop. I now plan on connecting it to the main switch on my LAN.

 

So previously my setup was: Router -> switch -> long ethernet to shop -> swtich -> orangepione

now I want to run it: Router -> switch -> long ethernet to outside -> orangepione

 

But for some reason this doesn't work, it doesn't connect to the LAN unless it is behind both switches.

After booting it says:

phy: gmac0-0:00 - link is up full/100

phy: gmac0-0:00 - link is down

 

And repeats this every couple seconds. But if I unplug the ethernet cable and add the second switch between then it connects just fine. My laptop connects fine behind either setups so it cant be the cables.

 

Any ideas? are there settings in armbian that could be giving me these issues?

Share this post


Link to post
Share on other sites

Is your cable not too long? Ethernet cable length cannot exceed 100m in total! If it's longer you need an active device in between...

Share this post


Link to post
Share on other sites

I thought it might be that at first, but it does the same thing if I use a 5" cable.

 

I have only ever used my orangepi in my shop and at first I had the 2 ethernet ports on my shop computer bridged so I could plug it into that to get internet, but then I wanted to go on vacation and wanted to turn off my computer but leave the orangepi running so I put a cheap switch there instead. Now that Im trying to run it directly from the main switch on my LAN it work connect. Every other device on my lan connects fine through this switch and I've tried different cables and different ports.

Share this post


Link to post
Share on other sites

In that case check if the cable is wired correctly. Should be straight through ...  Also check if the connector is crimped properly...

FR8YSFFF3SYTMO5.LARGE.gif

Share this post


Link to post
Share on other sites

I have tried 5 different cables, and all of them work with my laptop but not with the orangepi UNLESS there is an additional switch added between. Maybe it has something to do with my router but every other device works as it should.

Share this post


Link to post
Share on other sites

Thanks pzw, that worked. Now how to make this persistant and make sure it will always work?

Also, what does this tell us that was wrong?

Share this post


Link to post
Share on other sites

Good news :). Your switch and opi one don't negotiate the link correctly. That sometimes happens.

I think you can use the h3consumption tool to make it persistent. (I don't have access to an opi at the moment...)

Share this post


Link to post
Share on other sites

Well the only way that has worked so far is to create a script in init.d

#!/bin/sh
ETHTOOL="/sbin/ethtool"
DEV="eth0"
SPEED="100 duplex full"
AUTONEG="off"
case "$1" in
start)
echo -n "Setting eth0 speed 100 duplex full autoneg off...";
$ETHTOOL -s $DEV speed $SPEED autoneg $AUTONEG;
echo " done.";;
stop)
;;
esac
exit 0

Is there a better way to do it? I tried adding the command with pre-up or post-up to /etc/network/interfaces but that didn't work at all.

 

Thanks for all the help this far!

Share this post


Link to post
Share on other sites

Another strange thing is; using speedtest-cli I get really slow downloads (~0.33 Mbit/s) but my uploads are as expected (2-3 Mbit/s).

 

Could that be a crappy SD card even if its "saving" the file to /dev/null ?

Share this post


Link to post
Share on other sites

My OPPC+ wouldn't boot unless connected to our U-Verse router.

No boot through HP Procurve 2626 switch.
I changed the OP's port on the switch from "100fdpx" to "Auto 100" and within seconds, the OP was booting.

Kind of the opposite problem to yours but it worked.

Share this post


Link to post
Share on other sites

BTW, I am running dump1090, etc. on a RasPi.

Thinking about using my OPPC+ with two RTL dongles.

Where did you get the OP software?
Since it requires compiling, would the RasPi source work?

Thanks!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
1 1