Search This Blog

Thursday, 28 July 2011

Getting a Nexus S to connect to a PC running Windows XP

In an effort to prevent anyone else going through the misery and frustration I've just experienced, I will now document the steps I had to go through to get my Nexus S to talk to my PC.

Obviously I'm not talking about seeing the phone's file system as an external drive; I mean having the phone show up in the Device Manager so that you can try your hand at developing on it. Sparing you all the false starts and dead ends that I went through, and assuming you've already installed the Android SDK and have a USB cable that fits into the phone, proceed as follows:
  1. Start up the Android SDK Manager.
  2. See if 'Google USB Driver Package' is listed under Installed Packages.
  3. If it isn't, it should be under Available Packages. Select it and click the Install Selected button
  4. Enable debugging on the phone in Settings/Applications/Development.
  5. Disconnect the phone's USB cable, then reconnect it.
  6. The PC should report having found a new device, and bring up a wizard to ask you whether you want to install a driver. Cancel out of this wizard.
  7. Go into Device Manager (right click My Computer and select Manage), and find the phone under 'Unknown devices'. Right click on it and select Properties/Details. Note the two four-digit numbers after VID_ and PID_.
  8. Open the file C:\Program Files\Android\android-sdk\extras\google\usb_driver\android_winusb.inf for editing.
  9. Add in an entry for the Nexus S, using the VID and PID revealed from the device manager. It should look like this:
    ; Google Nexus S
    %SingleAdbInterface% = USB_Install, USB\VID_XXXX&PID_YYYY
    %CompositeAdbInterface% = USB_Install, USB\VID_XXXX&PID_YYYY&MI_01
The values of XXXX and YYYY you should have noted down above in step 7.

Now use the Device Manager to Update Driver for the phone, telling the wizard to search in the C:\Program Files\Android\android-sdk\extras\google\usb_driver folder.

In the Device Manager, the Nexus S should now move from 'Unknown devices' to 'Android Phone'.

Of course, for you any one of these steps might go wrong. However, even then I hope this blogpost might give you the clues you need to get to your goal.

Saturday, 18 June 2011

A Sign of the Times

No posts for weeks, and then three come along! This one's been on my mind for a while though.

We moved our wireless router recently. No longer sat on my desk, it's now attached to the wall at the bottom of the stairs. I'm moving room soon, which was the principle reason for moving it, but in any case it was becoming inconvenient to keep it there. Without noticing it happen, we now have no less than nine devices that connect to the internet by wi-fi: three computers, two mobile phones, two game consoles, a TV and even a printer.

When the router first arrived in our house, the Wi-Fi was almost an optional extra. The main PC plugged straight into it, and only my wife's laptop needed wireless. Slowly the creep began, driven more by manufacturers pushing wireless into their devices than by us seeking it out. Every time we upgrade a machine now, it seems that it comes with internet access.

All this is probably just the beginning, if the Internet of Things is to be believed. For now I'm just amused that our household routine has acquired a slight alteration after all these years: the last thing to do before bedtime is no longer checking the front door, it's making sure the router's turned off.

Searching by Image

Google Images now lets you search by image instead of keywords. You can give it an image and it returns images that look similar, at least to its algorithms. I immediately put it to the test by giving it my mugshot from Stack Overflow. Hmm. Mostly women, with a few babies thrown in. It seems to be having more luck noticing that I'm wearing a black shirt than that I'm male.

Maybe it's because the photo I gave it has the top of my head cropped off? I try the mugshot from this blog. This time it successfully finds web articles containing that same photo, and also comes up with a few faces that do look vaguely like me. Not sure what Angelina Jolie's doing in there though.

Okay, clearly these are early days for this technology, but I applaud what they're trying to do. I look forward to the day when it's so reliable that it can spot family resemblances. That would make a useful complement to the Relative Finder in 23andMe. Another search engine I would like to see is one that let's you hum a few notes of a song and then tells you what it is. Targeted ads could include places to buy the song, or Singing Lessons if it thinks you're off tune.

