FYI: POE dropped packets with surge suppressor and hack to fix

Discussion in 'Feeding' started by Jeff Lawson, Jan 26, 2021.

  1. Jeff Lawson

    Jeff Lawson New Member

    I have a freshly constructed Pi 4 ADS-B feeder powered by POE. I was getting 5-20% dropped packets from the pi with an el cheapo ethernet surge protector in line, removing the surge protector fixed the packet drop. I discovered that if the ethernet adapter is running at 100Mbit/s it works good with the surge suppressor in line. I checked my other feeder, sure enough it was doing the same thing at 1000Mbit/s (Also POE, with different surge protectors). Once again running the ethernet at 100Mbit/s fixed the packet drop.

    The solution I have implemented makes the Pi only advertise 10/100 instead of 10/100/1000 ethernet when initializing the ethernet adapter, allowing full autonegotiation at 10Mbit/s and 100Mbit/s. Instructions below for an easy fix without buying megabuck equipment. If one method doesn't work, try the other.

    Method 1
    Make a new hook script for dhcpcd
    sudo vi /lib/dhcpcd/dhcpcd-hooks/15-advertise

    Insert the following line and save: [INS] type text [ESC] [SHFT]+[:] wq [ENT]
    ethtool -s eth0 advertise 0x0f

    Method 2
    Edit the following file:
    /etc/network/if-pre-up.d/ethtool

    at the end of the file add the following line:
    $ETHTOOL --change eth0 advertise 0x0f


    Reboot the pi and it will no longer advertise 1000Mbit/s during the autonegotiation. This will help the feeder to play nice with long runs of cable/surge protectors. 100Mbit/s is way more bandwidth than necessary so you don't have to worry about a performance hit. NOTE: Do not mess around with the networking over ssh unless you can plug in a monitor and keyboard in case you kill networking. If anybody has a better way to implement this, please share!
     
    Last edited: Jan 26, 2021
  2. James

    James Guest

    Hey that's our ABS case!

    Thanks for the write up!