PB TP-Link 3020 - Power Button Idea

Posted by 11fdriver 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
PB TP-Link 3020 - Power Button Idea
July 03, 2016 11:09AM
I am worried about simply pulling out the cord on my piratebox instead of shutting it down and instead have been using the reboot command through ssh before turning off to try and prevent corruption.
Unfortunately, this prevents the unit being portable as I would need an ssh client whenever I want to change a battery or move to a different usb port. Not to mention connecting and logging in each time is annoying.
However the TP-Link 3020 router has a small button for WPS/RESET on the front of the router and I was wondering if it would be possible to take input from this and have OpenWRT run a small shutdown script when it is held down for a short amount of time?
I am not well versed in OpenWRT and am only 16 - I have no idea how to do it myself.
On a tiny unnecessary side note, does anyone have any idea why the 3020 power cord has two USB-B male plugs? I have been wondering since I got it.
Re: PB TP-Link 3020 - Power Button Idea
July 08, 2016 09:28PM
USB with 2 male plugs: It is called a "USB Y cable". It is/was used in cases where a device would want to draw more current that possible from a single USB port and therefore wouldn't work properly. With a Y cable you can draw current from 2 separate USB ports. My MR3020 is using about 0.1 A while idle, so powering from a single USB port is fine.

Graceful shutdown:You can look at wiki.openwrt.org for some information, like procd buttons, however I have never had any issues by just pulling the plug on the router.

Ubuntuhak, playing and tinkering with Ubuntu!