Subscribe to
Posts
Comments

Technology

Fuel Cell. Photo: Eston BondWhen confronted with the issue of diminishing reserves of oil and our car dependent culture that consumes more and more of these reserves, I often here the retort:

Electric fuelcell operated vehicles, in my opinion, are the answer.

Wrong.

A fuel cell vehicle is powered by hydrogen gas, which is turned into water as a byproduct of the process. It is nice and clean on a local level, but think for a minute: where are the hydrogen mines?

We obtain hydrogen in a copule of ways. We can use hydrocarbon fuels and catalytic cracking - but then we are still using fossil fuels. The other method is through a form of electrolysis of water. This splits the hydrogen from the oxygen in the water, which can then be used in a fuel cell (the same process is used to create rocket fuel, where both hydrogen and oxygen are gathered).

But the law of conservation of energy says this: if you turn water into hydrogen and then back into water, then at maximum efficiency, the energy used to create the hydrogen is equal to the energy you gain from that hydrogen later.

Fuel cells are not 100% efficient, but even if they were, they would be nothing but batteries. They store the input of energy for later use.

Electrolysis requires electrical energy, but wher does that energy come from? Well some of it can come from renewable sources, some of it from nuclear power, but most of it comes from burning fossil fuels, and certainly if our requirement increases significantly then we will be forced to meet those requirements by burning more fossil fuels.

Okay, so we can burn coal and gas as well as oil, but we are still back where we started - using capital reserves of energy as if they were income.

Fuel cells are not the answer - they are merely an enabling technology.

Apple LogoSince Apple moved to OS X and built a solid Unix core at the heart of their products, I have been in love with their systems. I currently have three Macs with a fourth due sometime in the spring.

I have an iPod video too, and believe that Apple’s attention to detail, aesthetics and technology are a great boon to the IT industry.

I have been a long time Linux user, and before that I have used other Unix systems since the 1980s, but Apple computers are the first Unix machines I have been able to recommend to non technical friends and family (and with great success. I am slowly converting everyone I know to Macs).

So it was with joy that I saw the iPhone announced the other day. This phone (running OS X) is the future of telephony in my opinion.

But my joy turned to dismay at the news that Apple had once again decided that rather than settle a trademark dispute, they would try to continue to use someone else’s trademark and railroad them into submission. This time it is Cisco’s iPhone trademark that Apple are ignoring.

This is not a new departure for Apple, who have already succesfully beaten off Apple Corps, the Beatles label, in violation of an earlier agreement to share the trademark, where Apple Corps had the rights to the name in the field of music.

There have been some less obvious claimants that Apple has defeated over trademarks. The fact of the matter is that, for all their better products, their cool hardware, their open source operating system and their attention to detail - Apple is still an old fashioned company in the mould of Microsoft.

I still love Apple kit, and I’ll still recommend it. But each time Apple acts like a big corporate monstrosity, I become a little less enthusiastic.

And in the meantime, Ubuntu Linux is almost as good as Apple for usability. Mix that with a range of hardware that really works, and Apple computers will not be the only Unix boxes I would recommend to my mother.

Windows Vista

Broken Window near Seattle. Photo: Steve McCoyIn his “Joel on Software” blog, Joel Spolsky writes a good article on why bloggers should not accept gifts from companies trying to get their products advertised. Buried in the midst of the article is his review of Windows Vista, based on his own tests:

1. Do not, under any circumstances, consider upgrading an XP system to Vista… even if it’s fairly new and even if it’s Vista Supremo Premium Ultra-Capable.

2. When you get a new computer, if it comes with Vista pre-installed, that’s when you’ll upgrade.

3. Don’t buy a new computer now just to get Vista. If your current system meets your needs, stick with it until you really need a new system. Vista is not reason enough for a new PC.

4. Need more details? Read Paul Thurrott’s review.

He doesn’t mention the treacherous computing issue, which ought to cause everyone to turn down Vista (but let’s face it, it won’t, because most people have no idea what rights they are signing away each time they upgrade their Windoze eye candy). But from someone who has no anti-microsoft agenda, Joel Spolsky’s comments are very reasonable. If you want to use your computer to do real stuff, don’t upgrade to Vista.

Apple Releases New iPhone

iPhoneWell the much anticipated iPhone has just been announced by Steve Jobs. There are no surprises here really - the merger between iPod and phone has been widely expected and the multi gesture touch screen interface was patented last year.

But as usual, the Apple technology just looks so slick. No chance of the dreadful Zune product taking over from the iPod any time soon. And despite the fact that I really don’t go in for buying clever phones, I can see myself buying this product as and when it is available in the UK. iPhone

