A Graphical Guide to Getting your God Damned Bluetooth Modem to Work Again in Linux (Ubuntu Edgy)

Much to the chagrin of my cell phone company, I use Bluetooth tethering to provide myself with always-on internet connectivity so that I can always be connected, even when traveling unexpectedly.  It's shocking how often I end up in areas without wifi coverage of any kind, but such is the world we live in.

For the fifth time now, I have managed to convince myself that configuring this in Linux is really easy, and not bothered to back up the one or two critical tidbits which allow it to work.  Also for the fifth time I have found myself in a situation where I needed to use my phone as a modem through my laptop and have been in an awkward situation because I could not.  For myself as much as for anyone else, I'm going to post the instructions for getting a bluetooth tethered modem up and running quickly under Linux, using GUI tools as much as possible.  Other tutorials that I've found for setting this up are rambling monstrosities that cover everything from a threat analysis of bluetooth security to a 1000-line-long configuration for command-line ppp dialer, so I am aiming to just provide a brief overview of how to get the phone up and running.  These instructions are fairly generic, but in my particular case, they apply to Cingular, the Nokia 9300 smartphone, and Ubuntu Edgy.
WARNING: BE AWARE OF THE BILLING IMPLICATIONS OF TETHERING BEFORE YOU FOLLOW ANY OF THESE STEPS, EVEN IF THEY SOUND NEAT.  CELL PHONE COMPANIES HATE TETHERING LIKE RED SOX FANS HATE YANKEES FANS.  THEY WOULD MUCH RATHER SELL YOU A MUCH FASTER AND BETTER DATA CONNECTION THAN ALLOW YOU TO USE YOUR PHONE IN THIS CAPACITY.  TETHERING DATA IS NOT BILLED THE SAME AS DATA ON YOUR DEVICE, YOU MAY INCUR EXTRA CHARGES EVEN IF YOU HAVE A VERY GOOD DATA PLAN FOR YOUR SMART PHONE.  TETHERING ON A DEVICE IS NOT THE SAME AS USING A DATA CARD EVEN IF BOTH ARE ON THE SAME ACCOUNT, AND YOU WILL INCUR EXTRA CHARGES FOR THAT.  IF YOU DO NOT HAVE A PREVIOUS AGREEMENT WHICH YOU ARE VERY SURE GRANTS YOU A LARGE AMOUNT OF TETHERING BANDWIDTH, DOING THIS MAY RESULT IN THOUSANDS OF DOLLARS IN DATA CHARGES.  I AM NOT LIABLE IF THIS HAPPENS TO YOU.  YOU HAVE BEEN WARNED.
Ahem.  Now that that's out of the way, let's move on to the main event.

Step One: make sure your bluetooth device is up and running.  This should happen automatically in edgy, so if you don't see output like this, it is unfortunately likely that your device is entirely unsupported.  You might try restarting your bluetooth device if it isn't visible here.



Step Two: Once you know your device is there, you'll need Linux to talk to your phone.  Scan the area for your phone, and then discover what channel your phone provides Dial-Up Networking (DUN) on.



Step Three: As root, edit /etc/bluetooth/hcid.conf and change the 'security' to 'auto'.  I've found that other methods for communicating the PIN are less reliable.  If you want to change your PIN, edit the "passkey" here.



Step Four: as root, edit /etc/bluetooth/rfcomm.conf to bind "rfcomm0" to your device's modem functionality.  Make sure to set both the "device" and the "channel". from Step Two.



Step Five: install the "gnome-ppp" package.  This is a nice graphical dialer that integrates well into the desktop.



Step Six: Run gnome-ppp.



Step Seven: In the initial window that comes up, enter any username and password that you like.  These are usually ignored by your provider, but they must be present.  I use 'user' and 'pass'.



Step Eight: Click the "Setup" button, and configure:
  • your Device to be "/dev/rfcomm0"
  • your Type to be "USB Modem"
  • your Speed to be something nice and high


Step Nine: Click "Init Strings" and type in the obvious strings that come to mind:
  • ATZ
  • AT+CGDCONT=1,"IP","isp.cingular"


Step Ten: Completely stop and then start your bluetooth services to make sure your phone is available.



Step Eleven: Click "connect" in gnome-ppp.  You will have to enter a PIN on your phone.  Hopefully, this will happen:



Then, the dialog will disappear and an icon will appear in your notification area telling you about the PPP connection.  There you have it!  Cellular internet connectivity, as easy as AT+CGDCONT=1,"IP","isp.cingular"!

I have absolutely no idea how, or why, any of this stuff works.  If the above steps don't work for you, unfortunately, I will not be of much help; I don't know how to diagnose problems other than googling around and running long bluetooth command lines that I don't really understand.  Still, I've been lucky enough to get it working every time after only a little banging my head against a wall.  Good luck!

