iRiver H320 on Linux

I just bought two of these and decided to get them working on Linux. This is a very rough guide on how to get it running, it is not a guide on how to compile a kernel. For Debian I wrote a page on Compiling a kernel for Debian that you could use as a guide but for other systems see the Kernel Rebuild Guide
First off these are USB Mass storage devices so you need to have USB enabled properly in your kernel. The appropriate options that I had to add to my kernel config file are as follows.

# USB support
#
CONFIG_USB=y
CONFIG_USB_DEBUG=y
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_UHCI_HCD=m
# USB Device Class drivers
#
CONFIG_USB_BLUETOOTH_TTY=m
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_DEBUG=y
CONFIG_USB_STORAGE_DPCM=y
CONFIG_USB_STORAGE_JUMPSHOT=y
# USB Human Interface Devices (HID)
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT=y

For those that don’t know what the kernel config file is this is the file that is used to configure the kernel 😉 When I recompiled my kernel I used
make menuconfig
this edits the config file before you compile and install the kernel. After running “make menuconfig” then go to drivers and at the bottom you should see USB device option select this and then select the devices you have on your machine.
To see what devices are on your machine you need to enable them in your BIOS and then you can use
lspci -v | grep HCI
to have a look at what USB controller your motherboard or PCI card is using. Mine was running a VIA controller.
To get the usb to appear when you plug it in you need to have the hotplug scripts installed. On Debian this is a simple
apt-get install hotplug
and thats sorted. I also added the following to my fstab file so that I can browse the devices.
/dev/sda1 /mnt/usb vfat defaults,auto,user,sync 0 0
That was it. I now have the iRiver H320 on my machine and it looks like a 20Gb hard drive. Now to get my CD Collection converted to OGG’s.

iRiver H320

I bought two of these as Christmas presents ie one for me 😉 and one for Jenny. I am not really a gadget person but I knew I wanted plenty of storage and the H320 has 20Gb which should keep me happy.
What I didn’t know is that iRiver released an American version that has had the hardware castrated by removing USB TO GO (USBTG). This was the facility to plug another USB device into the other and copy files between them in particular cameras. From what I understand hardly any hardware was supported but it still seemed to be a daft decision. I got both the units in Manhattan so I have the American version, bollix.
For the low down on the USBTG issue visit www.misticriver.net
My initial impressions were very good, it looks sleek enough and although there are plenty of complaints about it being a bit big I like the size of it. I have also read a lot of complaints about usability and I for one am getting along fine with it. Of course, I read the instructions which some people seem to miss and assume that it should just do it the way their last one did or the same way an iPod works. It is easy to figure out an like most new bits of tech with a lot of feature it takes a wee bit of getting used to.
I plugged it into the PC and after a while (it needs some charge before it will work on the PC) I tried to write some files to it. This was a pain in the ass because the device is unable to be charged and do this stuff at the same time so I had to wait a while before I could switch data mode and move some files on.
First off it does not tell me in the manual which port I am meant to use to transfer files, I guessed data and managed to get it to work but being curious I tried to see what would happen if I plugged in the media port. On the manual the media port is meant to show up as a device the same way the data port did but it kept asking me for a driver so I can only assume there is something very wrong there since it is touted as plug and play with no need for drivers unless you are using Win98. This annoyed me because now I have a port on the unit and I have no idea what it is for.
Earphones: I have no idea why they supplied these because they are complete shit. They don’t fit and keep falling out but then they all do in my ears but what makes these crap is that as the volume goes up I start to get all sort of crap coming through them. I am assuming they are faulty because they shouldn’t sound that bad out of the box. I have tried them on several different songs using different bit rates etc and they are still crap.
Case: This is OK. Its sturdy and will save the unit from some damage but I have to ask why they blocked the view of the screen. I suppose they want you to purchase the remote control or buy a better case.
Radio: I am unable to get more than three stations and this is in the center of London so I think the radio is a bit crap as well. I will keep trying because this is one feature I really need, I like Radio 2 and Radio 4 so if I cannot get these I will be sending them back. (I know about the European setting on the radio)
Would I buy the iRiver again?
Not at UK prices, its a rip off. I also need to spend more money getting headphones which is another pain. My advice is if you can get either the HI120 or the H140 it would be money better spent. There is just too many little things that tell me that the H320 is a half arsed attempt at an update for the H100 series.
As a first impression with the company I am disappointed so will be purchasing somewhere else in future.
I am currently trying to get the H320 to work in Linux but more in that in another post.

Sys Admins uncovered

I worked with people and sometimes was the guy potrayed as Alan in the following comic and what I find amusing is how close to truth the comic comes. I am not talking just IT. It could be anyone in any Industry and thats what makes it all the more funny.
Alan the poor Bastard
Bloody brilliant!

What makes a successful blog

I came across an article of sorts detailing what makes a blog successful:

I’ve recently received a few e-mails asking for advice on creating and maintaining a successful blog. I decided to sit down and think about what I felt made a blog (or blogger) successful. It was a bit of a challenge because I’m not sure how to define success in terms of …………………………………..

