Search Results: "Jonathan McDowell"

21 February 2006

Jonathan McDowell: Power corrupts

I bought a Belkin F6H500ukUNV from eBuyer (quickfind code 77131). At under £25 including P&P it seemed like a good deal and I've been meaning to get round to having a UPS to allow clean shutdown of my local machine during power problems. Belkin ship Linux and FreeBSD programs to talk to the UPS (though only over the serial interface - it has USB too). It doesn't like xterm it seems; prints Error opening terminal: xterm.. Seems fine with a terminal type of linux. It also puts all its files (config, help, binaries) in /etc/belkin. And it's binary only so I can't fix any of this brokenness. However, the lovely Network UPS Tools exists. Except Belkin have a number of UPS types, all incompatible with each other. After figuring out that I really, really needed to use the Belkin provided cable and not just a generic serial extender cable (grrrr. Why? If it's got a 9 pin D labelled RS232 why not make it a sensible port?) I got the Belkin software working and straced it to see what it did. A bit of looking at the nut source found several drivers that appeared to use the commands Belkin were sending (Q1, I & F). I tried powermust first, with the following /etc/nut/ups.conf:
[belkin]
	driver = powermust
	port = /dev/ttyM2
(I have a 4 port serial card, so /dev/ttyM2 is just a normal serial port, really.) And tada. It works. I can now get output like:
[noodles@pot ~]$ upsc belkin@localhost
battery.charge: 100.0
battery.voltage: 13.8
battery.voltage.nominal: 12.0
driver.name: powermust
driver.parameter.port: /dev/ttyM2
driver.version: 2.0.3
driver.version.internal: 1.1
input.voltage: 227.0
input.voltage.fault: 227.0
input.voltage.maximum: 234.0
input.voltage.minimum: 221.0
output.frequency: 50.0
output.voltage: 227.0
output.voltage.target.battery: 230.0
ups.delay.shutdown: 2
ups.delay.start: 3
ups.load: 0.0
ups.mfr: Mustek
ups.model: PowerMust
ups.serial: unknown
ups.status: OL
I don't know about doing shutdown yet, but ups.status correctly goes to OB (on battery) if I pull the power, which is probably the most important thing. :) At some point I'd like to move over to the USB interface; I have better things to do with my serial ports. Belkin don't appear to have done the sane USB HID power thing; instead it's some odd hid device that doesn't even have a Belkin manufacturer ID:
Bus 003 Device 015: ID 0001:0000 Fry's Electronics 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0001 Fry's Electronics
  idProduct          0x0000 
  bcdDevice            1.00
  iManufacturer           1 MEC
  iProduct                2 MEC0002
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     624
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)
The NUT energizerups driver appears to talk USB and use the Q1/F commands, so I think I'll try that later. Or it's back to usbsnoop and a Windows box I guess.

16 February 2006

Jonathan McDowell: 8 years old

Last Saturday was the annual Earthlings dinner. We get very funny looks from the restaurant staff when we explain that we're celebrating the birthday of a domain. It's a good opportunity to see lots of people I don't see often enough though; sometimes it's hard to keep in touch with people. Actually, on that subject, there are a whole bunch of people I don't keep in touch with at all well. Mostly those who don't really do email and I don't really do the phone. I probably need to ring people more often; I used to be very good at running up my parents' phone bill. It's a bit hard to know what to say to people I haven't had any contact in years with. "Er, hi, please condense your entire life since we were at school and spoke regularly into a few minutes of conversation". And no one is near Norwich, so it's not like I can easily go and have coffee/beer with them. Meh. I've started having a regular dinner with people back home at Christmas, which helps a bit. And Burly's pretty good at telling me what people are up to. So, if you know me, and feel we don't see/speak to each other enough, sorry. If you think you see too much of me then tough. :P

10 February 2006

Amaya Rodrigo: SSL for mailing list archives?

Jonathan McDowell wondered "WTF is the point of SSL mailing list archives?", and I have a very simple reason: people manage their mailing list subscriptions using a web interface. They use passwords, and we all know plain text passwords travelling through the network are evil. So I guess it's easier and KISS to have everything, including the archives, under SSL.

9 February 2006

Jonathan McDowell: WTF is the point of SSL mailing list archives?

