About Archive Tags RSS Feed


Entries tagged usb

Did you feel it in your knees

10 May 2009 21:50

This post is being made from my EEEEEeeee PC, using a 3G modem plugged into the USB port. The fact that I'm sat on my sofa, within easy reach of both a network cable and multiple WiFi access points is irrelevant!

I started my adventure yesterday evening, getting pretty annoyed along the way that that it wasn't just plug and go. It turns out I was suffering from two problems:

  • The USB device itself alternates between being a modem and being a dumb USB storage device (full of Windows software).
  • My copy of Network-Manager was too old.

In short from my Lenny installation I had to upgrade to Sid to get a copy of Network Manager with a "Mobile Broadband" section in its preferences. (I looked for backports, to no avail, and I didn't have the patience to make one mysefl). The new connection looks like this:


Once I added the connection discovered the USB modem device (/dev/ttyUSB0) just didn't work - and I learned about the dual-nature of the device. Thankfully switching is nice and easy "apt-get install usb-modeswitch" then:

# disable storage
usb_modeswitch -v 12d1 -p 1003 -d 1
# enable modem
usb_modeswitch -v 12d1 -p 1003 -H 1

Once that was done the connection worked almost immediately. (I just had to upgrade to a 2.6.29 kernel because I got panics on the Lenny kernel; something the upgrade installed but I'd previously ignored. Kernels: Bane of my life.)

Update: I do see some kernel weirdness talking about timeouts talking to the USB-serial device. Perhaps something to investigate in the future.

Anyway running a 3G O2 PAYG (pay as you go) modem on Debian, on an EEEPC is possible, it is justfiddlier than I had expected, and it required an upgrade to Sid - since Lenny didn't have a network manager with mobile broadband support.

For google's benefit the modem is described by O2 as a "mobile broadband USB modem - E160". This appears under lsusb as :

Bus 001 Device 005: ID 12d1:1003 Huawei Technologies Co., Ltd.
E220 HSDPA Modem / E270 HSDPA/HSUPA Modem

Hope that helps somebody else spend less than 5 hours getting it working. I guess the friends who said "It just worked" were running Ubuntu and so had a slightly newer network manager by default - and possibly their modems didn't need to toggle between "dumb storage" and "actual modem" modes.

Anyway it works now, and even though it was fiddly the issue wasn't insurmountable. I'm just a little grumpy because I've gotten used to a world in which Debian just works - the last time I struggled to get new hardware toys playing nice was .. a long time ago.

ObFilm: Pretty In Pink



And if you fail gym, you'll never get into college.

14 November 2009 21:50

Today I rebooted my desktop for the first time in a few months. This did not go well. Probably as a result of this issue with lvm/dmsetup/cryptsetup conflicting my system didn't boot, and the error message was non-helpful.

The error shown just after grub2 had started to load a system was :

Cannot find LVM volume group gold-vol

The actual cause was that I was missing the mdadm package. D'oh. My desktop has 2x500Gb drives setup as:

 sda1 + sdb1 = md1  = /boot [1Gb]
 sda2 + sdb2 = md0  = LVM storage [460Gb]

(It's only as I write this that I'm surprised that md1 + md0 are opposite to the fashion I'd have expected them to be. I guess I just created them in the "wrong" order at install time. Oops)

So without mdadm the LVM volume group on /dev/md0 couldn't be found, and that in turn meant my root filesystem couldn't be accessed at /dev/gold-vol/root.

Fixing this was a real pain. Because the system is the PXE network host on my LAN I couldn't boot it that way, and the machine has no CD-ROM drive connected.

My solution was to download and install System Rescue CD, which I placed upon a USB stick. This worked beautifully once I realised I had to boot with rescue64 to get a 64-bit kernel capable of letting me run chroot.

Oddly enough I had problems booting from USB. If I powered down my system and hit the "on" switch the system just ignored the USB stick. I noticed that my USB mouse and card reader didn't show any power lights at all - not until after grub had failed to boot the system.

So the process of booting from USB was eventually determined to be:

  • Poweroff system.
  • Power on system - wait for grub to fail to boot kernel.
  • At this point the USB mouse and card reader would be initialised in some fashion and would show their LED lights.
  • Press Ctrl-alt-delete - at which point the BIOS would allow the USB booting to occur.

Very very odd. I guess its a question of what does the "USB enabling". I'd previously assumed the BIOS would do this setup - but looking over at another system I notice that the USB mouse doesn't "come alive" until mid-way through the Linux boot process even though I know that BIOS has options for "Enabling USB mouse & keyboard". Maybe I'm missing something obvious ..?

In conclusion .. I restarted GDM for the first time in weeks and rebooted, and this was a bad idea.

ObFilm: Never Been Kissed



Happy birthday to me

10 March 2012 21:50

Recently I accidentally flooded Planet Debian with my blog feed. This was an accident caused by some of my older blog entries not having valid "Date:" headers. (I use chronicle which parses simple text files to build a blog, and if there is no Date: header present in entries it uses the CTIME of the file(s).)

So why did my CTIMEs get lost? Short version I had a drive failure and a PSU failure which lead to me rebuilding a few things and cloning a fresh copy of my blog to ~/hg/blog/.

My host is now once again OK, but during the pain the on-board sound started to die. Horribly crackly and sounding bad. I figure the PSU might have caused some collateral damage, but so far thats the only sign I see.

I disabled the on-board sound and ordered a cheap USB sound device which now provides me with perfect sound under the Squeeze release of Debian GNU/Linux.

In the past I've ranted about GNU/Linux sound. So I think it is only fair to say this time things worked perfectly - I plugged in the device, it was visible in the output of dmesg, and /proc/asound/cards and suddenly everything just worked. Playing music (mpd + sonata) worked immediately, and when I decided to try playing a movie with xine just for fun sound was mixed appropriately - such that I could hear both "song" + "movie" at the same time. Woo.

(I'm not sure if I should try using pulse-audio, or similar black magic. Right now I've just got ALSA running.)

Anyway as part of the re-deployment of my desktop I generated and pass-phrased a new SSH key, and then deployed that with my slaughter tool. My various websites all run under their own UID on my remote host, and a reverse-proxy redirects connections. So far example I have a Unix "s-stolen" user for the site stolen-souls.com, a s-tasteful user for the site tasteful.xxx, etc. (Right now I cannot remember why I gave each "webserver user" an "s-" prefix, but it made sense at the time!)

Anyway once I'd fixed up SSH keys I went on a spree of tidying up and built a bunch of meta-packages to make it a little more straightforward to re-deploy hosts in the future. I'm quite pleased with the way those turned out to be useful.

Finally I decided to do something radical. I installed the bluetile window manager, which allows you to toggle between "tiling" and "normal" modes. This is my first foray into tiling window managers, but it seems to be going well. I've got the hang of resizing via the keyboard and tweaked a couple of virtual desktops so I can work well both at home and on my work machine. (I suspect I will eventually migrate to awesome, or similar, this is very much a deliberate "ease myself into it" step.)

ObQuote: "Being Swedish, the walk from the bathroom to her room didn't need to be a modest one. " - Cashback.