Saturday, July 29, 2006

Friday, July 28, 2006

grumpy and wireless

Having much more success with the WG111T now on grumpy. I attached it to the supplied cable and left it on the TV cabinet, instead of connecting straight to the PC. Transferred several hundred MB of movie files with no issues whatsoever. I get about 830kByte/s (7MBit/s) actual throughput on wlan0 when copying files via scp. Not great, but perfectly sufficient for the occasional file transfer and daily program guide updates.

Some fun with ARP and routing

grumpy has eth0 on my internal network, and wlan0 on the WG111T. My wireless LAN is a separate leg off the firewall. Originally, it was an open WLAN with its own IP space, DHCP, etc. I set this up this way so that others can use my connection if they are within reach. However, with all the multimedia equipment now on the WLAN (and the Linux drivers supporting encryption), I turned on WEP. Not perfect security, I know, not even close, but better than nothing. But I disgress...

So, when grumpy has wlan0 enabled, I can ping grumpy.wlan from the wired network iff I ifdown eth0.
Looks like either the kernel on grumpy sees the directly attached network and tries to reply to ICMP requests originating on the wired LAN via eth0, even though they were sent to wlan0 via the firewall. This happens even when the cable is disconnected, resulting in an (incomplete) ARP entry. So, in order to access grumpy from the wired LAN, eth0 needs to be ifdown when the cable is disconnected.
However, I want it up if the cable is connected. Now, how do I do that?
ifplugd to the rescue. It's very straight-forward, easy to configure. It detects when the network cable is plugged in and configures and unconfigures eth0 accordingly.
The catch?
MythTV is configured to use the IP address of eth0 for the backend server. If I unconfigure the interface, mythfrontend is getting *very* unhappy. *sigh*
Let's use for now...

After leaving grumpy running overnight in this config, wlan0 was dead _again_ this morning. rmmod ehci_hcd . Let's see if it's really the ehci module causing issues. Of course, that drops the transfer rate to a measly 230kByte/s.

grumpy has been running for two weeks with no wireless drops. So it really is the ehci_hcd kernel module giving me grief. I wonder if going to kernel 2.6.17 would help, but ah, the pain of rebuilding all the drivers for the TV cards. otoh, going to ivtv 0.6.x might fix closed captioning support. Hmmmm.

Thursday, July 27, 2006

grumpy gets a bigger hard drive

I started grumpy with a 120G drive I had laying around, figuring this will last for a while. As I quickly discovered, not so. Particularly, when I wanted to keep a few movies around. Also, the ShiftTV pieces started to eat up space quickly.