Why are more and more mailing list archives put behind https URLs with self signed certs? What exactly are they securing? What does it achieve other than pissing people off who have to accept the cert just in order to see a mailing list post? GNUCash is the one I happened to hit today, but it seems to be a not infrequent thing.

3 February 2006

Jonathan McDowell: Friday fun with consumer routers

I'm such a funster. It's Friday night and I've spent it fighting with consumer routers in an attempt to get my home setup sorted out a bit. And I've made some progress, but it's taken a while. My old setup was an Asus WL-500g with a USB Speedtouch attached. This was running a hacked up version of Oleg's firmware, with kernel 2.4.20 (ewwwww) and the userland Speedtouch pppoa3 driver. It's been up 253 days as I type, which is quite impressive IMO. The plan was to get something else doing the same job so that I could try and get more up to date firmware on the Asus (probably OpenWRT) and give it to my parents as a wireless access point / print server. First try was my Netgear DG834G. Unfortunately the ADSL interface on it doesn't want to sync to the line for any length of time. I don't really want to faff with it at present, so I gave up on that. I do want to try and get this sorted, as it has a native ADSL interface, but the AR7Port appears to have stagnated a bit. Next was the Netgear WGT634U. I'd built an OpenWRT image for this and tried to flash it earlier in the week, but messed it up and bricked the router. So opened it up, hooked a serial console up and managed to restore it easily enough. A little bit of frobbing and I had it recognising the Speedtouch. Result. This has a 2.6.15.1 kernel, which means in kernel driver goodness and nice and up to date. Plus OpenWRT makes it easy to add various nicities like radvd and dnsmasq. I'm currently using this solution and will keep an eye on it over the weekend before reinstalling the Asus. Of course my home network has become simplified a bit by the fact I no longer factor the NTL connection into it. That's always just been a backup thing since getting ADSL from Black Cat (mmmm, IPv6 goodness) and I've decided to finally ditch it soon. However I might want to add a modem to the WGT634U at some point - probably using a USB serial dongle I guess, as I don't think the internal ports do hardware flow control. That's a battle for another day though. I also managed to get rid of a whole load of computer junk that was working but unused, thanks to Norfolk FreeCycle. Kathy will be pleased when she comes back from London tomorrow. :)

31 January 2006

Jonathan McDowell: Never underestimate the power of a good scrub

My keyboard has been getting progressively more awkward to type on, especially the A key (used extensively for screen). I had a spare, so I swapped it in today. Except it didn't feel right. My old keyboard was a Dell that's about 15 years old now; I think I picked it up for about £3 from Bull Electrical. The new one was an el cheapo eBuyer. So I decided to give the Dell another chance, and set about dismantling it. Very mucky. I shoved all the keys in the washing up bowl and dusted the rest of the mechanism as best I could. A few hours later, the keys are dry and the keyboard is back in action. I think I'll need to do some investigating of a better spare however.

29 January 2006

Jonathan McDowell: I'm becoming a wedding bore

Kathy and I went out for dinner last night at Tootsies with Becca, Dave, Eli, J, Kaz and Will. It was a good night (even if the girls beat us at Cranium), but I found myself having to stop talking about weddings - I could see J and Kaz starting to glaze over early in the evening. This a frightening event. Is this how people become baby bores? Anyway. Kathy and I managed to look at a couple of potential venues yesterday and have another one arranged for next Sunday, and a few more to ring this week to hopefully see next weekend. It's all still very scary.

25 January 2006

Jonathan McDowell: Mapping Northern Ireland

I forgot to mention that while I was home over Christmas I did some work on starting to get Northern Ireland mapped. Many online map services don't have particularly good coverage of NI outside of major roads and Belfast. Look, for example, at Google's map of Newry, where my parents live. Compare this with what I managed to get done with OpenStreetMap's map of Newry. And I didn't spend a whole lot of time getting tracks, so just imagine what I could get covered with a more concerted effort. I also covered the A1/M1 from Belfast to Newry; I'd hoped to cover the road to the point where it crosses into Ireland, but didn't get round to it. Anyway, what I've managed is at OpenStreetMap Northern Ireland. I've a little bit more to upload at some point when I have time, but I'm hoping that others who actually live in NI will start to do some work towards it as well. I notice Ireland has now got a number of roads added as well - there was nothing when I was doing NI. Maybe they'll get connected at some point soon. Like, say, when I'm home next month and fly into Dublin. :)

17 January 2006

