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
|
@ -46,9 +46,12 @@ if [ -z "$pinnum" ]; then
|
|||
exit 1
|
||||
else
|
||||
export pin="gpio${pinnum}"
|
||||
if [ ! -d "/sys/class/gpio/$pin" ]; then
|
||||
if [ ! -d "/sys/class/gpio/${pin}" ]; then
|
||||
echo "${pinnum}" > /sys/class/gpio/export
|
||||
fi
|
||||
echo ${newval} > /sys/class/gpio/${pin}/value
|
||||
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