So, I finally got a whopping 300GB disk at Fry's. Special offer, 80 bucks. Not too bad. Here's how I transfered the system to the new disk:

  • partition the new disk like the old one, just bigger /opt (where I keep the movies)

  • initialize the file systems (mke2fs -j /dev/hdc1, mkfs.jfs /dev/hdc6, mkswap /dev/hdc5) and mount them under /mnt/

  • Use cpio to transfer the files from the root file system: find / -xdev -print0 | cpio -pa0V /mnt/hdc1

  • Use a plain cp to copy the video files (which cpio doesn't like due to huge file sizes): cp -av /opt/* /mnt/hdc6/

  • Install grub: grub-install --root-directory:/mnt/hdc1 /dev/hdc

ok, the latter didn't work ("/dev/hdc does not have any corresponding BIOS drive"). wtf? after searching quite a bit I ended up editing /mnt/hdc1/boot/grub/ adding

(hd1) /dev/hdc

finally, that worked. and I can boot from that drive when it is hda.

Monday, July 24, 2006

ACPI wakeup and grumpy

Going to sleep and waking up works great from MythTV. With a few gotchas:

  • if the frontend is running, the backend doesn't shut down the system.
  • echoing into /proc/acpi/alarm reliably starts the system... at midnight. The BIOS seems to completely ignore the time I set.

Once the frontend is not running, it's not trivial to bring it up again (particularly for my family). I'm running a window manager, in order to be able to use MythVideo properly. Otherwise, this would be simple (mythfrontend exits, gpm comes up again). I need a little app that just loops forever, accepts a key stroke to bring up the frontend, and when it exists, loops back.
Maybe even include some automated shut-down counter off the mythtv logs somehow. Hmmm, there's a little project to start playing with Ruby... or learn about window programming in Python.

The latter is more nasty. I guess, I have to check out nvram, or play with some wake-on-lan solution, but that would require that the wireless network connection worked properly.

But first, it's time to haul the trash from our recent kitchen remodel to the landfill.

Update (a few days later):
I suck. Had a typo in the script filename given to MythTV. sudo executed with no error, even though it couldn't find the script, so the shutdown proceeded without setting a new wakeup time. I'm still puzzled why grumpy wakes up at midnight.

video editing on Linux

I had quite some success with Cinelerra when editing my videos. So far, I always captured into MJPEG using the excellent MJPEGtools package using mencoder, video4linux and my old capture card. Now that I have this neat hardware MPEG2 encoder in my MythTV box, the whole process should become substantially less painful (at least there shouldn't be that many options to remember ... not that I remembered them, that's what scripting is for... but I disgress).

Cinelerra kinda forked into a community release. There is much more (better?) documentation linked off that site as well as the main page. Even unofficial Ubuntu packages exist now. Don't really feel like trying to compile this from svn myself. (Hmmm, maybe I should. Just for fun. No, wait... :-)

Babybaer (the most powerful computer in the house) is still on Ubuntu Hoary (and the Cinelerra packages are for Breezy and Dapper only. Time for a reinstall with Dapper. It's a good idea anyways.

Saturday, July 22, 2006

It's HOT!!!!

40C at a private weather station off Santa Teresa. We topped out at 37C on our patio. Now, at 9:00pm, it is still 33C outside. The air conditioning was running all day, getting the first floor down to "only" 29C. Franziska is a very unhappy baby today.
Upstairs it's as hot as outside, now point to open the windows and create some "Durchzug". I placed a fan over the AC duct in Pascal's room to get more cold air and some movement into that room.

Not even the pool is refreshing. Some idiot turned up the heat and the water feels almost as warm as a whirl pool. Aparently, some "old lady" complained...

Tuesday, July 18, 2006

huh? usb 4-4: USB disconnect?

Now, what is this nonsense?
The WG111T apparently disconnected from the USB bus and played dead. No reaction when trying to tickle it with unplug - re-plugin. Whoops, trying to rmmod ndiswrapper results in hung shell. Oh, and the logs have DHCPDISCOVER entries since 6am, so the software works, but there seems to be no reaction on the hardware interface.

The USB stick is near the exhaust of the fan cooling my PVR500 card. Maybe getting too hot? I put it on a cable and place it on top of the TV cabinet. No dice. The device still disconnects after a while. Strange. Maybe heat related? The device gets more than handwarm when turned on for a while.

Some people report this is an interaction with the ehci_usb USB2.0 driver and using uhci-usb works more reliably. yeah, well, and much, much slower. Grrrrrm.

"micro" earthquake

20:55: Bernhard retires to the "Stille Oertchen" with a newspaper.

20:56: Bernhard gets a good kick in the behind and the water tank behind him squeaks ominously.

20:58: No-one else in the house felt it (they sat on cushioned couches or the stairs). Bernhard looks at event nc51172604. Neat. Even links to Google Maps. Zoom in! The epicenter was about 4 miles from my house.

That's what a magnitude 2.9 feels like...

Saturday, July 15, 2006

ndiswrapper and WG111T

Follow instructions for Debian in wiki off using module-assistant.

# module-assistant auto-install ndiswrapper
# unzip

This is the 1.2 driver version off the NetGear Website, which supposedly works with ndiswrapper.

# ndiswrapper -i netwg11t.inf
# ndiswrapper -i athfmwdl.inf
# ndiswrapper -l
Installed drivers:
athfmwdl driver installed, hardware present
netwg11t driver installed
# dmesg | tail
ndiswrapper: driver netwg11t (NETGEAR,01/07/2005, loaded
wlan0: vendor: ''
wlan0: ndiswrapper ethernet device 00:14:6c:5e:76:af using driver netwg11t, 1385:4250.F.conf
wlan0: encryption modes supported: WEP; TKIP with WPA; AES/CCMP with WPA
# ndiswrapper -m
Adding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper

Hmmm, so far, so good. Let's see if this works. Continuing at

# apt-get install wireless-tools
# iwconfig
wlan0 IEEE 802.11g ESSID:"LostLostEntry"
Mode:Managed Frequency:2.437 GHz Access Point: 00:09:5B:F8:8B:26
Bit Rate:54 Mb/s
Encryption key:off
Link Quality:0/100 Signal level:-68 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
# dhclient wlan0
DHCPDISCOVER on wlan0 to port 67 interval 7
DHCPREQUEST on wlan0 to port 67
bound to -- renewal in 21600 seconds

Excellent. That was easy. Now on to configuring WEP. That will be good enough for my purposes
since the wireless network is on a separate leg off my firewall.

iwconfig wlan0 essid ...
iwconfig wlan0 enc ...

Change the AP WEP config and voila, everything working. Very nice.

I didn't expect this to be THAT easy. And I tried this only because Best Buy wouldn't take the WG111T back (over 30 days since purchase... grrr).

Thursday, July 06, 2006


randomly browsing ...

Monday, July 03, 2006

pxe booting lisa

more from the "making ancient hardware work department". Lisa is an old Compaq Deskpro, which faithfully served as my firewall machine for a few years. I want to install Debian 3.1 on that machine. Since it doesn't have a CD drive (and hooking one up resulted in a freaked out isolinux error), I try pxe booting this thing.
This system has an Intel EtherExpress with UNDI PXE-1.0, which dutifully gives me the wonderful error "No filename received". LIAR!

tcpdump -s 560 -vv not host

20:32:59.021883 IP (tos 0x0, ttl 20, id 2, offset 0, flags [none], length: 576) > BOOTP/DHCP, Request from 00:d0:b7:19:b0:5e, length: 548, xid:0xba19b05e, secs:1792, flags: [Broadcast] (0x8000)
Client Ethernet Address: 00:d0:b7:19:b0:5e
20:32:59.022502 IP (tos 0x10, ttl 16, id 0, offset 0, flags [none], length: 328) > [udp sum ok] BOOTP/DHCP, Reply, length: 300, xid:0xba19b05e, secs:1792, flags: [Broadcast] (0x8000)
Your IP:
Server IP:
Client Ethernet Address: 00:d0:b7:19:b0:5e
file "/tftpboot/pxelinux.0"

There you have it. It's right there.

After banging my head at this for a little while, I try an option suggested in the pxelinux docs:

option vendor-class-identifier "PXEClient";

Sure enough, suddenly this thing is much more cooperative in the tcpdump. It picks up the IP address, and tries to connect to sneezy:4011. I need a pxe server daemon.

cd /usr/ports/net/pxe
make install

(I love the FreeBSD ports collection...)

A while later I'm still sitting here scratching my head. The pxe daemon seems to be working and sending config data back to lisa, but nothing appears to be happening. looks like as if it doesn't understand what the daemon is talking about, or it doesn't receive the response.


ok. I give up. Where are the floppy images...