Jonathan McDowell: Sold the Zaurus

Today I finally posted off my Zaurus SL-C3000, having sold it on eBay. I still think it's a lovely little device, but after taking it with me when I went back to my parents and not ending up using it at all (I had my laptop with me too) I decided I couldn't justify keeping it. Here's hoping the new owner gets more use out of it than I did. However I seem to be compensating by adding to my pile of consumer level routers. This week I got a Netgear WGT634U, with the intent of using it to replace my Asus WL-500g, which will end up providing my parents with wireless. I've put OpenWGT on it for the moment, because it doesn't require me to hook up the serial console, but the longer term plan is OpenWRT. I've still been fiddling with my Netgear DG834G but unfortunately latest OpenWRT AR7 builds have been less than reliable at booting for me. I've dropped back to an older build based on the 2.4.30 kernel, which seems to be fairly stable, so might end up trying it in production at some point. Wireless still isn't supported, which is a bit of a disadvantage. I understand 2.6 is being worked on for it, so maybe that'll lead to some wireless joy. In addition to the above I also have a Linksys WAG54Gv1 and a Linksys WRT54Gv1 sitting around. Neither are mine and I should really give them back as I'm not using them. I have to keep stopping myself from trying to find more cheap toys on eBay.

14 January 2006

Jonathan McDowell: No more free milk.

13 January 2006

Jonathan McDowell: I am the keymaster

Well, sort of. I've now finally signed all the keys from DebConf5. My poor little OpenPGP smartcard is toasty warm. Well, not really, but it's got quite a work out. If haven't signed your key then: Kudos to grep.be, progsoc.org, aurel32.net and linux.it, who all managed to have IPv6 MXes. Quite a low count for several hundreds mails to geeks I thought.

Jonathan McDowell: Is there a doctor in the house?

Well, no, there isn't at present, 'cos she's out and not officially a Dr until she graduates. However, Kathy had her viva yesterday and passed with only minor corrections, which she now has a month to make. W00t.

10 January 2006

Jonathan McDowell: Welcome to the suck

Matthew, I saw a poster for this today and thought of you. JD will probably welcome you when you get there.

8 January 2006

Jonathan McDowell: On previous posts.

I suppose I should really update the status of various things I've mentioned in the past. xsm: I gave up and just added the appropriate magic to my xinitrc to start my common apps. I tried fluxbox again for a while, but although it could cope with one of each app it didn't seem to do too well with half a dozen xterms. Maybe with a little effort it could, but xinitrc does the trick well enough. RSS reader: I've settled on Liferea for the moment, with my evil lj-openid-fetch script fetching LJ posts for me. Netgear DG834G: I wrote up a page of info about this, just to have something static. Unfortunately it seems that the Marvell 88E6060 switch chip used only supports port based vlans, which I think means you can split the switch up so that you can have completely separate ports, but doesn't allow the creation of a wan port on the device. This is a shame, as it means I can't use it to handle my setup unaided (I need wan, lan, wireless + adsl ports). X11 programming: I ended up using SDL, which gave me a framebuffer to play with. I suspect I could easily convert the code to run on /dev/fb0 directly, which is nice, though I should look at how to do the same with X again at some point.

7 January 2006

Jonathan McDowell: Beware my study.

Rar. Beware. I've now got the M&S USB missile launcher working under Linux. I hate libusb, it's very badly documented and seems to assume you know the USB spec inside out. Anyway, usblauncher-0.0.1.tar.gz does the appropriate magic (if crudely) and includes a basic GTK2 Perl program to control it. Ian Jeffrey has also produced some code that works in much the same way, but it's only a command line example and I couldn't see a license that allowed redistribution attached to it. It looks like he went about things in much the same way as I did though.

1 January 2006

Jonathan McDowell: Happy New Year

Not long back from Oxford where Dom had a rather good New Year's Eve party - good to see people and I'll stick photos up later today hopefully. Kim asked me what I'd remember about 2005 (her engagement was obviously her big thing) and I didn't have an answer. However I thought some more about it during the drive home and Tristam and Angharad (two of my best friends) getting married is probably my best memory of the year; I actually had to remind myself that it was only back in March - it seems like ages ago! It was a great day and lovely to see the both of them so happy (and I confess to rather enjoying my role as best man as well). Let's see what 2006 has to offer all of us...

31 December 2005

Jonathan McDowell: It's good to be back.

