Ciaran McCreesh’s Blag

Now with 17% more caffeine

Posts Tagged ‘hardware’

Pakuma Choroka K1: Great Laptop Bag or the Greatest Laptop Bag?

Posted by Ciaran McCreesh on February 1, 2009

I got a Pakuma Choroka K1 for Christmas, to replace my rapidly falling apart generic backpack. I must say, I am extremely impressed.

First up, space. There’s plenty of room for a beast of a laptop, the power supply and a mouse. And a load of paper. And several large books. And a water bottle. And the shopping. And a cat or small dog. No problems there.

Next up, the organisation of said space. Lots of compartments and pockets. Possibly slightly overdoing things, but fortunately the little compartments are inside big compartments, so there’s no wasted space if you decide not to use them.

The foam-cushioned laptop compartment (supposedly using NASA-invented memory foam, and if you believe that I’ve got a bridge for sale) appears to be effective.

Then there’s the strap. My old backpack’s straps were falling off and falling apart thanks to shoddy stitching and cheap materials. No danger of this here.

The clever bits… Two stand out. First, the nifty little hole to allow headphones to go into the bag. Neat. Second, the slightly-shiny light grey inner lining. This makes it much easier to see things inside the bag.

Colour-wise, it’s inoffensive, which is all I care about.

A couple of things I’d possibly consider changing: The big cushioned laptop-holding section does waste a bit of space if there’s no laptop in the bag. Making it removable would be rather nifty, although possibly difficult to do without reducing the strength of the bag. And a small handle on the top of the bag wouldn’t go amiss either — the over-the-shoulder strap is sometimes overkill.

All in all, a rather good buy, especially if someone else is paying for it.

Posted in hardware | Tagged: , , , | 2 Comments »

xorg-x11 hackery for a Logitech RX1000 Mouse

Posted by Ciaran McCreesh on October 23, 2008

The Logitech RX1000 mouse has a scroll wheel that can tilt left or right. This generates HWHEEL events by default, which are pretty much useless. I find it more useful to have the tilt generate WHEEL events (scroll up and down), so I can press and hold left or right rather than repeatedly spinning the mouse wheel.

The wheel can also be pressed to get a middle click, but if I don’t concentrate I end up scrolling as well as middle clicking. There’s another button with a magnifying glass icon on it just below the scroll wheel which is more useful, which usually shows up as button 8. By making this button 2 we can use that for X11 paste, open-in-new-tab in Firefox and so on.

So I don’t forget how to get this working:

Section "InputDevice"
    Identifier  "Mouse1"
    Driver      "evdev"
    Option      "Name" "Logitech USB Optical Mouse"
    Option      "HWHEELRelativeAxisButtons" "4 5"
EndSection

Unfortunately, evdev doesn’t seem to have a ButtonMapping equivalent, so we have to fall back to xmodmap to do the button remapping. Doubly unfortunately, this makes pressing the middle mouse button useless.

pointer = 1 6 3 4 5 2 7 8 9 10

Thanks Nicolas.

Posted in hardware | Tagged: , , , , , | 1 Comment »

xorg-x11 keycodes for a Logitech 350 Keyboard

Posted by Ciaran McCreesh on August 2, 2008

To save myself from having to mess around with xev again in the future: here’re the keycodes for a Logitech 350 USB keyboard with xorg-x11 on Linux:

keycode 129 = XF86AudioMedia
keycode 236 = XF86Mail
keycode 178 = XF86WWW
keycode 161 = XF86Calculator
keycode 162 = XF86AudioPlay
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute

These go in ~/.Xmodmap. And in ~/.fluxbox/keys, we can use:

XF86Mail                 :ExecCommand claws-mail
XF86WWW                  :ExecCommand firefox
XF86Calculator           :ExecCommand xterm
XF86AudioPlay            :ExecCommand mpc toggle
XF86AudioLowerVolume     :ExecCommand amixer set PCM 2-
XF86AudioRaiseVolume     :ExecCommand amixer set PCM 2+
XF86AudioMute            :ExecCommand amixer set Master toggle

Posted in hardware | Tagged: , , , , , , | Leave a Comment »

Edimax EW-7728In 802.11n (RaLink rt2860) with Linux 2.6.26

Posted by Ciaran McCreesh on July 14, 2008

Being sick of wireless disconnecting every time it rained, I got my hands upon a cheap Edimax EW-7728In PCI 802.11n card. This uses a RaLink rt2860 (PDF) chip, which has vendor-supplied open source drivers available. Getting it to work with Linux 2.6.26 is slightly non-trivial, however.

First, we need the drivers. At the time of writing, that means 2008_0522_RT2860_Linux_STA_v1.6.1.0.tar.bz2.

Next, we need to fix a couple of things. First, the Makefile is dumb, and tries to install into /tftpboot:

