Libnice 0.1.0 released!

Yesterday, I released a new version of Libnice, This is a new major version that has a small API/ABI break from previous versions.

Here are the main changes :

  • Added nice_candidate_copy to the public API
  • Make stun_timer timeouts configurable (Breaks API and ABI)
  • Add compatibility support for MSOC 2007 and MSOC 2007 R2
  • Add MS-TURN support for MSOC
  • Added and completed TURN RFC 5766 support
  • Add a nice_agent_set_port_range API to force a component to use a specific port range
  • Fix various bugs and memory leaks
  • Improved documentation

The API and ABI break is with the StunTimer usage, so if you use it, you’ll need to do a small change to your code. Because the library version changed, you’ll also need to recompile your applications that link with libnice.

The biggest change in this version is the full support for the recently published RFC 5766 TURN standard (UDP and TCP) as well as the addition of MS Office Communicator compatibility. The API/ABI break introduced in the StunTimer usage is to allow specifying the timeout of STUN retransmissions. The timeout for the STUN and TURN discovery during the candidate gathering phase has also been lowered to 3 seconds now instead of the 9 second timeout that we had before, which should make for a quicker candidate gathering phase and a more responsive UI.

Another interesting change is the addition of the nice_agent_set_port_range API that allows you to specify a range of ports that you want a component to listen to for host candidates. This should help those who use port forwarding with symmetric NATs.

The stun_usage_timer configurable timeout as well as the nice_agent_set_port_range addition were suggested by Tom Kaminski.
The MSOC support was added by Jakub Adam.
The RFC 5766 TURN support was added by Marcus Lundblad and myself.
Other small fixes that were reported on the libnice mailing list were also fixed and included in this version.
Thanks to everyone who contributed in this release and thanks to Collabora and Nokia for sponsoring that work!

A new version of Farsight2 has also been released today (0.0.23) which should work with the new API of this Libnice release.

You can download this new version of Libnice from the usual place.

Enjoy!

Youness.

PSFreedom 1.0 and lots of news!

Hi all,

I’ve wanted to post about PSFreedom for the last 4 days now but everytime there’s something that prevents me from doing so.. there is so much happening that it’s hard to keep up and I’ve been overwhelmed by the reaction!