TomTom The other day I wrote about how I had attached my TomTom One to my Mac via bluetooth to extract the GPS data. I hooked this all up to Mac stumbler and took a drive around Aberystwyth to see what wireless access points were advertsing themsleves. I used no special aerials, nor did I try and look for access points that were not advertising themselves - if a beacon fram made it to my Mac sitting on the passenger seat, it was counted - otherwise the access point was ignored.

The results of my drive are displayed in this Google map of some Aberystwyth Wireless Access Points. I haven’t put all captured fields of data into this map, because it is just for demonstration purposes. It is also not a complete map of Aberystwyth access points for the same reason. The third disclaimer is that the markers show the locations where I first saw a beacon frame and not the position of the strongest signal from the access point.

But the question is: how do we get the data from Mac stumbler to Google maps?

Mac stumbler saves its data in a “plist” XML format. This is a slightly odd format that looks like this:

<plist version="1.0">
<array>
    <dict>
        <key>channel</key>
        <integer>1</integer>
        <key>comments</key>
        <string></string>
        <key>date</key>
        <date>2006-11-08T17:26:57Z</date>
        <key>latitude</key>
        <string>W 5224.795410</string>
        <key>longitude</key>
        <string>N 404.561493</string>
        <key>mac</key>
        <string>00:12:17:DD:99:0E</string>
…
</dict></array></plist>

and so on.

What would make more sense would be:

<node>
  <channel>1</channel>
  <comments />
  <date>2006-11-10T17:57:11Z</date>
  <latitude>W 5224.771484</latitude>
  <longitude>N 404.355896</longitude>
  <mac>00:12:17:DD:99:0E</mac>
…
</node>

So I wrote an XSL style sheet which would do this translation, and ran the plist file through xalan to apply the stylesheet. The stylesheet is here: 

<?xml version="1.0" ?>
<xsl :stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    </xsl><xsl :template match="array">
        <nodelist>
            <xsl :apply-templates select="dict"/>
        </nodelist>
    </xsl>

    <xsl :template match="dict">
        <node>
            <xsl :apply-templates select="key"/>
        </node>
    </xsl>

    <xsl :template match="key">
        </xsl><xsl :element name="{translate(text(), ' ', '_')}">
            <xsl :value-of select="following-sibling::*"/>
        </xsl>
  </xsl:template>
</xsl:stylesheet>

At this point, I could have just written a google maps page to read my data, but there is a complication. NMEA format presents data in degrees and minutes, whereas google maps and many other applications want to use decimal degrees. I wrote another stylesheet that translates the NMEA data to decimal degrees and then throws out the results in someting that I could copy and paste into an existing google maps page. This is not pretty (and the XML code is not as neat as I would like), but I wanted something running quickly, so here is the code I used:

< ?xml version="1.0" ?>
<xsl :stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl&:output method="html" omit-xml-declaration="no"
     doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
     doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" />

  </xsl><xsl :template match="node">
    </xsl><xsl :variable name="lat1">
      <xsl :value-of select="substring(latitude,3) div 100" />
    </xsl>
    <xsl :variable name="lon1">
      <xsl :value-of select="substring(longitude,3) div 100" />
    </xsl>
    <xsl :variable name="lat2">
      <xsl :value-of select="floor($lat1)" />
    </xsl>
    <xsl :variable name="lon2">
      <xsl :value-of select="floor($lon1)" />
    </xsl>
    <xsl :variable name="lat">
      <xsl :value-of select="(($lat1 - $lat2) div 0.6) + $lat2" />
    </xsl>
    <xsl :variable name="lon">
      <xsl :value-of select="(($lon1 - $lon2) div 0.6) + $lon2" />
    </xsl>

    var marker = createMarker(new GPoint(-<xsl :value-of select="$lon"
         />,  <xsl :value-of select="$lat"  />), 0<xsl :if test="wep='Yes'"
         >1</xsl>,”<xsl :value-of select="ssid" /><xsl :value-of select="mac" />“);     map.addOverlay(marker);   </xsl:template> </xsl:stylesheet>

Having run the plist through xalan again, I coped and pasted the results into the web page example above.

TomTom One and Mac GPS

TomTomOkay, I have successfully connected my new TomTom One with my Mac laptop via bluetooth, such that the GPS data can be read by applications. It was not quite the way I wanted to do it, but it works well enough. Here then are instructions if you want to do the same (complete with how to get Macstumbler to read the GPS data).

Safety first: Do not follow these instructions until you have backed up your SD card safely, and have tested the restore process. Restore to a new SD Card and keep your original SD card safe. The details on this web page do not constitute a recommendation that you should follow them. You do so entirely at your own risk.