Thoughts on Thoughts

I am in the market for a new computer, and it will almost certainly be a Mac.

Last week, I discovered that, with Vista, Microsoft has finally crossed the line between "pragmatic compromise" and "dangerous decision".  I have never been really comfortable with having a Windows machine that required "activation", but it's been worth it mainly for access to certain bits of software which are hard to get elsewhere.  I generally buy new computers with Windows installed to get the discount and avoid the hassles.  (Sure, Linux seems like a pain compared to Windows when setting up new hardware, but have you ever tried to get Windows bootstrapped?  From scratch?)  The new "premium content protection" garbage in Vista is such a terrible disaster waiting to happen that both the moral and practical ramifications of buying new Windows hardware have finally become overriding.

The first option I considered was System 76.  I desperately want to sing their praises, but the only experiences I've heard of with their laptops so far were decidedly ... lackluster.  Their service is apparently excellent though, and I will continue to consider them for future hardware purchases (the idea of not having to screw around with that one last fiddly device driver in my Linux setup is certainly appealing).

While I use, and will indefinitely continue to use, Linux for my day-to-day computing and development needs, having more than one major OS around is extremely handy to run the occasional bit of proprietary software.  Going over the pros and cons of Mac vs. Generic Windows hardware...

PRO CON
  1. I already know a few people who use Macs.
  2. Apple has already done right by me in the recent past, as the only company to contribute both software and hardware to the Twisted project.
  3. The MacBook is actually a fairly cost-effective way to get a reasonable Core 2 Duo setup.
  1. No Half Life games.
  2. Only one button on the trackpad.
As you can probably tell, I was already leaning in the "Get a mac" direction.  I still lacked a sense of real urgency or desire to get the new machine.

Then, today, I saw the latest from Jobs: Thoughts on Music.  In it, he lucidly declares the emperor naked and asks if maybe he would like to put on some clothes.  In a nutshell, he says DRM is obnoxious, ineffective, and extremely expensive.  Most importantly, he claims that Apple would prefer to support a DRM-free music store.

I could, of course, interpret this cynically as a publicity stunt, since there seems to be about zero chance that the big four music publishers will get their heads out of their asses before they're all bankrupt, but it wasn't offered as a sound byte or a press release.  It's in a sort of essay format and I get the impression that he is really trying to convince the reader that this is what he thinks is best, and he hopes it will happen.  Heck, if there anyone who can make it happen it's probably Jobs.