PSFreedom has seen a tremendous success, it’s been featured on multiple news sites  including Engadget, we’ve had a huge number of ‘fans’ (more like leechers:p) popping up on the newly created IRC channel (#PSFreedom @ irc.freenode.net). Someone (devz3ro) donated a domain and web hosting for our new http://psfreedom.com/wiki website. The number of people who have worked hard to create a beautiful and well organized wiki to keep track of all the ports. The number of  people who have tried (and many succeeded) to port PSFreedom to so many different devices and those who sent me pull requests on github as well as those who simply read my code and reviewed it and decided to comment on my commits so I can improve the code.

Anyways, it has been a tremendous success, real community work and I want to thank personally everyone involved, everyone who helped, whether it be with a small or a big contribution to the project.

Now about the news, I have quite a few… first, a lot of people are asking me how to get this working on the N800 and N810! Well, it’s been working for a few days now, but the mass storage driver was conflicting and made the controller unstable. However, today, drizztbsd contributed a patch that fixes this issue (by killing hald-addon-usb) without modifying any file from your system, so enabling the exploit on the N800, N810 and N900 is all a matter of running the ./psfreedom-enable-maemo.sh script! There is also an easy to use graphical application that should be released today by MohammadAG and a special thank you to Bash who also contributed the PSFreedom logo.

I have also received a ton of requests from people to port this to the iPhone and/or one of their Symbian devices… my answer to that is : RTFM!! In other words, no it is simply *impossible*. It can only be ported to other Linux devices. However, we are close to having it work with IphoneLinux (actually, I just got confirmation a few seconds ago that it’s finally working) as NTAuthority spent countless hours porting it and fixing the controller’s incomplete driver in order to make this work. Once his port is finished, and stable, he will make it available to everyone, so stay tuned and follow the Device compatibility list on the wiki!

Other good news, PSFreedom has been ported to a huge amount of devices already, and the list keeps growing every day! We currently support and have working binaries for not only the N800/N810/N900 but also the Palm Pre, Archos 5 (Generation 6), Archos 5 IMT (Generation 7), as well as, thanks to the work of DocMon in porting PSFreedom to the MSM72K controller, The HTC Desire (Bravo), Nexus One, HTC Dream (G1), HTC Sapphire (HTC Magic 32A/32B), HTC HD2 (running Android), HTC Wildfire and I’ve received confirmation a few minutes ago that it’s been successfully ported to the HTC Evo as well as HTC Diamond. Also, waninkoko recently ported PSFreedom to work on the Dingoo open game console.

For the future, you can expect a lot more devices to be supported, like the iPhone/iPod (Through iPhoneLinux only) as well as the Gp2x Wiz game console, and the huge list of compatible devices available in our wiki. Also note that running the PSFreedom on an Android device isn’t as easy as it is on the N900, you need to flash some nandroid thing, then flash a custom kernel (because Android’s kernel sucks) then run PSFreedom in that environment, then run Nandroid again to restore your system… It is quite complicated but many people are working on making it much simpler to do, the famous AmonRA contacted me and said he started working on building a PSFreedom-compatible recovery image with a menu item to enable/disable the PSFreedom functionality.

There is one last  important bit of news I want to share with you : PSFreedom 1.0 has been released (more like tagged) and it adds support for many devices, the Makefile allows you to build for a specific platform by specifying it as a target, ‘make N900’ or ‘make Desire’ or ‘make Dingoo’ will build it for your needs with the right configuration. Also more importantly, this version will allow you to customize which payload or shellcode you want to send to your PS3 during the exploit. Many people have requested a version that allows you to play backups, while the original release of PSFreedom didn’t allow that, it quickly got patched to allow the backup manager to work. The new release of the PSGroove yesterday also adds 2 system calls that allows user space application to modify the GameOS kernel, and that meant a new payload is available for developers. This version of PSFreedom provides all these payloads and you can choose which one to set by simply copying it to /proc/psfreedom/payload once the module has been loaded. The same also applies to the shellcode.

That’s it for now, there are a ton of other news I’d like to share, but this post is long enough and I’d like to keep some surprises for next time!

Thanks to all for your support!

KaKaRoTo

PSFreedom source code released!

Hi again,

As promised yesterday, I’ve just released the source code for PSFreedom. You can grab it now on github.

If you want to port it to work on another device, then fork the repository and start working, you can send me a pull request once it’s done. See the end of this post for a little howto on porting it to a new device.

I have also decided to remove that video I put yesterday on youtube. I didn’t give the link to anyone, but somehow people found it and it got linked on multiple news sites… that video is useless, hard to watch, and I’m sorry! I’ve made a new video that you can view here :

Since yesterday I’ve been spammed with emails, comments on my blog, PMs and pings on IRC, etc.. and my server even went down (doesn’t seem to be because of high traffic). So I’d like to answer everyone with this FAQ :

Q : What is your relationship with the PSGroove project ?

A: PSGroove was released a while ago while I was already working (about 50% done) on PSFreedom. I had help from Mathieulh and Phire from the PSGroove team, who gave me insight on what the jailbreak does. When PSGroove was released, I read its code to understand what it does and to make sure my code worked in the same way. I copied the descriptors and payload from the code of PSGroove, and I give them credit for what they did, and for what I copied from their project. I set my license to GPL v3 to match theirs, and I gave credits to those who helped me on IRC. However, I say and I insist that PSFreedom is not a port of PSGroove, because I never took their code and ported it to the N900, this is my original work, and I wrote all of its code from scratch. Some of the PSGroove team seem to be in conflict with me because of that, they insist that “if you looked at our code, then it is a without question a port of PSGroove”, and I believe we have two very different understanding of the term ‘port’.

Q : Can/when is it going to work on the iPhone/Symbian/My phone ?

A: PSFreedom is a  Linux driver, so it will only work on Linux-enabled devices.. which means, not on iOS, and not on Symbian, so please stop asking about that!

Q: Will it work on the 770/N800/N810 ?

A: I only did this for the N900, I might port it to other devices, but right now, I cannot give any guarantees to anyone that it will be ported or that it will work on another device… The source code has been released and whoever wants to contribute can go ahead, fork my repository, and send me a pull request when you got something working.

These are linux devices, so yes, it should work, but just like any other device, they use a different controller than the N900, so a little porting will be necessary.

Q: Will it work from a linux PC ?

A: Unfortunately, no, most PCs have a USB controller  that only supports Host mode, but you need Slave mode to be able to make this work.

Q: Can I run backups with this ?

A: At the moment, no, I have used the same payload as PSGroove, which means backups are disabled, although someone already released a version of PSFreedom with backups enabled. In the future, I will hopefully  make the module load any payload at runtime, this way you could choose between different payloads.

Q: Can you make it easier to use ?

A: Me? No.. someone else? Yes.. there is already someone working on a UI for PSFreedom, and it will be available once it’s ready.

Q: What do I need to use PSFreedom on my N900 ?

A: First, you need a N900 (duh) and a PS3 (duh) with firmware 3.41. The N900 should be running the stock kernel (-omap1) not a modified kernel. Then you just need to scp the files to the N900 and run the -enable script.

Q: How much of the source is Nokia N900 specific? Are you using the Linux USB Gadgets library?

A: Very little is N900 specific, I’m using the include/linux/gadget.h if that’s what you mean. See next Q/A for more info.

Q: How hard is it to port it to a new device ?

A: Well, I’ve just separated my code from the N900 specific stuff, so it’s quite easy, there are mainly two functions to write, one to get and one to set the USB address.. two other functions that only return some static result depending on the configuration of the controller (the name of the endpoints, and whether the controller supports high speed or full speed mode).

Read the README file provided with PSFreedom, and check the psfreedom_machine.c file for specifics on what to implement.

Q: How can I port it to a new device.

A: Well, first, you need to figure out what controller your device uses, in the case of the N900, it’s ‘musb’..

Then go to the driver code for that controller (probably in drivers/usb/gadget) and look for ‘SET_ADDRESS’. In the case of musb, it was in drivers/usb/musb/musb_gadget_ep0.c. In there it was setting the address to the USB device, so just copy that code into the psfreedom_machine.c to allow setting the address, and add a similar function to be able to retreive the address.

Then add a function to return 0 or 1 depending on whether the controller supports HIGH, FULL or LOW speed mode (go to usb_gadget_register_driver for your controller, and in the first lines, it should validate the speed argument, it will tell you which ones are acceptable), set LOW speed mode to return TRUE only if FULL speed isn’t available .

Finally, add a function to return the endpoint names.. it will usually be something like ‘epXin’ and ‘epXout’ (where X is the endpoint number), or “epXin-bulk”, etc.. look at how the driver initializes its endpoints or grep for “->name” in the file to find where it sets it…

That should be enough!

Ok this is it for now with the FAQ. Next time, I’ll tell you all about my experience, what problems I encountered and how I fixed them, maybe it will help others!

Enjoy it!

KaKaRoTo

Release libnice 0.0.13

Hello,

Libnice 0.0.13 has just been released..  It’s a small release that fixes a few bugs, cleans the code a bit and makes coverity happy!

Also, this release adds support for IPv6 which now makes the library a bit more universal!

Another important fix was the ‘crc32’ function used internally in libnice which was conflicting with the same symbol in libz.so. After a user reported a crash in libnice when he used it with his application (which was linking to libz.so as well), I realized the conflict and have now renamed the function from ‘crc32’ into ‘stun_crc32’, which now makes libnice safer to use. Hopefully, there won’t be any more similar problem.

If you find issues or bugs with libnice, please report them and we’ll try to fix them for the next release!

As discussed in my previous post, TURN support still isn’t complete for now, and I’m still waiting for some charitable mind to send me a patch for upgrading TURN support in libnice to its latest RFC. Otherwise, you’ll have to be patient until I get some free time!

KaKaRoTo

Release libnice 0.0.12

Hello,

Libnice 0.0.12 has just been released.. It’s not a very important release as it doesn’t add any substantial feature, but it does fix a few nasty bugs, so it’s recommended to update.

The important thing to note is that recently ICE has been standardized and is now known as RFC 5245! This is great news as it means that the spec will stop changing (it actually became stable at draft 19, so we were already safe).

The same thing happened to TURN, which has been standardized as RFC 5766. TURN has been changing a lot lately, so having it as a finalized standard is very good news.

In this release, libnice  has now a NICE_COMPATIBILITY_RFC5245 which should be used instead of the compatibility mode NICE_COMPATIBILITY_DRAFT19. Although the old code should still work since I kept the DRAFT19 symbol for legacy reasons.

The problem now is with TURN.  I never had time to upgrade TURN from the last draft that I implemented (draft 9) and since the specs of TURN kept changing, I didn’t want (nor had time) to keep updating it to meet the spec changes. So the new libnice is compatible with RFC5245 but it doesn’t support the TURN 5766 draft yet. Hopefully, the next release will be compatible with TURN RFC 5766.

If someone wants to contribute to libnice, then implementing the changes to TURN to upgrade it from draft 9 to RFC 5766 would be the first step! Let me know if you want to help.

KaKaRoTo

libnice 0.0.11 Released

Hi,

Today, I’ve released a new version of libnice : 0.0.11.

This is an important milestone for libnice because this is the first version that has support for a reliable transport.

As I explained in my previous post, this version uses a TCP over UDP implementation that is compatible with libjingle’s pseudotcp (it’s actually a copy of it).

The change is very minimal, all you need to do is call nice_agent_new_reliable instead of nice_agent_new and libnice will take care of making your components reliable. You will also need to pay close attention to the return value of the nice_agent_send as well as the reliable-transport-writable signal. But everything else should stay the same.

If you’re interested in the TCPoUDP implementation, you can also use it directly in your application, outside of libnice, as it is now provided as its own class.

The documentation has now been updated, and you can read more about it here.

Let me know if you will be using this much requested feature!

aMSN 0.98.2 to be released without Audio/Video support

Hey,

We (the aMSN team) want to soon release aMSN version 0.98.2 because of the various issues we faced with 0.98.1 because Microsoft changed their protocols.. mainly the problem with the nickname changing to the email at every connection.

We also recently realized that the Audio/Video capability would need to be dropped because it just doesn’t work anymore unfortunately 🙁

Microsoft forced everyone to upgrade to the latest version of Windows Live Messenger : WLM 2009 which uses MSNP18 and has the ability to do Audio/Video calls through a tunneled SIP (P2P SIP messages, not using an external SIP server) and so, they realized that their SIP servers aren’t being used anymore, so they had this great idea of shutting down their servers… the result? aMSN can’t do Audio/Video calls because the SIP server refuses our connections.

Now we have two choices, either use MSNP18, or disable SIP calls completely. Obviously, we can’t move to MSNP18 at the moment, because MPOP support isn’t really ready yet, and because MSNP2PV2 hasn’t been implemented, so we had to remove the Audio/Video support in aMSN SVN for now, and only have it available for those who are brave enough to try out MSNP18.

We will soon release 0.98.2 as it is long overdue now, and we want to let people know why their A/V calls are not available to them anymore.

I hope everybody will understand why this is happening and we won’t get flooded by n00b questions everyday…