Archive for the ‘linux’ Category
Short version: I figured out a way to control it that will actually work on modern systems. Read below to see how to get full control of it (even more control than you get from the other LEDs, including 3 different blink modes).
After googling and digging through some resources such as this thread, I had come up empty-handed, since the /proc/acpi/ibm/ecdump interface is deprecated and no longer included in the thinkpad-acpi driver. The solution: a fancy new program called “ec_access“, which uses the sysfs embedded controller interface, rather than the deprecated procfs one.
Just one problem: it’s not enabled in the kernel by default. I’ll leave you to figure out how to compile a custom kernel for your distro, but the config option that needs to be enabled is “CONFIG_ACPI_EC_DEBUGFS”. This will expose /sys/kernel/debug/ec/ec0/io, which ec_access uses. While you’re at it, you may also want to enable “CONFIG_THINKPAD_ACPI_UNSAFE_LEDS”, which will give you control over the orange and green battery LEDs.
Once you’ve got the kernel working, and can confirm that /sys/kernel/debug/ec/ is present on your system, compile ec_access.c.
Now, you should be able to run “ec_access -w 0x0c -v 0xXY”, where Y is the LED number (“d” in the case of the thinkvantage LED), and X is one of the following:
- 0-7: LED off
- 8-b: LED on solid
- C: Slow, heartbeat-like pulse
- D: Smooth, slow pulsing
- E: Faster blink
- F: LED on solid
Now, you can use this LED in scripts or whatever you need it for. Unfortunately, I haven’t taken time to look at how one would modify thinkpad-acpi to support this LED (or even why its existing tpacpi::thinkvantage LED interface doesn’t seem to work for this).
Known issue: The LED doesn’t seem to run at full brightness when it is set to solid. It is visibly brighter when put in one of the blink modes.
A while ago I wrote about how to do a wifi iPhone tether with a SOCKS proxy. Now, I’ll be writing about a Bluetooth tether on 3.0/3.0.1 with a 3G/3GS. To make this work on 3.1, you will need to enable tethering separately, which can usually be done by installing the “Internet Tethering” package in Cydia. This does NOT rely on that uit.sh script floating around, and will work on any Linux system with bluetooth. I used my Fedora 10 laptop for this.
I’ve attempted to write a complete OpenWRT setup tutorial, since many out there lack certain parts. This will cover the basics and the more advanced things you can do with OpenWRT. Read more for the tutorial.
Seeing how inconvenient the whole tethering process is, I decided to simplify it with these scripts. You will probably want to keep the SUID bit on these, or use sudo and set it up to not ask for a password for this command. Be sure to replace wlan0 with your wifi interface.