Categories
Mozilla Personal

Bluetooth Tethering with the N900 and T-Mobile

I’ve been spending the last few train rides to and from work every day trying to figure out how to tether my N900 to my laptop. While Firefox Mobile is nice, there are some things my desktop does better. I first tried using the PC Suite from Nokia, but that wasn’t successful (it apparently doesn’t support the N900). I then tried JoikuSpot, which is in beta. Sadly, I encountered the “phone reboots when clients connect” bug. However, if they fix that, that piece of software looks very promising. I finally went down the road to Bluetooth Networking.

In order to pull this off, you’ll need to get a handy little application from the Application Manager. Under the Network section, look for “Bluetooth Dial-Up Networking” in the Extras repository. After you install that, you will want to restart your device. Next, pair your N900 with you laptop (this varies per operating system. I used Windows 7 and these instructions will assume that). After pairing the device, add a new Dial-Up connection on that modem. The phone number will be *99# and you will leave the user name and password blank. Save the connection, but cancel it when it tries to dial (it will fail anyway). Now, launch the device manager, and find the Bluetooth modem that should have been installed when you paired the N900 to your computer. Open its properties, and go to the Advanced tab and set the Extra initialization commands to at+cgdcont=1,"IP","epc.tmobile.com". After this, you should be able to connect to the Internet though your phone.

To prove that it works, I wrote this on the train, and I’m posting while still on the train. :P

I found this particular wiki page to very useful in setting this up, but I found translating the instructions to Windows 7 to be a bit difficult at times.

Categories
Mozilla

NetUtil.jsm Just Got More Useful

Recently, a few bugs have landed enabling a bunch of nice things for consumers of NetUtil.jsm:

  • NetUtil.newURI can take a string (plus optional character set and base URI) or an nsIFile.
  • A new method for creating channels has been created. NetUtil.newChannel can take an nsIURI, a string (plus optional character set and base URI), or an nsIFile.
  • NetUtil.asyncFetch can take an nsIChannel, an nsIURI, a string (plus optional character set and base URI), or an nsIFile.

This means, among other things, that it now requires less code to read a file asynchronously than it does synchronously. The old way to do this asynchronously can be seen here on MDC. This would give the consumer a byte array of the data in the file. Compared to the synchronous case, which can be seen here. Both are pretty verbose and clunky to use. The new way looks like this:


NetUtil.asyncFetch(file, function(aInputStream, aResult) {
  if (!Components.isSuccessCode(aResult)) {
    // Handle Error
    return;
  }
  // Consume input stream
});

One function call, with a callback passed in. There is a slight difference from the old asynchronous method, however. NetUtil.asyncFetch gives the consumer an nsIInputStream instead of a byte array. The input stream is a bit more useful than a raw byte array, although it can be painful to use in JavaScript at times (maybe we need an easy method to convert an input stream to a string?). I look forward to patches using this method to read files instead of doing it synchronously.

Categories
Mozilla

Bugzilla Helper 0.3.0

Version 0.3 of the Bugzilla Helper Add-on for Thunderbird has been released! Current users will have to update manually since sandboxed add-ons do not automatically update. New in this version:

  • Use version 0.3 of the REST API.
  • Enable spell checking in the comment field.
  • Allow replying to New: bugmail.
  • Offline support.

Found a bug? E-mail me or leave a comment.

Categories
Mozilla

Bugzilla Helper 0.2.0

I just uploaded Bugzilla Helper 0.2.0. This improves on the last release by making making the submission of comments an asynchronous operation. It also uses the activity manager in Thunderbird to track the process of the submission, and retry it if an error occurs.

There are still some apparent issues with the REST API that the add-on is using, and I’ll likely include some workaround in upcoming versions. 0.2.0 is available on addons.mozilla.org and is a recommended upgrade. Current users will have to update since sandboxed add-ons do not automatically update.

Categories
Mozilla

Crash! Boom! Bang! But I just wanted to delete some history…

If you’ve been experiencing crashes when trying to delete a large set of history, I have great news for you! We’ve identified the issue, and a fix will be coming to you shortly!