Page 1 of 1

Cut power feed to front usb-port on a specific time?

PostPosted: Thu Oct 29, 2015 11:16 am
by batter
Hi!

Is it possible to cut down the power feed to front usb port when NAS enters in WOL-sleepmode? I have an external USB-powered fan mounted on the casing to cool the HDD. The problem is that the fan stays on when NAS enters in WOL-state during nights (noisy, consumes power, collects dust etc.). Is there a special cronjob command or is it possible to make a patch that cuts the power feed to USB-port on a specific time? Also when the NAS recovers back to online-state from WOL, the fan should also start spinning automaticly.

Re: Cut power feed to front usb-port on a specific time?

PostPosted: Thu Oct 29, 2015 8:32 pm
by fvdw
unfortunate the usb power is not controlled via a gpio pin. So I don't see possibilities to cut power via that way (setting gpio pin).
Need to investigate if there are other possibilities.

ps smart idea to connect a fan to the usb port.

If you are in for some experiments
There is a gpio pin on this board for "fan power" the question where to connect the fan on this board
It maybe these three pins...(but I never tried it myself)
possible fan connector nwsp2.JPG

There are standard connectors for fans (three wires) that I think fit on that location

In the kernel setup provisions are taken to control power on/off for the fan with gpio pin 23
It can be controlled via userland like
Export the gpio pin to userland (in putty at linux prompt give this command)
Code: Select all
echo 23 > /sys/class/gpio/export

set direction
Code: Select all
echo out > /sys/class/gpio/gpio23/direction

power on
Code: Select all
echo 1 > /sys/class/gpio/gpio23/value

power off
Code: Select all
echo 0 > /sys/class/gpio/gpio23/value

If that works the feature that you want can be implemented easily, by powering up the fan at end of boot script

Re: Cut power feed to front usb-port on a specific time?

PostPosted: Thu Dec 10, 2015 12:45 pm
by Acquarious81
fvdw wrote:If you are in for some experiments
There is a gpio pin on this board for "fan power" the question where to connect the fan on this board
It maybe these three pins...(but I never tried it myself)

In the kernel setup provisions are taken to control power on/off for the fan with gpio pin 23



can i ask where you have read the number 23 for gpio for fan?.. i want to read that file.. thx

Re: Cut power feed to front usb-port on a specific time?

PostPosted: Thu Dec 10, 2015 6:44 pm
by Jocko
Please to read with more attention the topic all is already detailed how to read gpio values...