I finally had my first flight cancelled on me yesterday. I suppose given that I've been flying a few times a year for at least the past 8 years (even if it's only back and forth to Northern Ireland) I should consider myself lucky. I arrived at Belfast City Airport at about 8am, for a 9:45am flight (the last time I flew from Belfast we hit really bad traffic, so we ended up overcompensating). On check in I discovered it was delayed by 15 minutes. Shortly after I'd made my way through security it was delayed by 45 minutes. Then they delayed it until midday. Then at 11:30 they said they'd have an announcement at midday. And then at 11:45 they cancelled it. Now, I was flying from Belfast to Norwich. There's only one such flight a day. So I'm a bit stuck. And by the time I get to the front of the refunds queue they've filled up the flight today (Saturday), leaving me the option of a direct flight to Norwich on Sunday, or any other flight leaving Belfast City on Friday that they have seats on. So I go to London Gatwick, supposed to leave at 14:30. And it gets delayed by 45 minutes straight after I check in. Thankfully it does actually take off at 15:15 and I manage to get to England. On the wrong side of London for Norwich, but hey, the trains are running. I negotiate the Gatwick Express, get a tube to Liverpool Street and get on a train to Norwich. Which then gets delayed for 25 minutes because a train breaks down in front of it. Bah. I finally get home just after 9pm, rather than the 11:30am or so I would have managed if my initial flight had taken off on time. The house is still in one piece, the plants haven't died, I have food again. Rar. And I know this is small fry compared to American flight horror stories, or the potential problems we could have had when Uncle Steve lost our clothes en route to Brazil, but it's the first time I've had a major problem with flights. (We'll ignore the fun I had when turning on my desktop machine and seeing "GRUB Read Error" displayed. Damn scanner had decided to frob the SCSI bus enough that the BIOS could boot grub but grub couldn't then see sda.)

28 December 2005

Jonathan McDowell: Linux WMDs

So, the delightful Kathy bought me a Marks & Spencer USB Missile Launcher (unfortunately out of stock at present or I'd have linked directly to it. Try searching on eBay / Google to see what I mean.) Problem. WinXP/2k only drivers. That's no fun. Plugged it in to my laptop (as you do). dmesg reports:
input: Tenx Nonstandard Devic as /class/input/input6
input: USB HID v1.10 Device [Tenx Nonstandard Devic] on usb-0000:00:1d.1-2
input: Tenx Nonstandard Devic as /class/input/input7
input: USB HID v1.10 Device [Tenx Nonstandard Devic] on usb-0000:00:1d.1-2
lsusb says:
Bus 002 Device 004: ID 1130:0202 Tenx Technology, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1130 Tenx Technology, Inc.
  idProduct          0x0202 
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      43
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      23
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
The Windows software appears to consist of TenxHID.dll (24k) and Missile_Launcher.exe (908k). TenxHID only exports DeviceIni, ReadBuffer and WriteBuffer AFAICT. Which implies the higher level stuff is done in the exe to me. I think it's a job for USBSnoop and a Windows box, but that'll have to wait for a few days until I get back to a WinXP box I can use to fiddle. Unless someone else manages to write a driver in the meantime. :)

21 December 2005

Jonathan McDowell: It's not easy being green.

I can't believe I did this, but: You are Hulk
Hulk
70%
Spider-Man
70%
Iron Man
65%
Supergirl
60%
Catwoman
50%
Green Lantern
45%
The Flash
45%
Superman
45%
Robin
40%
Wonder Woman
35%
Batman
35%
You are a wanderer with
amazing strength.
The Hulk
Click here to take the "Which Superhero are you?" quiz...

Jonathan McDowell: Socks

When I had a real job I used to hate having to iron shirts every week. While I'll occasionally wear one when I go out it's not something I'd choose to wear to code in, so it grated that I had to expend effort in order to be able to wear something I didn't really want to. These days I'm a lazy layabout who largely works from home and I can wear what I like. However I still have to deal with socks. Now, at least I like wearing socks, but they're still a PITA. Pairing them up in particular. I think the problem is that almost all my socks are plain black and while you think that would make things easy it really doesn't. They're different shades of black for starters. Or different shapes. Or feel different. Or are lost for months and then suddenly turn up and the other half of the pair that kept annoying you out of the corner of your eye has suddenly disappeared. Gah.

Next.

Previous.