ethernet-poe-config.sh
Network diagnostic script to check the Gigabit Ethernet connection and BCM54210PE port statistics.
Requires 'ethtool' and 'iproute2' tools. The interface is usually eth0 on the Xerxes Pi. PoE information depends on Broadcom firmware support; this script focuses on the Ethernet physical layer.
ethernet-poe-config.sh
#!/bin/bash
# Vérification de l'interface Ethernet BCM54210PE sur Xerxes Pi
IFACE="eth0"
echo "--- État de l'interface $IFACE ---"
ip link show $IFACE
echo -e "\n--- Statistiques Ethernet ---"
ethtool -S $IFACE | grep -E "rx_packets|tx_packets|rx_errors|tx_errors"
echo -e "\n--- Débit et Duplex ---"
sudo ethtool $IFACE
echo -e "\n--- Vérification PoE (si supportée par le driver) ---"
# Le BCM54210PE peut exposer des infos PoE via sysfs si le firmware le supporte
if [ -d /sys/class/net/$IFACE/device/eeprom ]; then
echo "EEPROM accessible."
fi
# Vérification de la vitesse négociée
SPEED=$(cat /sys/class/net/$IFACE/speed 2>/dev/null)
if [ -n "$SPEED" ]; then
echo "Vitesse négociée: ${SPEED} Mb/s"
else
echo "Impossible de lire la vitesse."
fi