danpedron / snake-os

Automatically exported from code.google.com/p/snake-os
0 stars 1 forks source link

Drive/USB access LED #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using the NAS with a USB IDE converter

What is the expected output? What do you see instead?

Expected LED to show access, does not

What version of the product are you using? On what operating system?

Original deal extreme 652, latest firmware 

Please provide any additional information below.

Should the usb1 / usb2 led's work, I would have thought so, but the only time 
they come on is during a reset.

Does not detract from operation but I'm a flashing led freak, hate to see them 
going to waste...

Looked through the issues with the search and manually stepped through, could 
not ssee this being brought up before so wandering if i have faulty HW

Original issue reported on code.google.com by lez.brid...@googlemail.com on 23 Aug 2010 at 1:52

GoogleCodeExporter commented 9 years ago
I have the same issue, no green leds showing that something is connected to the 
USB.

Device: K330 / OS: Snake 1.2

Original comment by guiguind...@gmail.com on 26 Aug 2010 at 5:39

GoogleCodeExporter commented 9 years ago
there is a /dev/nasleds device node in the /dev/ filesystem..  does anyone know 
what to echo to it to make it do stuff?

Original comment by tuxbox.g...@gmail.com on 20 Oct 2010 at 7:14

GoogleCodeExporter commented 9 years ago
This is in source..(I have written 0->0xFF) All I have done is made the 
'System' light go off :-P no other lights change unfortunately

but does not work on my Ebay-Cheap-N-Nasty (LAN-STORAGE)

Action: 4 most significant bits:
 *  0010 = (0x2) toggle a led
 *  0011 = (0x3) turn all leds off (does not matter the 4 less significant bits)
 *  0100 = (0x4) turn all leds on (does not matter the 4 less significant bits)
 *  0101 = (0x5) turn a led on
 *  0110 = (0x6) turn a led off
 *  1010 = (0xA) start blinking a led for 10 seconds, stay on at end
 *  1011 = (0xB) start blinking a led for 20 seconds, stay on at end
 *  1100 = (0xC) start blinking a led until device shuts down
 *
 * Led number: 4 less significant bits:
 *  0000 = (0x0) led 1 (SYS)
 *  0001 = (0x1) led 2 (USB 1)
 *  0010 = (0x2) led 3 (USB 2)
 *

Original comment by tuxbox.g...@gmail.com on 20 Oct 2010 at 8:09

GoogleCodeExporter commented 9 years ago
I think /dev/nasleds need a "reset" before other command and as it is not being 
done after the SYS-LED flashing, the other LEDs couldn't be controlled... I 
don't know for sure

A ran a script testing from 0x00 to 0xFF and got nothing but the SYS-LED turned 
off

Original comment by mendelso...@gmail.com on 24 Oct 2010 at 7:29

GoogleCodeExporter commented 9 years ago
Hi mendelsongusmao, 

Looking at the source I dont see any evidence of a 'Reset'. All the commands 
look like the act directly on GPIO pins (but cant be entirely sure) Would it be 
possible that different NAS devices use other pins for LED's?  Which will be a 
reason why the pins are cleared, but not set

Richard

Original comment by tuxbox.g...@gmail.com on 24 Oct 2010 at 8:17

GoogleCodeExporter commented 9 years ago
On the LAN-SERVER 652 

Here are the PCB assignments for the LED's .. does anyone have the CPU pinouts 
so I can see what the GPIO assignments are?  (excuse my GIMP skills.. they are 
ZERO)

Original comment by tuxbox.g...@gmail.com on 28 Oct 2010 at 9:26

Attachments:

GoogleCodeExporter commented 9 years ago
Sorted.. here are the LED Codes

Telnet to Snake.. and type in -

printf "\x50" > /dev/nasleds &

replace 50 with whatever code you want to use. 0xB0 will blink the system LED 
for 5 seconds.

======================

0x50 - system LED On
0x51 - USB1 LED On
0x52 - USB2 LED On

0x60 - system LED Off
0x61 - USB1 LED Off
0x62 - USB2 LED Off

0x40 - All On
0x30 - All Off

0x20 - Toggle system LED 
0x21 - Toggle USB1 LED
0x22 - Toggle USB2 LED

0xB0 - blink system - Stop ON (5 seconds)
0xB1 - Blink USB1 - Stop ON (5 Seconds)
0xB2 - Blink USB2 - Stop ON (5 Seconds)

Original comment by tuxbox.g...@gmail.com on 20 Nov 2010 at 8:01

GoogleCodeExporter commented 9 years ago
Below is a script that needs to be added to the hotplug event..

It turns on/off the LED's based on devices plugged in to the USB

------------ Script ----------

if [ -f /sys/bus/usb/devices/1-1/product ]
then
 printf "\x51" > /dev/nasleds &
else
 printf "\x61" > /dev/nasleds &
fi

if [ -f /sys/bus/usb/devices/1-2/product ]
then
 printf "\x52" > /dev/nasleds &
else
 printf "\x62" > /dev/nasleds &
fi

Original comment by tuxbox.g...@gmail.com on 21 Nov 2010 at 7:30

GoogleCodeExporter commented 9 years ago
Where to insert this script please? What file I need to edit?

Original comment by popedu...@gmail.com on 3 Mar 2011 at 9:25

GoogleCodeExporter commented 9 years ago
Hello everybody!

I managed to have my SNAKE OS V1.3.2 (20101130) box patched with the followings:
1- USB port leds work.
2- Frees up system memory every 20 mins.
2- Checks attached USB hard disk(s)every 20 mins. and spins them down if they 
are idling.

All you need to do is:
1- Download attached etc.tar.gz file to your USB disk.
2- Change your directory to that file.
   cd /usb/<MOUNT_NAME_OF_YOUR_DISK>/
3- tar xvf etc.tar.gz -C /

Good luck!

Original comment by tezcan.f...@gmail.com on 24 Apr 2011 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If everything goes well do not forget to save your config. So that changes 
remain permanent.

Original comment by tezcan.f...@gmail.com on 24 Apr 2011 at 9:27

GoogleCodeExporter commented 9 years ago
Just wondering whether any of you who have been using the /dev/nasleds in the 
script above, or custom scripts have had problems with your devices stability 
since.
I wrote a script to turn the leds on or off based on amount of network traffic 
(at 30 second intervals). I found that almost always, within about 5-10 
minutes, the NAS device would either become unresponsive, or if it was still 
responding, the external disk was no longer functioning (ie. /dev/sda1 
/usb/sda1). In my case, I have an external 2.5 inch drive (which the ns-k330 is 
powering), and I'm wondering if turning the leds on/off is causing enough of a 
power disription to the drive, that it momentarily fails to respond, and then 
does not automatically recover. Long shot of a theory, but wondered if any 
others had similar issues?

Original comment by XMC...@gmail.com on 27 May 2011 at 8:24

GoogleCodeExporter commented 9 years ago
Hi, I bought the "Ritmo LN-86BT" (SKU 57591) and the leds stopped working when 
I installed Snake OS too.

If I perform the procedure described on comment #10, will it work?

Original comment by josefa...@gmail.com on 27 Jun 2011 at 10:28

GoogleCodeExporter commented 9 years ago
Comment 13 My K330, as corrupted 1 pendrive (died), and kill the system file in 
another MP3 used as a pendrive/swapmemory. I flashed again with the same snake, 
to rebuild cron, init.d directory....

...fijate manejalo...

Original comment by miguel.t...@gmail.com on 27 Sep 2011 at 2:45