Automatically switch to Bluetooth headset with PulseAudio

I recently bought a brand-new pair of Philips SHB 9100 Bluetooth headphones. I like them a lot; They are relatively compact and light, not too expensive and offer sufficient audio quality for my mobile audio needs.

After having convinced the Gentoo system on my beautiful Thinkpad X220 to talk to my shiny new gadget, I wondered if there was a way to get PulseAudio to set the headphones as the default output automatically as soon as I switch them on. Turns out there is!

Even though this feature does not seem to get a lot of attention, it’s there, all that is required to enable it is to add the following to your /etc/pulse/default.pa:

# automatically switch to newly-connected devices
load-module module-switch-on-connect

Now, if only PulseAudio and Empathy would talk to eachother to switch between high-quality audio mode (A2DP) and telephony mode (HSP/HFP) automatically like my iPad does…


XMPP - yet another chat protocol?

Before I get started with my rant, I would like to make clear that I am not an expert on XMPP - some of the things I say could be wrong. Also, this is only my perception of the status quo, although I’d love to hear what you think about this topic. My email address can be found at the top.

XMPP is awesome

Ever since I learned about the Telepathy framework and the magic it does on the Nokia N900, I’ve been a supporter of XMPP. Of course Telepathy does a lot more and is protocol-agnostic, but a lot of the really neat features such as detailed presence status, voice and video calling, Telepathy tubes and even location awareness are specifically developed for and only work with XMPP.

Most XMPP clients suck

However, all of these exciting features are not really being widely implemented. Sure, the N900 had great Telepathy integration, but the N900 is dead and it’s successor, MeeGo, has yet to ship in any real, usable device. It doesn’t look much better for the various other contenders in the mobile space either - on iOS, XMPP is a total disaster because IM applications are limited to 10 minutes of running in the background. Android is a bit better, with Google Talk being well integrated into the system, but as the name already implies, limited to Google Talk.

It doesn’t look much better in the desktop space. I don’t know much about Windows clients, but last time I checked about half a year ago, most of the clients tried to differentiate themselves through integration of more protocols, platforms, social services and the rest of that mumbo jumbo.

Mac OS X has Adium, which is nice for chatting but doesn’t have very many advanced features. As far as I can see, development is happening at a very slow pace, audio and video chatting have been "coming soon" for ages.

On Linux, the situation is a bit better. GNOME has Empathy, a nice chat client based on Telepathy. It supports a lot of XMPP extensions like audio and video chat, location reporting and things such as screen sharing through tubes. It’s got integration with gnome-shell which works very nicely and hopefully, the GNOME Contacts application that is coming up will also fit in with the existing chat experience. Apparently KDE is also working on deeper system integration of Telepathy and I’m excited to see what they have coming up.

Most XMPP servers suck

But why is the client situation so bad? With Facebook Chat, XMPP is shaping up to quickly become the most used chat protocol on the planet. It would seem like IM, a tool that millions of people use every day, would be a top priority for every operating system vendor, both in the desktop and the mobile space, to integrate tightly into their software product.

I don’t think it’s because people don’t care about these “advanced features” that I’m talking about - many people use weird web-based location services like foursquare, gowalla or Facebook Places. People use Skype every day for voice and video chat. FaceTime has been one of the main selling points of the iPhone 4 (which has been selling well, so I hear). There clearly is a demand for diverse IP-based communication.

The main problem that I see at the moment is the quality of the servers that most people use. Although Facebook is based on XMPP, they’ve created their own little chat network with no possibility to benefit of the distributed nature of XMPP. Also, as far as I can tell they don’t support any of the advanced features that I would like to have and that are available on many other servers.

I can haz fix nao?

So how do we escape this dilemma? Well, I don’t think there’s a good way to fix the current situation. People are lazy, they don’t switch to another chat provider unless they are forced to. Facebook already had millions of users and therefore became a relevant IM service overnight. jabber.org or jabber.ccc.de? Not so much. The best option at this point in my opinion would be for Facebook to fix their servers. New, better XMPP clients would be written overnight and everybody would be happy - except of course those like me who don’t really want their chat network tied to a huge monster that is the Facebook platform. But I guess we would just have to tolerate that and benefit from the distributed nature of XMPP by using different servers to communicate with those trapped inside Facebook. At least we would have a feature-rich, omnipresent distributed communication protocol to communicate with all of our peers at last!

TL;DR Most XMPP clients suck because the biggest provider, Facebook Chat sucks. If Facebook fixed their servers at least we’d have a universal IP communication protocol.


14 Apr 2011

I hate storing data. I really do. I don’t think there is a future for storing music collections when the internet is around, ready to serve any song at any time, wherever you are. However, there is still a problem: This market is a giant vacuum at the moment, with a few smaller companies doing a good job at providing services solving this problem, but not for every usecase, not in every country.