Jazz FM Reaches Yorkshire

Spinning the stations dial on our DAB radio last night, I was delighted to find, lurking among the pop channels and the dubious attractions of the numerous Christian stations (who listens to all these?), a newcomer to the Yorkshire area: Jazz FM. Seems they went national in March, but this was the first I've heard of it.

I bought the radio back in early 2008 in order to listen to "theJazz", which dutifully went t*tsup a couple of months later. Since then I've mostly listened to Planet Rock, where music from my youth is played by DJs even older than me. And though I really enjoy Rock, I honestly wouldn't miss Heavy Metal, so Jazz FM will make a nice alternative refuge for me when I'm not in the mood for pounding, endless guitar solos.

It may also save me a bit of money, as I'd been wondering for a while if I could justify buying an Internet Radio in order to get access to Jazz again. The main thing that had held me back was not the price, but the enormous choice I would have been presented with. A simple decision like Planet Rock or Jazz FM I can cope with, but when the choice is pretty well every radio station on the planet, my listening pleasure might be ruined by the continual worry that there was something better on the next channel.

Saturday, 7 May 2011

Speeding up Firefox and Firebug

Last Thursday Firefox stopped working for me. Not on the web, but in a web-based user interface that I help to develop as part of my job. Every time I tried to login, the program would hang.

At first I assumed it was my fault, but by a process of slow elimination I tracked the problem down to the Firebug add-in. This is Firefox's debugger, and pretty well indispensable, so I had to get it working again. I won't bore readers any more with descriptions of all the dead ends I went down, but here for posterity is the fix.

I had to create a new Firefox profile (by default you have called 'default'). From the command line, type:
firefox -profilemanager
This brings up a simple dialog that lets you create a new profile. Of course, Firefox now looks like you've just installed it for the first time, so you have to restore any settings you want, and reinstall your add-ins. However, it fixed my problem, and Firefox/Firebug now appear blisteringly fast (I believe the program had been silting up for quite a while). It also got rid of the many incomprehensible warning messages that Firebug had been sticking into the console log since I upgraded to Firefox 4.

Saturday, 30 April 2011

On Watching 2001: A Space Odyssey Again

I watched 2001: A Space Odyssey on DVD last night. The disc was in one of those 3 for £20 deals a few years ago, but I'd never got round to playing it as I'd seen it several times before. Which begs the question of why I bought it, but it was reduced, so it seemed like I was saving money. Anyway, it was quite a few years since I'd last seen the film, so I put it on.

2001 is now ten years in the past, but when it was made it was thirty-three years in the future. Humanity was due to land on the moon the following year, and the film's writers, Stanley Kubrick and Arthur C. Clarke, saw no reason why we wouldn't continue pushing on into space. So as far as the space technology goes, the film could easily be retitled 2101: A Space Odyssey, as the space station and spaceships in the film are decades ahead of anything we've got in 2011. They also had Artificial General Intelligence in the form of the HAL9000 series computer. This had a supposedly fault-free record, but went on to murder four people (the QA department having rather dropped the ball there, I feel). AGI is still far off in the real world, though some experts think it will come in the first half of this century.

Other aspects of the futuristic technology in the film have lost their power to surprise. The videophone call from the space station, for instance. Granted, they seemed to have more bandwidth than I've seen Skype use, but in principle we could do that now. And the computer controls were very little advanced from what was around in 1968 when the film was made: lots of flashing lights and large, square illuminated buttons. Not a touch screen in sight.

All that apart, the film still conveyed that sense of wonder that blew my mind when I first saw it age 12. And the beauty, grace and remoteness of space, that was still there too.

Sunday, 24 April 2011

My Genes and Me