From 82dc3a8737e4f97311f4f4fccd79ea55a319f1ea Mon Sep 17 00:00:00 2001
From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
Date: Mon, 14 Jul 2008 16:47:00 +0100
Subject: [PATCH] Get your filthy paws off my /tftpboot

---
 Makefile |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 72bc933..aed3b00 100644
--- a/Makefile
+++ b/Makefile
@@ -80,11 +80,9 @@ LINUX:
 ifneq (,$(findstring 2.4,$(LINUX_SRC)))
        cp -f os/linux/Makefile.4 $(RT28xx_DIR)/os/linux/Makefile
        make -C $(RT28xx_DIR)/os/linux/
-       cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.o /tftpboot
 else
        cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
        make  -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
-       cp -f $(RT28xx_DIR)/os/linux/rt$(CHIPSET)sta.ko /tftpboot
 endif

 clean:
--
1.5.6.2

Next, dev->nd_net should now be dev_net(dev):

From 0878b37a40e2a7f466a74938920ff3751917eec3 Mon Sep 17 00:00:00 2001
From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
Date: Mon, 14 Jul 2008 16:48:50 +0100
Subject: [PATCH] dev->nd_net is now dev_net(dev)

---
 os/linux/rt_main_dev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/os/linux/rt_main_dev.c b/os/linux/rt_main_dev.c
index 24604da..6a3471d 100644
--- a/os/linux/rt_main_dev.c
+++ b/os/linux/rt_main_dev.c
@@ -669,7 +669,7 @@ static NDIS_STATUS rt_ieee80211_if_setup(struct net_device *dev, PRTMP_ADAPTER p

 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
-        device = dev_get_by_name(dev->nd_net, slot_name);
+        device = dev_get_by_name(dev_net(dev), slot_name);
 #else
                device = dev_get_by_name(slot_name);
 #endif
--
1.5.6.2

Finally, the driver is unusably noisy. Unless you want fifty-odd lines of kernel debug informatione every five seconds:

From 19c7a6895333624566775541fbc836e0c9208225 Mon Sep 17 00:00:00 2001
From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
Date: Mon, 14 Jul 2008 16:47:43 +0100
Subject: [PATCH] You shut your dirty whore mouth

---
 include/rt_linux.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/include/rt_linux.h b/include/rt_linux.h
index dfe4ab5..079d256 100644
--- a/include/rt_linux.h
+++ b/include/rt_linux.h
@@ -325,10 +325,6 @@ extern ULONG    RTDebugLevel;

 #define DBGPRINT_RAW(Level, Fmt)    \
 {                                   \
-    if (Level <= RTDebugLevel)      \
-    {                               \
-        printk Fmt;               \
-    }                               \
 }

 #define DBGPRINT(Level, Fmt)    DBGPRINT_RAW(Level, Fmt)
--
1.5.6.2

There’s no Makefile install target, so you’ll need to sudo cp os/linux/*.ko /lib/modules/`uname -r`/kernel/ then sudo depmod -a before you can sudo modprobe rt2860sta. You’ll also need to sudo mkdir -p /etc/Wireless/RT2860STA/ then cp RT2860STA.dat /etc/Wireless/RT2860STA/, even though we’re not using that file for any configuration.

Gentoo’s init scripts, if you’re using them, try to be overly clever, and won’t be able to bring up the interface. So use something like this as your /etc/init.d/net.ra0:

#!/sbin/runscript

depend() {
    need localmount
    after bootmisc hostname net.lo net.lo0
    use isapnp isdn pcmcia usb wlan
}

start() {
    bash -x -c 'ifconfig ra0 up'
    bash -x -c 'iwconfig ra0 essid giant-space-monkey key "aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66" freq 2.417G'
    bash -x -c 'dhcpcd ra0'
}

stop() {
    :
}

restart() {
    :
}

And that appears to be sufficient.

Posted in hardware | Tagged: , , , , | 7 Comments »

Hardware Vendor Hate List

Posted by Ciaran McCreesh on July 4, 2008

  • Logitech. You helpfully claim to be able to provide replacement feet for keyboards free of charge — presumably, breakages are not exactly uncommon. Then you claim not to keep track of whether or not you have any spares for my year-old G15 keyboard, so you can’t give me any. And no, you won’t go and have a look to find out whether you do have any.
  • Whoever makes the push pins found on LGA 775 CPUs. Especially the kind that require so much force to lock that it’s a race between the motherboard and my finger to see which will break first.
  • Abit. You should be ashamed of the F-I90HD motherboard for all sorts of reasons, but today’s gripe is about the heatsink on the integrated graphics chip. I shouldn’t have to install a cooling fan onto the heatsink to stop the screen from going black when the CPU is under load.

Posted in hardware | Tagged: , , , , | 4 Comments »

Bedtime Reading

Posted by Ciaran McCreesh on May 16, 2008

Posted in c++ | Tagged: , , , , , | Leave a Comment »