One example: Spotify. Let’s disregard that I can only buy it by telling a friend in the UK with a credit card to buy a gift certificate for me, their service is just not good enough. There is conflicting information about how many employees they have and how they are doing business-wise, but what I see as a costumer is that their service has not at all improved over the last year. Still the playlist-based syncing approach for the mobile app, still the same closed-source library for 3rd party developers that discourages client development on other platforms. If they can’t fix the most obvious usability flaws in their mobile app, I don’t think that they can survive in the long run.

Enter Grooveshark. Half as expensive, same usability flaws in their mobile application, desktop application is even worse than Spotify’s, their music library is a mess and they’re having “licensing issues” that prevent them from getting into the iPhone app store. Need I say any more?

Next up: Rdio. Reasonably priced, it looks like they are the only ones with an iPhone app that simply offers an iPod-like interface for all your music collection and cached music (is that really so hard?) with the option to add new things to it with search. Their cross-platform desktop app looks more like a small helper application, with the web interface remaining the main way of managing music, which is fine if done properly. Also, they might have a better desktop client coming up for Linux in the near future. Not available outside the US yet, so it’s not the omnipresent solution I envision either yet.

It seems like this business needs a big player like Apple or Google to jump in, face the music labels and tackle the engineering challenges associated with creating a good listening platform to make this way of consuming music the norm rather than the exception here in the western world. Of course, all the startups would be dead instantly if something like this happened, but at least I would have a decent music streaming service available.


snowy - the road ahead

5 months ago I traveled to Boston to discuss the future of snowy, Tomboy Note’s online companion application. We made lots of plans and talked about how we wanted to implement note editing, sharing and loads of other cool things.

Looking back over these 5 months, we’ve managed to implement some of if; Jeff has made progress on implementing note sharing and I’ve redesigned the theme quite a bit. Brad has managed to crank out a non-regex-based parser for snowy-flavored markdown (which I was convinced nobody would ever be able to write, but it seems I underestimated Brad’s ninja-skills) and Natan Yellin added support for associating multiple OpenIDs to one account.

Even though a lot has happened, we’re clearly not where we wanted to be after these 5 months. The note editor and the mobile application are two things that are very high on our priority list and are not yet finished.

Recently, Sandy stepped down as the maintainer of the tomboy and snowy modules and I totally understand his decision. You can read his announcement on tomboy-list. I’d like to thank him as a maintainer for reviewing my patches and playing an important role in getting me involved in GNOME.

A killer-feature

However, this lead me to rethink the next steps of snowy. With only two active free-time developers, running after a generously-funded startup like Simplenote or an established platform like Evernote is both unrealistic and unmotivating for me as a volunteer. But we already have a feature plan that sets snowy apart from other notes platforms: Encryption, privacy and freedom (whatever that means…). I think that putting the focus on the ability to install snowy on any computer, being able to store encrypted notes on the GNOME servers and maybe even sharing encrypted notes with other people would be a worthy goal to achieve and a good reason for people to choose snowy over other services.

What also partly motivates me as a developer is that building an all-javascript mobile web application with offline capability is fun and hip. Everybody (even Gruber!) is talking about webapps, so I think trying to make one would be fun!

Short-term: Make snowy more useful

That said, in the short term we really have to tackle note editing and the mobile client. Without them, snowy is more of an online backup service for notes rather than an online version of Tomboy Notes. That said, I think that implementing these features in their most basic forms is not too much work. The difficult part will be to support some of the more advanced features of the Tomboy note format on both the desktop as well as the mobile browser client.

Once we actually have a product that is being used by many Tomboy users, maybe we can get some more contributors involved - from my own experience I know that it’s a lot more fun to work on things that you yourself want. After all, the goal is to build a product that shines beyond the borders of GNOME and its fantastic community!


Fighting the "Internet Killswitch"

As you may have heard, Egyptian networks were recently disconnected from this global network that we call “the internet”. Immediately, internet activists jumped out and alerted everybody to the threat of the same thing happening to us if we are not careful about what we pass through our parliaments. Large technical as well as non-technical news websites (and probably also newspapers and magazines) followed.

I support their goals of a free, distributed and open internet, and I also think that any law that gives the government the power to shut down critical infrastructure is nonsense.

But the situation in Egypt is totally different: A dictator that has been in power for 30 years, a near-civil-war-like situation on the streets, burning buildings, injured and dead protesters and police. Does anybody really think that under these circumstances, the junta in Egypt still cares about whether or not they have the legal authority to suspend critical infrastructure (like the internet or the railway services)? I think that given a high enough level of urgency, any government could suspend the data links in and out of the country within a few hours or at least days.

Trying to stop symbolic laws like the “Kill Switch” bill in the United States is obviously a good cause, but it isn’t a solution. To prevent what happened in Egypt to over happen to us, we have to work on weaving our mesh even finer to create a more democratic, decentralized, independent and global data network of the people.


RSS