Visits to this blog

Archive for May, 2008

Microsoft, in their infinte wisdom, recently sent out a “security” update that has broken the use of many USB devices. It switches off the power of USB devices it considers to not being used. This may be fine for mice, keyboards and printers, but I use the Huawei broadband modem from O2 (also used by Vodafone an 3 Mobile here in Ireland). See one of many discussion threads about it here.

Update June 16th 2008: O2 have released a fix for this. Go to http://www.o2.ie/firmware and follow their instructions. I installed their update, and so far my connection has not dropped for 5 hours or so.

The modem is powered down every few minutes, disconnecting you from the web, and forcing you re-enter the PIN after 10 or 20 seconds. Extremely annoying. O2 say that they and Microsoft are working on a patch, but it’s been 4 weeks or so now, and my broadband is still more or less unusable.

So, I’ve come up with a temporary fix that seems to work well. All it does is repeatedly list the contents of the the drive that the modem is mapped to (F: on my laptop) every 5 seconds. This tells Windoze that the device is in use. To use this, paste the code below into a text file whose name ends in .bat, e.g. PollModem.bat. This is an executable script file in Windows. :loop
dir F:\
PING -n 5 127.0.0.1>nul
goto loop

If your modem is listed as a different drive, change the drive letter from F to whatever drive it is on the second line of the script. You can find the letter by double clicking on My Computer and looking for the drive called “O2 Broadband” (this is for O2 obviously, the Vodafone and 3 Mobile modems may be called something different.)

Once you’ve saved the PollModem.bat file, double click on it. You’ll see a window pop up, listing the drive’s contents every 5 seconds. It’s been running for me now for an hour, and the modem hasn’t disconnected yet.

You’ll have to run this once each time you start Windows, but it’s far more convenient that having your broadband disconnect every 3 minutes! Hopefully 02, Huawei and MS will fix this permanently soon, but until then, this should keep you going.

Update: After using this solution for a few weeks, I’ve found that it doesn’t reliably fix the problem. However, it does seem to keep the modem alive for longer, but it will still cut out eventually. Huawei, O2, Vodafone and Microsoft (especially bloody Microsoft) had better get their act together!

For all the Web 2.0 addicts out there, I’ve also added access to the list via SCRIPT IO. If you point your browser to http://dojocampus.org/explorer/featureexplorer/latestDemos.php, you will receive a file containing a JavaScript array of the last ten demos added to the feature explorer. By default, it will call the function dojocDemos, passing it the array. You can specify the callback function you want using the callback parameter. e.g.

This will retrieve the first 10 entries in my blogs feed, and alert the title of each.

The huge advantage of this is that you no longer need any server side redirects to access RSS and Atom feeds from your own website. This Google service is the basis for Google Reader and iGoogle.

If you want to access an Atom feed from your own web server, you can also use the dojox.data.AtomReadStore that I wrote earlier. However, this is only useful if you have direct access to the Atom XML document using Ajax, and due to browser security issues, you can only load these documents from the web server hosting the web page. This new GoogleFeedStore removes that restriction, and has the added advantage that it also works with RSS.

Check out the demo page to get a feel for it (available in the May 6th nightlies), and there should be an example up on the Dojo Feature Explorer quite soon too.

This is different from putting a search box on your site and redirecting to Google. With the new dojox.data.GoogleSearchStore family of data stores, you can retrieve google search results in JSON format, and display them on your site directly.

Pause a second…. let it sink in…..

There are no cross domain issues, and no server side component is required. It uses the dojo.io.script transport to access the Google Ajax API service. Just stick the following on your page:

GoogleBlogSearchStore – searches blogs. A future enhancement I will be writing will be to write a data store that accesses Google’s extremely cool Ajax Feed API, which provides access to any ATOM feed, anywhere, in JSON. It’ll be possible to do a full web search of all blogs for certain topics, then using the feed store to pull down that complete feed .

GoogleLocalSearchStore – searches the Google Local service to find places, businesses etc.

GoogleVideoSearchStore – Does what it says on the tin, searches for videos.

GoogleNewsSearchStore – Finds news stories…. noticing a pattern yet?

GoogleBookSearchStore – Um, finds books..

GoogleImageSearchStore – Finds images. This provides both a thumbnail and full sized version, similar to the FlickrRestStore already provided by Dojo.

The potential applications are more or less infinite. Demos included in the check-in show how to integrate this with the extremely cool dojox.dtl templating engine to display the results in a number of different ways, as well as how to feed the results into the Dojo Grid, Gallery and SlideShow.