Life in a shell

bash$ tiagosh

Playing with libmsn

The story:

I used to be fan of gaim (now pidgin) IM. It was my main IM software for years and every morning I used to checkout the bleeding edge version from svn to see the current development status. This daily procedure started to not happen anymore when I decided to try kopete at least once. The end of the story is that now I use only kopete to chat. (Yes, I know other IM clients, mercury, kmess, amsn, etc).

The big problem is that msn protocol version used in kopete is MSNP11, which is compatible with the current (MSNP15) protocol, is too old and does not support too many features, like Offline Messaging and Direct Connection on File Transfer.

The lack of features sometimes turns the use of kopete into a bad experience. The file transfer works too bad. It is common to not finish a started file transfer without even an error message to inform the user about the fail. We cannot blame msn protocol, since Mercury messenger works very well.

All I’ve described above have encouraged me to code a msn library, both to learn the msn protocol and exercise my programming skills which I’ve lost due to the lack of time to practice.

Using the open source principle, to not reinvent the wheel, I’ve downloaded libmsn from sourceforge site and started to study the protocol. Unfortunately the libmsn is MSNP8, which is highly deprecated, so I started porting it to the MSNP15 protocol. Now I want to see how far I can go in this porting process.

The current status is: Authenticating, Sending and receiving messages and nudges, Sending display pictures (not receiving yet), notifying the buddies status changes (current media, friendly name, and personal message), set own friendly name, sending messages while in hidden status, among others. Last week I started to develop the file transfer part. It is not working yet, but I’m almost there. As long as I progress the development I intend to create new posts. Probably the second stage is try to integrate libmsn to kopete. I know that there is someone coding it to kopete, but I don’t mind because I’m developing it to myself just to improve my knowledge in this area.

My thoughts about the msn protocol aren’t good up to now. The protocol is messy. Some commands are sent through notification server, some through soap requests to msn sites. The p2p protocol, used to send data through switchboard server, is hard to track. Some fields are in little endian form, some in big endian, some fields are not set on some packets, the communication stream changes depending the kind of data field, etc..

All these issues turn the coding a hard process, because it is not easy to find a logical way to classify the incoming p2p packets.

Anyway, I’m having a good time playing with libmsn and I hope I can release it as soon as possible. đŸ™‚

Cheers

Tiago

Advertisements

June 29, 2007 - Posted by | libmsn

5 Comments »

  1. Hi, i’m trying to play with msn too. I want to do a wikipedia bot, like the encarta bot. I was on sourceforce, and try to used jml library, but this library don’t have lot’s of example. For the moment i just want to play with basic feature. Have you some example to give me to play with libmsn? some basic example, to connect, send and receve some cmd?

    Tanks for your attention,

    Antony

    Comment by Antony | August 18, 2007 | Reply

  2. Hi Antony,

    the latest libmsn upstream version (http://libmsn.sf.net, a bit outdated, but functional so far) has an example file called msntest. It shows you how to use all the basic stuff libmsn provide (connect, send and receive msgs). I’m using msntest to help me on my study of libmsn internal design, so I think it can help you too.
    To get msntest working all you need to do is compile libmsn. The msntest binary will be placed in the source code top directory, and its source can be found in msntest.cpp.

    Have fun.

    Comment by tiagosh | August 18, 2007 | Reply

  3. Hello Tiago,

    I am interested so I wanna know if there is any plan for release? Access to the code?

    thanks in advance,
    george

    Comment by george | September 13, 2007 | Reply

  4. Hi George,

    yes. The code is already upstream.
    Take a look at https://tiagosh.wordpress.com/2007/09/03/unhidden/

    It is only compiling on Linux for now.

    Best Regards

    Comment by tiagosh | September 13, 2007 | Reply

  5. thanks Tiago, good job!

    Comment by george | September 14, 2007 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: