Appendices
A
start_packet_forwarder.sh
#!/bin/sh
# Toggle reset GPIO
echo "21"
> /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio21/direction
echo "0"
> /sys/class/gpio/gpio21/value
sleep 1
echo "1"
> /sys/class/gpio/gpio21/value
sleep 1
echo "0"
> /sys/class/gpio/gpio21/value
# Create symlink to spidev1@0
if [ -c "/dev/spidev0.0" ]
then
echo "spidev0.0 already exists"
else
ln -s /dev/spidev1.0 /dev/spidev0.0
fi
# start the packet-forwarder
./packet-forwarder --config pkt-fwd.yml --ignore-crc
7