WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: hack eth LED's?  (Read 2015 times)

Offline ost

  • Newbie
  • *
  • Posts: 41
hack eth LED's?
« on: October 13, 2011, 06:20:27 AM »
I have a silent script running and Im looking desperate to find a visual feedback device to blink status/error codes.
My question is if anyone knows a way to hack the LED's of the ethernet controller, or are they are hardware wired?
Maybe by sending some dummy packets to nowhere?

I also have a SATA activity LED with no drive on that I could use if hackable.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11287
Re: hack eth LED's?
« Reply #1 on: October 13, 2011, 07:40:38 AM »
Hi ost
Instead of the NIC, how about the keyboard LEDs?
To turn on an LED
Code: [Select]
xset led NTo turn off an LED
Code: [Select]
xset -led NWhere N is as follows:
1=Numlock
2=Capslock
3=Scroll lock
This only effects the LEDs and will not toggle the actual keyboard function.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10982
Re: hack eth LED's?
« Reply #2 on: October 13, 2011, 08:51:56 AM »
You might just have some leds with kernel drivers, have you checked /sys/class/leds?

For the NIC, ethtool man page says it can blink the leds.
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11287
Re: hack eth LED's?
« Reply #3 on: October 13, 2011, 09:53:00 AM »
Hi curaga
Ost mentioned blinking out error or status codes. Ethtool, from what I could tell, does not allow you
to control the LEDs, just blink them for N number of seconds. I checked  /sys/class/leds  on two
machines, one running TC3.4 and one running TC3.8.4 and both where empty, so I didn't pursue
that any further. The  xset  command being built in seemed like the simplest approach.


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10982
Re: hack eth LED's?
« Reply #4 on: October 13, 2011, 10:26:27 AM »
Yep, as long as there's a keyboard attached and X running - I got the impression that there was no X.
The only barriers that can stop you are the ones you create yourself.

Offline ost

  • Newbie
  • *
  • Posts: 41
Re: hack eth LED's?
« Reply #5 on: October 14, 2011, 01:05:00 AM »
Thanks, this is a silent system with no display or keyboard normally attached, so all I got is the ethernet LEDs and disk activity leds on SATA and IDE/CF. There is also a LED on the usb stick..
The sys/class/led is empty here as well.

Even the speaker may not be present for beeps.

Maybe I can make some signals by controlling fan speed? :D

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11287
Re: hack eth LED's?
« Reply #6 on: October 14, 2011, 05:44:30 AM »
Hi ost
If it has a parallel port, attach an LED to that. Make sure the LED is rated for 5 volts or use a resistor
connected in series with it to limit current.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: hack eth LED's?
« Reply #7 on: October 14, 2011, 05:47:51 AM »
Hi ost
If it has a parallel port, attach an LED to that. Make sure the LED is rated for 5 volts or use a resistor
connected in series with it to limit current.

Or one of the control pins of an RS-232C serial port wich is usually on the motherboard even if not cabled to a connector.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ost

  • Newbie
  • *
  • Posts: 41
Re: hack eth LED's?
« Reply #8 on: October 17, 2011, 05:27:28 AM »
Im sorry, I dont have parallel port or serial ports. In fact I have no LPC hardware at all (not even ps2 port). And I dont relally want to add any hardware at all.. But in theory I could use some USB IO adapter I guess.
Thanks for brainstorming tho..

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11287
Re: hack eth LED's?
« Reply #9 on: October 17, 2011, 07:27:31 AM »
Hi ost
Since you keep on taking options off the table after solutions are suggested, I think your best bet
is to work out a code based on blink duration and pauses using  ethtool  and  sleep.