Archive for category Skype
State of Play
So it’s been a fair few months since my last post and I thought I’d try get back into it with an update of what’s going on in the world of IM and Pidgin plugins and stuff.
In case you didn’t know the Christchurch earthquakes have been affecting my life for the past few months. These are pics from a walk around the block around my house. Over 7000 aftershocks and still going!
So what does this mean for the Pidgin plugins?
For the most part, not a great deal. Things have slowed down since I’m spending more time of earthquake cleanup and wedding planning rather than coding, but they’re still plodding along. Unfortunately the power-cuts and brown-outs have caused damage to the server machine that I use to build all my plugins (and which runs this website/blog) and it needs to be rebuilt. Currently it’s running of a live CD of Gentoo since the main partition won’t mount at boot. If you’ve been unable to access the Skype plugin site recently, that’s why.
So what’s the state of the Skype plugin?
As mentioned in previous posts, I had started work on a SkypeKit plugin. Unfortunately, the terms and conditions completely rule out using the SkypeKit SDK in open-source software and so the SkypeKit protocol would need to be clean-room reverse engineered – this has been made harder by the added layers of encryption recently added to the SkypeKit protocol. Instead, I’ve been following closely the skype-open-source efforts, to create a native Skype protocol plugin for Pidgin, however a lot of people have been having difficulty with it as certificates and other protocol things are out of date with the newest Skype versions. For now, I recommend just using an old version of Skype (eg, v3 or v4 on Windows) along with the skype4pidgin plugin, to keep memory usage down.
So what’s the state of the Facebook plugin?
Well at the moment, there’s a lot of people having a lot of trouble with the plugin. Things have changed in the ‘FB HTTP’ protocol and I haven’t had a chance to do anything about it. Unfortunately, Pidgin (well, libpurple mainly) can’t just switch over to using the official FB API’s for login and status messages and stuff since it all relies on having a browser being embedded into the app. It also relies on the browser supporting JavaScript, something which especially can’t be assumed when using Finch from a terminal. There’s some code in source control at the moment that uses the login system from the HTTP chat method to allow the Pidgin app to do the XMPP login and all that jazz without any kind of user interaction, but that probably breaks a lot of FB terms and conditions.
What about the other plugins?
Yeah, I write one or two other plugins for Pidgin/libpurple
A lot of them are being integrated into the Purple Plugin Pack but I’ll list them out here with a brief status update:
- OkCupid protocol plugin: Still going strong. I’ve been asked to port the plugin to work in InstantBird which I’ve started investigating.
- Windows 7 Extensions plugin: Looking good. If you’re using Windows 7 or later and don’t have the plugin, you’re missing out on some useful eye-candy
- Automatic translation plugin: Not so hot. The calls to the Bing/Microsoft Translate service are all coming back as null, and the Google Translate API’s are closing up at the end of the year. I’m looking at other (free) online services to use.
- Steam protocol plugin: There’s now a SteamKit library out which talks the native Steam protocol. Unfortunately it’s written in .NET and would either need a complete rewrite to work in Pidgin, or for a Pidgin plugin to be written using embedded mono. Writing OO code in C is crazy
- Keyboard LED notification: Not working on this any more since it works well for most people
- Protocol Icon Override: Has an annoying bug that the icons don’t show up when creating a new account, otherwise fine
- IRC HTML Formatting: Oddly needs to be re-enabled after Pidgin starts, and it’s currently not matching up HTML colour codes to their closest-match IRC colours. Bold and italics and underline work alright though
- Wordfeud protocol plugin: Most of the protocol is reverse-engineered and chatting works fine, it just needs some kind soul to make a GTK interface for the Wordfeud game board
- Gammu protocol plugin (SMS via your phone): Works fine
- Typing sounds: Why would you even want to use it?
- Omegle protocol plugin: No idea. Let me know if you use this one
- Ning protocol: Also no idea. Again, let me know if you use it
- NetNexus protocol: Unfortunately noone hangs out in the NetNexus rooms any more
- Pidgin Juice: Needs a massive overhaul to take advantage of some new HTML5 goodness.
So yup, that’s an update. While I’m not in the super active development mode I was a year or two ago, I’m still fairly contactable. So if you have any questions, queries, bug reports or feature requests feel free to either contact me, or leave a post in the comments.
SkypeKit in Pidgin
There’s been a couple of comments on my blog about this but I’ve been waiting until I saw what Skype had made public before I mentioned anything.
Yes, SkypeKit has been announced. A new way to connect to the Skype network. Yes, it still needs a Skype client running, however now that Skype client doesn’t have a user-interface. This new interface allows developers to use more parts of Skype that were previously untouchable, such as native-typing notifications and file transfers, which is a good thing. Sure, its not perfect in a pure open-source world but definitely a step in the right direction.
The bad news is that it’s GPL incompatible and needs a lot more work before a GPL compatible plugin for Pidgin can be made available. Yes, work is in progress.
Multiple logins with Skype 4.0
Over the last few hours, I’ve had a couple of people ask me about the new /secondary command-line flag that Skype 4.0 for Windows has now.
To be honest, I’d never heard of the flag, but it looks like it’s now possible to run more than one copy of Skype on Windows. Fantastic! A little more digging around and I found [https://developer.skype.com/jira/browse/SPA-597 this bug report] which also talks about /username and /password command-line options too. Neat!
So the question is this: “can I run more than one copy of Skype with the skype4pidgin plugin”. The answer up until now was “only on Linux”, and it would only really work if you ran both the dbus and X11 versions of the plugin. The answer now is “not yet”, since it’s going need a rewrite of things to be able to handle more than one Skype account through the plugin, as well as figuring out a way to target more than one copy of Skype running on Windows.
So I guess it’s just a big “watch this space” ![]()
Thanks for reading!
Reversing Skype
So there’s a few things that the Skype API’s don’t provide which I needed in the Pidgin/Adium/libpurple plugins. Thought I’d document them here in case other people want to do the same.
One of the first hurdles I ran into was that on OSX, you need to link with the Skype.Framework bundle to access the Skype API commands. Unfortunately, linking with non-GPL libraries is forbidden in the GPL so I set out to work out how and what it does to ‘talk’ to Skype. Turns out that OSX has a few different ways of “inter-process communication”, but there was only one way that used Carbon as well as Cocoa… Long story short, I managed to work out that it was a CFNotificationCenter which was used to send/receive messages. So I created a debug function to see what the key/value pairs that Skype.Framework sent to Skype and managed to work it all out. It turned out that this reverse-engineering proved helpful for the Skype4Py team, who used it to get Skype4Py working on OSX. You too can use my GPL’d version of the framework at http://code.google.com/p/skype4pidgin/source/browse/trunk/skype_messaging_carbon2.c
The next problem was that I wanted to send/receive typing notifications, but the Skype API didn’t provide any way of doing this. In the end, I created an API app2app stream, called “libpurple_typing” which sends datagrams of “PURPLE_TYPING”, “PURPLE_NOT_TYPING” and “PURPLE_TYPED”, which directly relate to the libpurple typing notifications. I haven’t seen any other Skype API wrappers (Trillian/Miranda/Fring) doing anything like this, but if I’m wrong let me know and I’ll get the plugin working with them. Maybe all us 3rd parties can get together some day and agree on a common way of sending typing states.
Last thing I’ve managed to do was get avatars on platforms (Linux and until recently, OSX) that didn’t support the “GET AVATAR” api command. Originally it was to get avatars for the SkypeNet (no-skype-needed) version of the plugin. Turns out they were all stored in user{number}.dbb files, which are apparently Kazaa storage blobs. Some kind of database that noone’s been able to work out. From the looks of things now, Skype for Windows uses a SQLlite db for storage so this method won’t work there, but the way to find the avatar, is to loop through all the user*.dbb files and find the Skype username of the avatar in the file. Then just skip ahead to a 0xFF,0xD8 block (header for a JPEG) and grab all the data up until 0xFF,0xD9. If you hit 0x6C,0×33,0×33,0x6C (db entry boundary), you’ve gone too far.
I guess the rest of the features that Skype don’t provide that I’m working on would be:
- Sending a file without using the Skype-provided file picker
- Accepting/rejecting a file without opening Skype
- Automatic authorization of the plugin with Skype
All the above features should allow the plugin to work without a Skype GUI using something like Finch, since these days not everyone has flash graphics stuff
Anyways. I hope that’s useful to other developers out there. I had fun doing it
Where’s the Skype plugin?
So you may be wondering why it’s taken so long for a Skype plugin update for Linux and Windows. I mean, you probably don’t actually wonder these things since no one reads this blog, but meh
The Adium plugin has been having several updates latetly while the Pidgin plugin gets none. What gives? Well, probably the most important thing is that the Adium plugin was sucking CPU power due to a bug in Skype 2.7/2.8 for Mac. The second reason, was that Adium people were unable to set their status to away or DND or invisible etc… which I can imagine would be quite annoying. I’m not a mac user myself, so it doesn’t really bother me so much.
The main reason I haven’t put out a Pidgin plugin yet, is I’m mostly waiting for Pidgin 2.6 to come out. The special, magical thing about Pidgin 2.6 is that it has hooks in it to let people make voice and video calls. The Skype plugin’s taking advantage of this to use the new “media” menu to make/accept/hang up voice calls… which has several obvious benefits.
Other than that, new features that I’m holding out on are
- ‘Missed’ messages fetching (eg, if you get a message in Skype while Pidgin was closed/crashed)
- New chat message handling which should decrease CPU load
- Better chat handling (easier to add to buddy list, can “get info” on a buddy from the chat window)
- Probably more, but I can’t remember them
The other effects of the new features is to get the plugin to work better with the no-Skype-needed version of the plugin. More about that in another blog post
So thats it really. I’m kinda waiting, kinda thinking I should make one last release before Pidgin 2.6…. I’ll think about it some more. If you want, you can always compile from source or you can ask me nicely and I’ll load up a new dll/so/something
Skype 2.8 beta 2 for Mac Released
So as my first “real” post, I thought I’d say that Skype have released an update to Skype 2.8 beta 2. The interesting bit is here where they’ve reported on all the errors that were fixed including an important one that I reported “Skype API: implemented: get chat x dialog_partner”. One little line of bugfix caused a lot of relief for me. A little side story:
For a while, the Skype plugin for Adium had been generating a lot of console log messages. This was something I knew, but what I didn’t know was that it was eating up CPU cycles and causing incomming messages to be missed. It turns out that this was why I couldn’t keep my loaned macbook on my lap for too long: the CPU temp was getting up to 90 degrees Celsius causing large red welts on my legs!
So, longish story short, I reluctantly rewrote the messaging (well the chat) part of the plugin to work out who incoming messages were from. The one line of code which called “get chat x dialog_partner” had to be replaced with hundreds of lines of callbacks and other code. Gah!
So yeah. If you’ve got an old version of the Adium plugin, rejoyce: Skype have fixed their bug, but in the end, if you’ve got a newer/newest version of the plugin you should be happy that you’ve got a lot better code because of it