My network blocks SIP on 3G, so when I start using its 3G service after leaving a wireless network my N900 goes absolutely crazy about not being to connect. Although this is a specific annoyance I have, it's a general problem with loads of similar cases, such as "I only want my work jabber/skype/MSN/etc. account enabled when I'm at work".

So, I wrote a small daemon and a fun UI to make this easy. It's actually really simple: once you configure which connections accounts should listen for, it uses libconic to listen for connect/disconnect events and enables and disables accounts as appropriate. You should also be able to override its actions temporarily without it clobbering your setting.

Click for full-sized image
A sneaky peek at the UI. See if you can guess where I've been visiting recently.

I think the UI is pretty easy to use, and should cover most use cases.

I just uploaded it to extras-devel. It's called Automatic Connections.

If you've just tried version 0.1 and hildon-application-manager reported that it failed to install, or came across the following problem on the terminal:

"Setting up loldongs (0.1) ...
/var/lib/dpkg/info/loldongs.postinst: line 15: /etc/init.d/loldongs: not found"

then the fix is to edit /var/lib/dpkg/info/loldongs.postinst and remove or comment out the last line, line 15. The installation will then continue. The same is for removing 0.1 (and possibly upgrading).

Sorry about this, it's partly my fault, partly maemo's upstart. The same thing happened with avahi-daemon.

I've already uploaded a new version which fixes this problem.

Comment by jonny Mon Oct 4 16:41:36 2010
This is great! What would be better? The ability to set status based on that too. For example, setting the status for a service to "At Work" when it sees the work Wifi, or "At Home" when that wifi is seen. Maybe even "Traveling" when it connects to GPRS.
Comment by Woody14619 Mon Oct 4 22:57:26 2010

... as i just thought about something like that. My phone at home is just a router with included SIP, that translates this SIP to a line. I can also connect to that router by SIP, but also to the ISP by SIP directly, so now i can connect to the router when i am at home, and to the ISP SIP when somewhere else. Great. Will try this tomorrow.

Comment by Gunni Mon Oct 4 23:42:28 2010
The only carrier in the USA that the N900 supports 3G on is tmobile. You can't use 3G on AT&T. I have tmobile on my N900 and I can make 3G SIP calls including video calls. Are you using AT&T or tmobile?
Comment by John Tue Oct 5 06:07:26 2010

I installed the software, and chose "only on some connections" for my local net SIP-Account. But it does not deactivate when on 3G, not at home. Do i need to reboot?

Comment by Gunni Tue Oct 5 10:41:56 2010

Gunni, you should not need a restart. I'm not sure what's up here. You can get logs by uncommenting the obvious first few lines of /usr/bin/loldongs if things still don't work. When you select "only on some connections", also make sure you actually select some connections, but that might not be a problem.

John, I am on T-Mobile in England.

Woody14619, go ahead! You just need a bit of D-Bus and Telepathy to do that! It's out of scope for this app though.

Comment by jonny Tue Oct 5 16:28:46 2010
Dont know why, but now it works.
Comment by Gunni Tue Oct 5 19:27:41 2010

That looks great, will try ASAP. (I have a SIP connection at home, but not elsewhere, so this should come in very handy.)

Comment by tom Wed Oct 6 16:23:14 2010
When I first saw this package hit the repo, I almost died from laughing.
Comment by Simon Wed Oct 6 17:22:20 2010

Nice little app...thought it would be handy for myself....but not quote....

At the mo, if I want to select my network carrier Vodafone, it lets me, althnough I do notice Vodafone is displayed twice in the list of options, and when I selectone of them, it automatically selects both....bug?

What I wanrt to be able to do, is to select between eithner 3G or 2G.....currrently your app does not appear to allow that?

When I select Vodafone 2G, I want no IM accounts enabled.... When I select Vodafone 3G, I want the IM accounts enabled automatically

Possible?

Comment by Euan Tue Oct 12 05:50:31 2010
Just installed it and it works great :-) Now I know what I've been missing.
Comment by eMHa Sun Nov 14 16:59:10 2010

Seems to do its job so far, this is a feature I wanted since I cannot connect to Skype/SIP on T-Mobile USA (maybe because I use the cheap unlimited dataplan?). Also that I use IM on my computer at work so I have no need to login when I'm on work's wifi. And so on. This program fits the need perfectly.

There are probably unlimited ways to expand upon this idea. Status (away/busy) by connection, or change status to busy when a calendar event is active (meetings), or disable autoconnect during certain time of day or day of week. In case you are looking for more things to do in the future. :)

Comment by Paul Mon Nov 15 21:44:00 2010
Otherwise, gio is not available! Regards!
Comment by Tilman Sun Jan 16 16:44:39 2011
Add a comment