Saturday, 28 May 2011

Travel more cheaply on London public transport - online tool






Update: this blog post has been mentioned on the BBC site, thanks @TomSEdwards!

This online tool calculates the cheapest Transport for London ticket or Travel card for travel in Zones 1 and 2 by bus, Tube or DLR (Docklands Light Railway).

I created it based on data from the graph by University College researcher Neal Lathia (@neal_lathia). Neal Lathia's blog post summarises the 2011 research paper from which the data was derived, by N. Lathia, L. Capra on Mining Mobility Data to Minimise Travellers' Spending on Public Transport (links to abstract and paper are on his publications page).

I heard about this research via BBC News (Tom Edwards): consumers don't always buy the most cost-effective ticket or travelcard for their travel needs (surprise surprise) so hopefully my tool, based on that valuable research, will help some passengers.

Of course, as and when prices changes, the interactive decision tree might not be accurate anymore, but here's hoping that the researchers will keep updating their graph - if they produce a new graph when TfL change their fare prices, I'll update the tool too.

I produced the cheapest London public transport ticket or Travelcard calculator using the Interactive Decision Tree tool by Warren and Josh.

Thanks also to 24 Ways for their info on how to use Google App Engine to host the files and scripts (but note that there's an error on that page: the index.html file should be in the top level of the assets folder as shown in their diagram, not the top level of the app folder as they state).

Try the tool.


Monday, 2 May 2011

How to install 1-Wire drivers for iButton / OneWireViewer








If you want to use the Maxim 1-Wire and iButton and have had problems with your computer not properly installing the device drivers for the Maxim DS9490R# USB adapter via WinUSB, you might try the solution outlined below, particularly if you've had these error messages (shown in the screenshots above):
"Windows encountered a problem installing the driver software for your device

Windows found driver software for your device but encountered an error while attempting to install it.
USB Host Adapter for 1-Wire Network using WinUSB
This operation returned because the timeout period expired.
If you know the manufacturer of your device, you can visit its website and check the support section for driver software."

and/or:
"Driver Software Installation
Installing device driver software
Unidentified Device
Failed"

and/or:
"Device driver software was not successfully installed
Please consult with your device manufacturer for assistance getting this device installed.
Unidentified Device Failed"

I know this is a niche area, but as I've done the troubleshooting and fixed the issue for a friend who needs to use iButtons for temperature logging (though not humidity logging), I'm documenting the steps to take, in case it helps any other ecologists, field biologists, conservationists or indeed caterers, restauranteurs or food industry people etc!

The steps below worked on Windows Vista; let me know if they worked on eg Windows 7 too.

  1. Do NOT plug in the USB adapter yet!

  2. Follow the instructions in the official Quick Start guide for OneWireViewer and iButton.

  3. In particular, make sure you install Java, and download the OneWireViewer and 1-Wire drivers for your Windows computer eg Vista. (If you don't know whether your PC is 32 bit or 64 bit, it's very likely to be 32 bit, but they've got a tester on their site to check so use that if necessary.)

  4. Run the .msi file, as instructed in their step 3. Allow it to "Continue" if Vista asks for confirmation.

  5. Their step 4, after plugging in the USB adapter, is where it went wrong for my friend, and for me too when I tried it on a different Vista computer.

  6. Make sure you click on the popup that appears at the bottom right immediately after you plug in the adapter ("Installing device driver software Click here for status"), so that you can view the details of the driver installation - then something bigger will pop up at the bottom right to show the progress.


  7. Though this is not in their instructions, it's likely that after a while you'll get this message coming up (but it may be hidden behind something else, so you have to look for this window eg by Alt-Tabbing):


  8. If you get that window, the progress/status info at the bottom right will also probably be showing this:


  9. In order to get any further, in the window shown in my step 7 you must click "Locate and install driver software (recommended)", or you won't get anywhere.

  10. If, after clicking that, you wait a long time and then you get one or more of the error messages shown at the top of this blog post, don't despair. Try these next steps.

  11. Do NOT unplug the USB adapter. Leave it plugged in. (If you've already unplugged it, then plug it back in and go through my steps 6 to 10 - you'll just have to be patient there.)

  12. Now, open your Device Manager. Scroll down the list till you see "Unknown device" under "Other devices" or under "1-Wire", like this:

    or

  13. If you have more than one "Unknown device" showing, you need to make sure you're working on the right one for the USB adapter, eg trying unplugging it and seeing which one goes away in Device Manager (but you'll have to then go through steps 6 to 10 again when you plug it back in). If it's under "1-Wire", then it's the right one.

  14. Rightclick on the correct "Unknown device", and choose "Update driver software"


  15. In the next screen, click "Browse my computer for driver software":


  16. Next, click "Let me pick…"


  17. In the next screen, "1-Wire" should be highlighted; if not, click on it, then click "Next":


  18. The next screen should look like this, click "Have Disk":


  19. The next screen should look like this, click "Browse":


  20. Now you've got to navigate to the WinUSB_Driver folder that was previously installed when in you ran the .msi file.

    Mine was located at C:\Program Files\Maxim Integrated Products\1-Wire Drivers x86\WinUSB_Driver.

  21. Click on the ds2490winusb_x86.inf file in that folder, then click Open.


  22. It should now look like this:


  23. Click OK, and you'll see this as it tries to install it (properly this time, hopefully!):


  24. With any luck, after waiting a while you'll now see something like this:


  25. Notice that it says you have to restart your computer, so do so (having first unplugged the USB adapter). It'll say it's updating stuff in Windows, don't turn off your computer - so leave it to do its thing, which may take a while.

  26. After Windows has fully restarted, plug in the USB adapter, and hopefully this time you'll see something like these:



  27. (Optional) If you want to go check your Device Manager again, it should look like this, with no "Unknown device" for the adapter:


  28. You can now proceed to attach the other bits and bobs to the plugged-in USB adapter, and open the OneWireViewer.exe program from your Start menu to view the data collected by the iButton.

  29. Note that if you plug the adapter into a different USB port, it will go through step 26 again, just once per new USB port, but hopefully you only have to do the longer-winded earlier steps above once per computer and operating system.