SOS

Shane O'Sullivan's technical blog… really ties the room together

Archive for May, 2008

Temporary solution for using Huawei modems in Windows

Posted by Shane O'Sullivan on May 18, 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.

Update Aug 19th 2008: I have written a simple utility application that checks your broadband usage with O2 in Ireland, rather than taking 5 minutes to find it on their website.  Read about it at http://shaneosullivan.wordpress.com/2008/08/10/o2-broadband-usage-checker .

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

Alternatively, you could download the file from http://www.skynet.ie/~sos/misc/PollO2.bat

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!

Posted in broadband, Microsoft, Technical | Tagged: , , | 7 Comments »

New Demos for Dojo & Google search engine online

Posted by Shane O'Sullivan on May 13, 2008

I’ve previously written about the data stores I committed to the Dojo Ajax Toolkit that enable you to search Google’s services for all sorts of things – books, news, blogs, images and everything else.

Now I’ve put some demos up on DojoCampus that show off a few of the stores.  Check them out at http://dojocampus.org/explorer/#Dojo_Data_GoogleSearchStore , especially the Google Images one – it’s shiny :-)

Posted in Ajax, demo, Demo Engine, dijit, Dojo, dojo.data, dojox, open source, Technical | 2 Comments »

Keep up with the latest Dojo Demos

Posted by Shane O'Sullivan on May 8, 2008

The Dojo Feature Explorer now has an Atom feed you can subscribe to to keep up with all the latest demos that have been added.  So, point your browser at http://dojocampus.org/explorer/featureexplorer/latestDemos.xml and subscribe!

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.

http://dojocampus.org/explorer/featureexplorer/latestDemos.php?callback=myFunction

will call the myFunction JavaScript function.  You can load this file, as I mentioned, using SCRIPT IO.  This could be hard coded into your HTML page, e.g.:

<script type=”text/javascript” src=”http://dojocampus.org/explorer/featureexplorer/latestDemos/php?callback=myFunction”></script&gt;

or loaded using dojo.io.script.

Posted in Ajax, Atom, Dojo, Javascript, json, open source, Technical | Leave a Comment »

Google and Dojo, F.E.E.D.I.N.G

Posted by Shane O'Sullivan on May 6, 2008

This is the second in series of posts on the work I’m doing to bring the Google Ajax APIs and Dojo Ajax Toolkit together. The first post was Google And Dojo, Sitting in a Tree, which you can read for some background.

I have submitted a new data store to the DojoX project, dojox.data.GoogleFeedStore, which makes it possible to access any RSS or Atom feed, anywhere, directly from your own web page. Simply pass the URL of the feed to the GoogleFeedStore, and it will return it to you using the dojo.data.Read API.

Example

var store = new dojox.data.GoogleFeedStore();
store.fetch({
  query:{url:"http://shaneosullivan.wordpress.com/feed/"},
  onComplete: function(items) {
    dojo.forEach(items, "alert('Got feed entry with title ' + this.getValue(item, 'title'))", store);
  },
  count: 10
});

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.

As before, a big thanks to Google for providing such a cool service.

Posted in Ajax, Dojo, dojo.data, dojox, dojox.data, Feeds, Google, Javascript, json, open source, Technical | Tagged: | 6 Comments »

Google and Dojo, Sitting in a tree…

Posted by Shane O'Sullivan on May 1, 2008

I’ve submitted a bunch of new data stores to the Dojo Ajax Toolkit that make it simple to search Google directly from your own site (ticket here).

Update: I’ve also submitted a store to read any Atom or RSS feed, anywhere, without any server redirects. See Google And Dojo, F.E.E.D.I.N.G

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:

<div dojoType=”dojox.data.GoogleWebSearchStore” jsID=”googleStore”></div>

and you have Google’s millions of servers at your fingertips.

The following data stores are available:

  • GoogleWebSearchStore - does a standard web search.
  • 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.

This code is included in the nightly checkouts of Dojo, and not in v1.1. To get it, either check it out from source control, or get it from http://archive.dojotoolkit.org/nightly/.

Have a look at the simplistic demo of it in action at http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/data/demos/demo_GoogleSearchStore.html (available from the May 1st nightlies).

A big thank you to Google for making this service available. Now go play!

P.S. Stay tuned for the Yahoo variant, coming soon!

Posted in Ajax, Atom, Dojo, dojo.data, dojox, Javascript, json, open source, Technical | Tagged: | 11 Comments »

Dojo Developers: Subscribe to this now!

Posted by Shane O'Sullivan on May 1, 2008

DojoCampus.org has created a feed for their amazingly useful series of tutorials on all things Dojo, called Dojo Cookies, at http://dojocampus.org/content/category/dojo-cookies/feed/. Bookmark it. Now. Seriously. Or, as this guy says, Do It :-)

Posted in Technical | 3 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 535 other followers

%d bloggers like this: