I got the code from macegr so I hope it's ok to post it.. he gave me this link to download the source files..
http://www.macetech.com/wa502_sdk.zip
I haven't changed much from his version, mostly because i have a hard time understanding how all of it works..