Okay, with those disclaimers over, and if you want to proceed, then you need to do the following:

1) Install the rfcomm executable onto your SD card 2) Install a startup script that will create the rfcomm bluetooth connection(s) 3) Tell your Mac to listen for the connections 4) Tell Macstumbler and other applications where to find the GPS data feed

There is an easy method and a hard method to do this. I’ll detail the easy method first.

You can install the missing rfcomm executable and some pre-built scripts by downloading the Wildtom package (tt-bt-net2.zip from Roberto Piola’s site). If you want to connect to a Linux box with bluetooth, this is all you need. Just follow the instructions in the package.

However, if you have a Mac, then you have some more work to do. Copy the files in the Wildtom package onto your SD card, and then edit the gpsproxylistener file in the wildtom folder on the card. You are going to alter this so that it no longer listens for incoming connections, but tries to open a connection to your Apple mac.

Why?

Unfortunately the Mac does not provide the tools for creating a direct RFCOMM connection to the TomTom one. It tries to do everything through the GUI interface. This would be great, except that the RFCOMM serial ports on the TomTom are not discoverable, and it resists pairing. If you could pair to the TomTom one from a Mac (using the Pairing key of 0000) you could theoretically just connect up the serial ports, but I couldn’t make this work unfortunately.

Right, so we have to get the TomTom to initiate the bluetooth serial connection to your Mac. How do we do that? Well, the first step is to discover the MAC (Media Access Control) address of your Mac’s bluetooth adaptor. click the “Apple” menu, choose “About This Mac” and click the “More Info” button. Under “hardware”, click “Bluetooth” and your Bluetooth Mac address is listed in the address field. It is a six byte number that looks something like this: 00-14-51-00-01-02. Note this down.

Okay, so we have the MAC address. Now plug in your TomTom One to your Mac and let it connect to the computer so that you can access the SD Card. Navigate into the “wildtom” folder on the SD card and edit the file called “gpsproxylistener”. Change the “rfcomm listen … ” line to read:

/mnt/sdcard/wildtom/rfcomm connect 1 00:14:51:00:01:02 3 &

Substituting your bluetooth MAC address for the one above of course. Technically, this is no longer a gpsproxylistener, but don’t worry about that detail!

And that is it. You are ready now to connect your TomTom. Disconnect from your computer, and click your way through te menus to find the newly installed “start BT services” button. Click this and click Okay to the following question, and your TomTom should now try to connect with your Macintosh. The gps data feed should appear on rfcomm channel 3, which should be your Bluetooth-PDA-Sync serial port (if you use a PDA, you may wish to modify the rfcomm cahnnel from 3 to 1 and add in a new incoming serial port).

Try it out. Fire up Macstumbler, or some other GPS aware application. In Macstumbler, choose preferences and choose to enable GPS support, and select /dev/tty.Bluetooth-PDA-Sync as the GPS device.

Make sure the TomTom One is not in your house (if your car is out the front, lock the TomTom in the car and go inside. Because we are using Bluetooth you don’t need to be right next to the GPS when testing). Once you get a GPS lock, “Show GPS status” in Macstumbler will give you your GPS location in NMEA format.

You are now ready to go for a drive and collect some test data!

This article is long enough now. Watch out for the next installment: How to convert NMEA data and Macstumbler output into something you can use on Google maps.

The problem is this: You want to connect to your Macintosh using bluetooth from a device that has a very basic bluetooth API, and which needs your bluetooth device MAC (hardware) address. What is the MAC address of your Macintosh bluetooth device?

There is a handy Unix utility for looking at your network interfaces that the Mac implements - this is the ifconfig utility. You can use ifconfig to find the hardware address of your other network interfaces - Ethernet, WiFi and Firewire. Unfortunately the bluetooth device is not listed.

The MAC address does not show up with ifconfig, nor in the system log files. So I ended up using my Mac Mini, and installing iStumbler , which can browse for nearby bluetooth devices and display information such as their Mac address, as in the example below:

iStumbler screenshot

I could have achieved the same results with the lightblue bluetooth python API or rfcomm on another Linux box with bluetooth. It turns out, however, that there is a much easier way. In one of those classic “smack your head with a wet fish” moments, I thought to click the Apple menu and choose “about this Mac”. There under the “bluetooth” heading I found this:

About My Mac

Oh well. iStumbler is an interesting application, and now I know the hardware addresses of bluetooth on all of our Macs and every other bluetooth device too.

TomTom One and GNU Linux