I can tell you hear and now what makes a blog successful, the one true fire way to make sure that your blog becomes the next Lawrence Lessig Jihad……………………………….
Actually there is no true fire way to anything. Nothing is simple in this life, if you don’t believe me, ask me a question?
So, forget about making it popular and write about what interests you. Don’t worry about what people say, spelling mistakes or any other sort of crap because everyone is different and you could never accomodate everyone.
I don’t have a blog roll or a list of blogs I read (the two might be the same thing, I don’t know). I don’t read tabloids, peridicals, newspapers or magazines and I am not interested in slashdot, the register or any geek news portals. Neither am I interested in new fangled gadgets, latest trends or famous people so some might say I am quite boring, so what!
Things I like:
1. The BBC:
Why? I grew up with David Attenbourough. In fact the only thing we could watch on a Sunday was his nature programmes. This was quite ironic considering his take on religion etc.
I like BBC Radio 4. It has some of the funniest programs you could imagine and has been the springboard for hundreds of famous acts ie The Goons (Originally started out on BBC Home Service, became R4).
2. Music:
I love music but detest the industry.
3. Food.
I grew up hating it, then after my first 3 months in the Navy eating nothing but chocolate (food was awful at HMS Raleigh) I realised that savoury is better and have not looked back.
4. Google
Gets me what I want, when I want it and has saved me more time than anything I can think of.
5. People.
Far more interesting than some text on a monitor. People are what make the world go round not money.

Is Canada a Communist state

I came across the following article

This year in Canada exactly two provinces – Alberta and Ontario – will contribute to the federal equalization payment pool, while the other eight provinces and three territories are on the receiving end. Ontario is quickly moving towards becoming a have-not province which will leave only Alberta footing the entire federal equalization bill. According to Stats Canada, Alberta CONTRIBUTES about $3,000 per person per year. Provinces like PEI and New Brunswick RECEIVE $1776 and $1537 per person respectively. This means that a family of four living in Alberta earning $30,000 dollars a year will pay $12,000 to other p! ! rovinces; $3500 will go towards community improvements for a family of two earning $150,000 per year in PEI.

I was quite shocked to learn that certain areas in Canada are funding other less well off areas. This sounds normal ie we all pay our tax and everyone benefits but this is not what is happening. For instance, if you live in one state you pay $3000 a year which gets given to families in another state.
And what are “equalization payments”? Sounds a bit like communism to me.

Compiling a single module for the 2.6 Kernel

This is relatively straight forward. I just recently installed a new network card to play around with and to see if I can make head or tail of the driver details so I need to make sure I have the driver for the card.
I installed a NetGear F311, I had a couple of spares. The driver for this card is the natsemi driver. To see if you have the source try the following.
]$ locate natsemi
/usr/src/kernel-source-2.6.5/drivers/net/natsemi.c
/usr/src/kernel-source-2.6.5/include/config/natsemi.h
There is no need to be the root user for any of this until you need to actually install the driver, I will tell you when 😉
Copy both these files to a directory of your choice. Then, in the same directory create a Makefile with the following text:
1 obj-m := natsemi.o
2
3 KDIR := /lib/modules/$(shell uname -r)/build
4 PWD := $(shell pwd)
5
6 default:
7 $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
save it and then execute the folloing command:
]$ make
Some text should whizz past detailing what it is doing. In the directory which you ran make in there should now be several new files
natsemi.ko
natsemi.mod.c
natsemi.mod.o
natsemi.o
The one you are interested in is “natsemi.ko”. As the root user change to the directory containing the “natsemi.ko” file and run
]$ insmod natsemi.ko
If all goes well there should be no messages. To see if it loaded and to satisfy your curiosity try
]$ lsmod
natsemi 18976 0
tulip 36640 0
crc32 3840 2 natsemi,tulip
af_packet 12552 4
The above is what I have on mine
To see if the card works (Debian) edit your
/etc/network/interfaces
file and add the following. Note that I already have a card installed using eth0 so I have chosen eth1 for this card
11 iface eth1 inet static
12 address 192.168.1.10
13 netmask 255.255.255.0
Then issue the command
]$ ifup eth1
]$ ping 192.168.1.10
and you should now have the card working.

Google Talk

I received an invite the other day to a Google talk in London. For those that don’t know me I am fascinated by search engines, particularly google since there is more online about how they did their stuff than any of the others. You can imagine my enthusiasm at the prospect of going so I registered my interest and decided to go.
I then discovered that the talk has been organized by Pulse Group. From what I can gather they are the recruitment arm of Google for Ireland (wild guess). This rang recruitment company alarm bells for me, (I wrote an entire site to circumvent the need to go through a recruitment company, I don’t trust them.)
I am making bets online that it is going to be some corporate nonsense recruitment drive with more emphasis on that than on Googles tech.
I was also disappointed by the website.
1. No document type
2. It is mostly flash so a lot of people cannot see it.
3. Most of the menus are tiny and hard to read.
4. I was unable to resize the text.
5. The text is embedded in flash so it cannot be indexed by Google the people they are representing.
6. Some of the menus are mouse dependent (The mouse must hover over them to view the content)
Its another site designed by managers for managers. I suppose they have a different set of requirements than me.
Anyway I didn’t go. I would be interested in hearing from people who did go and what they thought of the talk………….
As a follow up I was correct. A friend of mine went and was quite pissed off because it was a total waste of his time.

Ticketmaster

Is everywhere.
I just ordered 4 tickets for the Reduced Shakespeare company at the Criterion Theater ( all his plays in 2 hours, bloody fantastic, an hysterical, poignant political masterpiece 😉
Every box office I phoned in the search of a show was run by tickemaster. Is it too late to buy shares?

Xterm vs Eterm

I have been using Eterm for some time now because enlightenment is my normal choice on Linux and I have never really needed anything else, however, I have noticed that on my machine at work I was getting some odd behavior when using ALT-TAB to switch between terminals so I decided to try xterm instead and I have to say I am very impressed with it.
It involves a little bit more work to set up but then most good things do. So far I have experienced no odd behavior and I think I might adopt xterm as my default terminal, it just seems more mature and competent than Eterm.
These are the setting I stared with in .Xdefaults
xterm*Background: black
xterm*Foreground: grey
xterm*VT100*geometry: 140×28+1+1
xterm*font: 9×15
xterm*scrollBar: False
xterm*JumpScroll: on
xterm*saveLines: 4096
. To load then use
shell]$ xrdb .Xdefaults