RPi Using Skypekit
Back to the Hub.
Tutorials - a list of tutorials. Learn by doing.
Guides - a list of informative guides. Make something useful.
Projects - a list of community projects. Help others out.
Tasks - for advanced users to collaborate on software tasks.
Datasheets - a frambozenier.org documentation project.
Education - a place to share your group's project and find useful learning sites.
Community - links to the community elsewhere on the web.
Games - all kinds of computer games.
Sadly, there's no desktop Skype application currently available for the Raspberry Pi. However, Skype do have a Developer Program, and through that program it's possible to get the basic bits & pieces needed to put together a Skype client that will run on the Pi.
SkypeKit is an SDK & set of runtimes provided by Skype to developers who want to create applications with Skype-based functionality.
You can think of a runtime as a 'headless' version of Skype: it's an executable which has no interface, runs on the commandline & connects to the Skype network and provides stuff like contact lists and the ability to make calls. The SDK allows you to write code which talks to the runtime. You're never dealing with the Skype network directly; just manipulating the runtime. When you're developing with SkypeKit, presenting an interface to the user is your responsibility. The core Skype functionality is the runtime's responsibility.
There are a number of runtimes available for various combinations of OS & architecture. Luckily for us, there's a linux-armv7le-eabi runtime which runs on the Pi.
Handily, the SDK also comes with a bunch of example code which lets you do things like chat & make and receive calls on the command-line.
There's a fair bit of footwork required to get to the point where you can get your Pi connecting to Skype. Firstly, most importantly, and the reason that this stuff is currently only useful to developers is the fact that you'll need to sign up to the SkypeKit Developer Program to get the runtime and the application keys needed for its use.
Getting the SkypeKit SDK & runtime
- First, you'll need to sign up to the SkypeKit Developer Program. Visit https://developer.skype.com/signup. Click "Sign in with Skype" and do that thing.
- Once you're signed up to the Developer Program, you'll need to sign up to the "SkypeKit for Embedded" Program to download the runtime for Pi. Go to http://developer.skype.com/account/projects and click the link that says Join for US $5 on the "SkypeKit for Embedded" line in the Programs section. The astute will already have realised that it costs $5.
- Once you're signed up to the SkypeKit for Embedded program, you'll need to create a Project to get the key pair that the runtime requires to run. Visit http://developer.skype.com/account/projects again; you should now see that where the Join for US $5 link was which you used to sign up to the Embedded program, it now says "Create a new project". Click that link and follow the instructions to create a project.
- Once you've created a project, you'll be able to download the SDK, runtime & key pair you need to run a runtime on the Pi. Visit http://developer.skype.com/skypekit/releases. Remember, we're interested in the Embedded runtime for the Pi's ARMv7 chip; at the time of writing, this download is the 4.2.1 for Embedded SDK from the Step 1 section.
- You'll need to request the runtime, since they're built uniquely against a Developer Program account. Click "Request a runtime" in Step 2: Request and download runtimes. We're after a Linux / ARMv7 runtime, so select those in the dropdowns at the column headings in the table which appears. There's a few which can be used; I'm currently working with linux-armv7-skypekit-voicepcm-novideo, so that's as good a choice to make as any at this point.
- Finally, we'll request a key pair. Go back to the project that you created and click "Development key pair". Then click "Request a new key pair" and give it a name (I use dates). Click "Request key pair" after proving you're a human, then "Download the key pair"
- That's it! You now have everything you need to start slapping together a simple Skype-connected app
Building an Audio Host & running an example appNow we've got the SDK, runtime & keyfile, we're ready to start putting things togeher on the Pi. Copy over linux-armv6-skypekit-xxx.gz, linux-armv6-skypekit-xxx.tar.gz, skypekit-sdk_sdk-xxx.tar.gz and the .pem keyfile to a sensible place on your Pi (I made ~/dev/skype and put them there) and uncompress both archives with:
tar xvzf filename.gz
The rest of this guide is all Pi-side, since I'm not quite ready to attempt to get my Mac cross-compiling for the Pi just yet.
The Skypekit ARM runtime needs to connect to an Audio Host at the time that it connects to the Skype network, even if we're not actually interested in making calls (say, using the runtime for chat). An Audio Host is a standalone binary which runs alongside the runtime and provides it with access to audio in & out connections. The Audio PCM Quick Start guide on  gives more detail about this setup, but the practical upshot is that we'll need to compile an Audio PCM Host before we can use any of the services provided by the runtime. To start with, let's build the simplest reference Audio Host provided in the SDK, voicepcmhost-loopback, which as the name suggests, just copies audio data from its input back to its output.
Most of this information is extracted from Skype's Audio PCM Quick Start guide, but this doc seems to lag behind regarding the build system used in more recent versions of the SDK (4.2.1 at time of writing). There's some tidbits of information about the new build system in the Release Notes for 4.2.1, but other stuff I've basically guessed at/worked out through trial & error. YMMV.
- Build voicepcmhost-loopback. Change to the relevant build directory:
cd ~/dev/skype/skypekit-sdk_sdk-22.214.171.124_1379776/reference/voicepcmhost-loopback/build/gmakeand build it:
Hopefully, we should now have a built binary at ~/dev/skype/skypekit-sdk_sdk-126.96.36.199_1379776/reference/voicepcmhost-loopback/build/voicepcmhost-loopback.
Making a test call to the Pi
Let's try putting the whole thing together and making a test call to the Pi. If it works, we'll hear our own voice echoed back to us through the loopback host. You'll need the logins for two different Skype accounts: we'll use on the Pi and one on your desktop. You'll also need Skype installed on your desktop.
- Copy the .pem keyfile to ~/dev/skype/skypekit-sdk_sdk-188.8.131.52_1379776/examples/python/tutorial. We'll use it later to run a test app. Edit ~/dev/skype/skypekit-sdk_sdk-184.108.40.206_1379776/examples/python/keypair.py to reflect the filename of the keyfile.
- Start the ARM runtime in the background:
- Start the Voice PCM Audio Host in the background:
- Move to the folder containing the Python app examples:
- Run the autoanswer.py example. This is a simple Python app which will automatically answer any incoming Skype call and connect it to the loopback Audio Host.
python autoanswer.py <Skype account #1 login> <Skype account #1 password>
- On your desktop, login to Skype with the details for account #2 and place a call to account #1. You should see a whole load of output spill across the Pi's console, including the lines
Incoming call from: <Skype account #2 name>and
<Skype account #2 name> is now live.Say something! You should hear it echo back to you from the Pi. Congratultions! You just made your first Skype call to an instance of SkypeKit running on your Pi.