mirror of https://github.com/aredn/aredn.git
bugfix: POE passthough fails on NS XM devices
the Nanostation XM devices require setting the gpio port direction unlike some other devices
This commit is contained in:
parent
a59fe2524a
commit
264c32a61d
|
@ -45,10 +45,13 @@ if [ -z "$pinnum" ]; then
|
|||
echo "There are NO PoE Passthrough ports defined for this device"
|
||||
exit 1
|
||||
else
|
||||
export pin="gpio${pinnum}"
|
||||
if [ ! -d "/sys/class/gpio/$pin" ]; then
|
||||
echo "${pinnum}" > /sys/class/gpio/export
|
||||
fi
|
||||
echo ${newval} > /sys/class/gpio/${pin}/value
|
||||
export pin="gpio${pinnum}"
|
||||
if [ ! -d "/sys/class/gpio/${pin}" ]; then
|
||||
echo "${pinnum}" > /sys/class/gpio/export
|
||||
fi
|
||||
if [ -e "/sys/class/gpio/${pin}/direction" ]; then
|
||||
echo "out" > /sys/class/gpio/${pin}/direction
|
||||
fi
|
||||
echo "${newval}" > /sys/class/gpio/${pin}/value
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue