Archive for the ‘linux’ Category

OpenWRT Firebox Part 2

Friday, October 31st, 2014

I’ve started using the Firebox mentioned previously as my main device. I upgraded it to 14.07 and had to go through the installation process again, so I’ll document some of the quirks involved in getting it to work.

(more…)

Using the ThinkVantage LED on an x300

Friday, August 15th, 2014

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.

Linux iPhone Tethering over Bluetooth

Thursday, August 27th, 2009

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.

(more…)

A (Mostly) Complete OpenWRT Tutorial

Monday, August 17th, 2009

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.

(more…)

Linux iPhone Tethering scripts

Thursday, October 2nd, 2008

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.
(more…)

Tethering the iPhone in Linux

Wednesday, October 1st, 2008

Since I want to be able to use my Linux laptop on the go without paying for a “tethering plan” or paying for a separate plan, I decided to try tethering my iPhone. Doing this with network-manager is simple.

(more…)