From patchwork Wed Jul 5 09:28:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fff-support: Update PoE passthrough code for CPE 210 From: Adrian Schmutzler X-Patchwork-Id: 371 Message-Id: <1499246927-1663-1-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Cc: Adrian Schmutzler Date: Wed, 5 Jul 2017 11:28:47 +0200 Signed-off-by: Adrian Schmutzler --- .../ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh diff --git a/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh b/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh old mode 100644 new mode 100755 index cb3508f..7351666 --- a/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh +++ b/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh @@ -1,5 +1,7 @@ if [ "$(cat /var/sysinfo/model)" = "TP-Link CPE210 v1.1" ] ; then - echo 20 > /sys/class/gpio/export - echo out > /sys/class/gpio/gpio20/direction - echo 1 > /sys/class/gpio/gpio20/value + uci set system.gpio_switch_poe_passthrough=gpio_switch + uci set system.gpio_switch_poe_passthrough.name='PoE Passthrough' + uci set system.gpio_switch_poe_passthrough.gpio_pin='20' + uci set system.gpio_switch_poe_passthrough.value='1' + uci commit system fi