(I think I'll get the black one.)

Five More Things

Almost a month ago, I was tagged by my father in the "five things" game which threatens to destroy everyone's privacy forever.  This can be a tricky proposition even in when one is tagged by a stranger, but to be tagged by a member of one's own family makes it almost impossible.  I hope that these are all news to him, but this is the best I can do.  They'll certainly be news to somebody...
  1. I've never taken any illegal drugs.  While most people would take this as a point of pride (especially while responding to their parents), I actually feel obscurely guilty about it - as if there's an entire avenue of human experience I've been cut off from.  I don't have any plans to partake of the wacky weed any time soon, though, since I feel like it's hard enough for me to maintain a "normal" mental state with the assistance of caffeine.
  2. I have read and listened to dozens of books and lectures by Christian apologists, most notably Ravi Zacharias and Lee Strobel in an attempt to better understand and have dialog with my Christian friends.  Unfortunately this attempt has been an almost complete failure.  I still don't even understand most of the arguments being made, let alone found them convincing, but I now have an encyclopedic knowledge of the various shibboleths that Christians use when discussing both their own faith and the "liberal secular humanist" threat that I represent.
  3. In high school, I was an illegal "ringer" for Math League.  Despite poor performance in class, I had done lots of computer-art projects on my own which had resulted in an extremely good understanding of geometry.  I hadn't paid dues for Math League and therefore not technically allowed to participate, but the teacher in charge was highly competitive and plied me with free food to get me to fill a gap in the team at a few competitions.  I'm still not really sure why this was, since as far as I could tell I wasn't really improving the team's performance.  My guess is that geometry was a badly neglected subject in the school's curriculum.
  4. When I lived in Austin, I participated semi-regularly in a Vampire: the Masquerade live-action role-playing game.  I didn't have any "LARP" experience at the time, so the game master's advice was to "play what you know".  Naturally my vampire character's particular curse gave him something that I am very familiar with: a fear of blood.  It made his life pretty hard.
  5. When I was at Ninjaneering, our first project was a game called "Exodus", a 4X galactic conquest game with some very interesting resource-management.  Much of the gameplay was actually a sort of glorified stoichiometry since players had to keep the "pipe full" at each facility which took in resources and emitted products.  It saddens me that almost nobody knows this about me, because the game was quite cool and it is unfortunate that it died on the vine.
To fulfill the dark pact of the chain letter, I will tag Christopher, Jonathan, Travis, Raffi, and Jason.

I Am A Process Consultant

I guess the cat's out of the bag now. Look at this thread about feature development on the Etsy forum, and you'll see that "Rokali" has graciously plugged the Divmod development process I have been helping them to "roll out".

Come for the Code, Stay for the Abuse

A clear undercurrent pervades all discussion of potential contributions to the open source projects I have been involved with. Everyone involved, contributors and maintainers both, assumes that open source projects should be glad of all the contributions they receive, that contributors are in short supply, and that every effort should be made to accommodate those willing to donate their time.

To some extent, this is true, to be sure, but I think the case is frequently overstated. One should be friendly to contributors, and honor their contributions, but a contribution to a running project is not a one-sided transaction. In fact, open source projects offer a precious commodity: maintenance in perpetuity, at least for the project's lifetime. In larger organizations, this sort of maintenance is quite often the subject of multi-million dollar "support" contracts, and is in fact the bedrock upon which the towering edifice of the software-support industry is built.

It has been gradually dawning on me, mostly since the institution of UQDS on Twisted, that this is not the only benefit a contributor receives from a good project. The careful feedback that an experienced peer reviewer can give to a contributor is valuable professional development tool. This is true even if the reviewer isn't particularly more experienced as a programmer or as a reviewer: simply getting a different set of eyes, and a fresh perspective on your code can show you problems with it that would never have occurred to you on your own.

Perhaps more importantly, it is actually prestigious to contribute to certain projects, and not in the cutesy-happy way that terms like "gift culture" imply. "Rank" in a merit-based hierarchy such as the Apache project can clearly contribute to one's employment prospects, as much as any other professional qualification.

I often wrestle with the problem of "recruiting" for projects which cannot pay their contributors, and has apparently very little to offer. As these notions occurred to me, I noticed a similarity in these sorts of benefits to another sort of contribution to a community: academia.

Recruiting for an open-source project is sometimes laughed off by potential contributors. "Yeah, right, like I'd spend my time writing code for free." Personally, I've always found the best of any field like what they do enough to do it for free, but still... this objection seems reasonable. It is ridiculous to give your time away when you could be getting paid for it, right?

Let's examine the average college student at a prestigious technical university - let's say CalTech or MIT - for a moment. They (or their parents) pay substantial sums of money for the privilege of attending the school. They are forced to do rote work - often in excess of 60 hours per week. At the end of four years of this gauntlet, they are presented with a piece of paper. As the son of one MIT alum and the fiancé of another, I can vouch for the fact that this is no cake-walk.

Of course, presented like this it doesn't sound so glamorous. As a dropout myself, I have an incentive to make it sound bad; but in our high-tech society the value of education is well-understood. I don't think I need to explain to any likely reader of this blog why that piece of paper might be worth something to a few of those students one day. Although many students might receive some form of scholarship or free tuition, nobody in their right mind would suggest that these schools should compensate their students, or frantically beg students to enhance their academic community by giving them whatever research they feel they have time for...

So, let's look at the Twisted project from this perspective. Community dedicated to technical excellence? Check. Continuous, harsh abuse of its participants self-esteem? Check. Years of incredibly tedious drudge-work to complete? Check.

We don't have a piece of paper, though.

This is actually very important, and I think can explain a lot of difficulty in recruiting. Often, contributing to an open source project such as Twisted is described as a happy, fun exercise, in the hopes that it will attract contributors. It can be fun, of course, but on the whole that is not the real motivator, and so this is generally recognized as false by potential participants and they move on. As we have moved further towards honesty about that fact - for example, instituting an unapologetic review process that rejects a substantial number of contributions - we have paradoxically gotten more activity, not less. Contributors actively engaged in the project have noticed an improvement in their own skills and are excited about that fact.

Still, it's an uncommon skill to be able to recognize that you're improving and be happy with that alone. I think that some public form of recognition could go a long way towards getting more people involved. I've been pondering different ways that we might honor contributors, from a branded USB drive, to some kind of offical certificate proclaiming a "rank", all the way to something like a "class ring" for contributors above a certain level.

That's probably not all it takes to get people excited about contribution, though. Institutions like MIT have centuries of cultural context associated with them. You can see this in movies: when a hacker character is being introduced in movie which prominently features the tubes, the whispers in the background often talk about the hacker in question's academic history at a selective university. I have been trying to imagine what the world would be like if, in the dramatic scene where Extreme Hacking Prodigy #2 is being introduced, the muted voices in the foreground of the scene were instead exchanging knowing mutters about his near-impossible record of over one hundred patches accepted to Twisted - in less than a year!

More importantly than what that would would be like - how do we get there from here?