I bought a TomTom One this week. We finally relented and decided to purchase a SatNav after years of resistence, because we got lost last week on a trip to the Cutty Sark. Actually, we got to the Cutty Sark fairly well. It is not too hard to find Greenwich, because you just drive to the river Thames and turn right or left depending on which side of Greenwich you arrived at :)

But it was going home that caused the problem. I followed signs as best I could, but suddenly the only signpost (in the middle of London) was for Sevenoaks (which is in Kent). Weird!

I forget which road I took, but we ended up in Bromley - which is perhaps slightly preferable to Croydon, but not where we intended to be.

So SatNav it is. From now on, some computer can guide us (the wrong way up one way streets probably).

Maybe SatNav will be a good thing, although I have always felt that I am fairly good at following my nose. (Just as well, really, as I recently borrowed a SatNav to get me out of Birmingham - only the stupid thing could not lock onto its position, and I was on the M6 heading home before it finally started to play).

However, the other gadget I have wanted for a very long time is a GPS that will integrate with applications on my computer. So a bit of research showed me that TomTom produce systems that: (a) store the GPS data in a standard NMEA data format and (b) run on a version of GNU linux, with all the hackable possibilities that entails - including a neat little gpsdata device node. (Okay, at this point I am getting too technical. Linux and Unix systems treat everything like files that you can read and write to like any other file. The GPS data can be read like any other file in the filesystem by opening the “/dev/gpsdata” file. Only the file is constantly updated by the GPS).

The choice was a no brainer. Linux and a well respected SatNav. I bought myself the reasonably priced TomTom One, and so far I am very impressed. It does everything a SatNav does, and I have already found out how to run a few extra startup scripts that get it creating RFCOMM ports to dump the GPS data feed over bluetooth.

(Getting technical again… trust me though, it’s great fun!)

My only problem comes in accessing this feed. It works fine on my Ubuntu Linux desktop box, but my Mac laptop is trickier. I cannot find how to create RFCOMM outgoing ports on OS X Tiger, unless I am paired with the device. But the device does not need to be paired (and refuses to do so).

So I compiled some Python extensions, and that all works. But what I really want is the gpsdata as an RFCOMM serial port, so that my applications think of it as a directly attached gps unit. Maybe If I initiate the connection from the unit, and use incoming ports that would work… but I would prefer outgoing ports.

Anyone know how to do that?

(If / when I get it all working, I’ll write a howto followup article).

From the BBC Website:

The eccentric British sport of hurling wellington boots has been given a mechanical makeover by scientists at Aberystwyth University.

Friends of mine?

Well, yes as it happens!

We have Sky satellite at home. Sky like to monitor their satellite boxes through the telephone line using a clever little feature that BT developed called “silent signalling”.

The idea is that any piece of data terminal equipment (DTE) can be plugged into the phone line and called up from a central system from where it can be interrogated over the phone network. The signalling is silent, so the phone does not ring and the householder need not be aware a call is in progress. As I understand it, taking a phone off the hook immediately interrupts this process, and no calling line identification (CLI) is ever presented, so it is as if the call did not happen.

Except that theory is not always the reality. It seems that some lines are configured (or misconfigured) in such a way as to cause a telephone to “chirp” briefly when the silent signalling takes place.

Caller line identification is also presented by silent signalling, so it is possible the phone will chipr briefly before all calls for users who have CLI presented on their lines.

Phones will also ring if the BT exchange is carrying out routine testing to your line. This may present as a regular short ring at about the same time each night.

So solutions?

We tried raising a fault with BT. As usual, BT faults told us that they had never heard of such a thing, they could book an engineer for us, but they would charge us if they decided our equipment was at fault. (But the problem is at the exchange, I told them - to no avail).

We tried asking Sky to stop calling us. They suggested unplugging our box from the wall (but the problem is your equipment raising the call, I told them - to no avail. Apparently Sky cannot stop their equipment from contacting you).

Next we tried the BT nuisance call bureau. They tried to convince us to sign up for a service that stops calls from a given number. (But hey - this is silent signalling. No number is presented!)

Finally we found someone at the nuisance call bureau who passed us onto someone at the exchange who knew what was what. He took our line off the regular testing schedule. Hooray!

And then that very night, Sky called and the phones chirped just as my daughter was falling asleep. Grrr.

Last attempt with Sky - I shall tell them we have changed telephones and give them a new number to call. Now if I knew Rupert Murdoch’s number, I would give them his. But I don’t, so I’ll just have to send the chirping phone to work!

If anyone else has found a way to convince BT to fix the line to stop this happening, please let me know. In the meantime, I offer my solutions above as the best way to avoid those annoying calls at 5 AM.

 

Next »