A few weeks ago Matt Ridley, the Rational (but possibly a bit over-) Optimist, wrote a blog entry condemning moves in the US to block people getting their genomes decoded. Apparently doctors over there feel that this should only be possible by going through them. There are actually strong arguments for this, as the field of Personal Genomics is still very immature, we don't understand a lot of what our DNA can tell us, and a little knowledge is a dangerous thing, particularly when placed in the hands of the health-conscious types who would go to the bother of having their genome sequenced. Nevertheless, I agreed with the thrust of his argument that it's our DNA, and we should be allowed to get it sequenced if we want to.

He was going to make a stand by getting his own DNA sequence through an American company called 23andMe, a name I've bumped into on several occasions in the last few months, in podcasts, blogs and articles. I had understood that the cost was still in the tens of thousands but, intrigued, I made my own way over to the site. Turns out that for just $199 + $60 postage I could get my genome sequenced. I couldn't resist, and ordered the testing kit. (And now I see they've reduced it to $99. Oh well, that's actually to my long term benefit, if it encourages more people to get it done.)

It arrived almost immediately, and I dutifully filled up a test tube with spit, put it into the courier pouch and sent it back. "Six to eight weeks", they said, but it was nearer three. I got the e-mail telling me the results were ready, and nervously logged into their website.

I should add at this point that they don't really sequence the whole 3 billion base pairs of your DNA: just stretches where there is useful knowledge to be gained. And even in these areas they're not looking at all possible deviations, just what are called Single Nucleotide Polymorphisms (SNPs), where a single base is altered. Despite this they have dozens of comparisons they can make, all rated according to the confidence you can have in the research behind them.

I looked at the Health Results first. These could have contained seriously bad news, but in fact there are only three conditions for which I have a substantially increased risk (other than ones where the base risk is really low to start with), and for all three there's nothing much you can do to avoid them that I wasn't already doing. The worst offender was prostrate cancer, for which a diet rich in tomatoes may be effective. Or may not. Either way, my food is going to look considerably redder from now on. I will also make sure that the doctor doesn't skip the prostrate check again when I have my annual health check up. (It may not be much fun for them, but then it's no picnic for me either.) On the plus side, they think I have a significantly reduced chance of developing Alzheimer's, which could be very useful if the retirement age keeps going up.

In the section about heritable conditions, it seems I am not a carrier for anything they can test. Good news for my son. In the section about traits they successfully managed to give me only a typical chance of having the two that I know for certain I do have. They said the same about the one medical condition I have, which does make me wonder a bit about how accurate the diagnoses are. However, part of the payment is a $5 a month subscription, so I can keep up to date with new medical advances.

Finally, I went to what turned out to be the most interesting section of all: my ancestry. They anonymously match you up with any close relatives who've also been tested, and you can make contact with any that want to be contacted. The nearest they found for me are (probable) fourth cousins, which means we share a common great-great-great-grandparent. That's quite a way back; however, as more and more people join 23andMe (no doubt tempted by the new low price), the chances of bumping into a closer relative increase accordingly.

Even more fascinating was the tracking of my paternal and maternal lines. On my father's side I seem to be descended from someone in Britain, Ireland or the Basque country. Sounds plausible enough. However, on my mother's side I can trace my line to a group made up principally of Ashkenazi Jews, Kurds and Druze. For geographical reasons I am inclined to rule out the Kurds and the Druze, so that means I am probably, and I have to admit unexpectedly, partly Jewish.

Strictly speaking, what it really means is that my mitochondria are Jewish, as they're what carry the DNA that is passed down from mother to daughter, and the mother to daughter line is only one of thousands of possible ways you can follow your family tree backwards, so the total Jewish part of my DNA might be very small. However, I find myself considerably amused by this: I was adopted as a baby, and because my birth mother was a Catholic I was entrusted to a (nominally) Catholic family. My adopted mother had converted to Catholicism when she married my father, but had been brought up a Lutheran. Her father though was partly Jewish. So all things come around.