Get Your Free Subscription By Email:

Installing and configuring Siriproxy on Raspberry Pi

Combine the awesomeness of Apple's Siri voice recognition capability with ability to tap into it using SiriProxy, and our favorite hacker friendly mini Linux computer Raspberry Pi and we have an excellent voice controlled home automation system which runs 24/7 waiting for voice commands to do assigned tasks. To get this super-geeky project working we need to install and configure SiriProxy on our Raspberry Pi setup, follow the instructions shared below to install SiriProxy on the official Raspbian “wheezy” distribution.

SiriProxy Demonstration

Step-by-step instructions to install, configure and use SiriProxy on Raspberry Pi:

  1. Make sure you are running root.
  2. Make sure you have SSH working with a Static IP.
  3. Since, we will be intercepting DNS queries to Apple Siri Servers make sure we break the looping DNS redirects using
    nano /etc/resolv.conf

    and editing it with following entries - the older entry which should be pointing to your router should be commented or removed :

  4. # Google public DNS servers
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    
  5. Install DNSmasq DNS server which will do the request interception for the hack to work using
    sudo apt-get install dnsmasq

    .

  6. Edit
    /etc/dnsmasq.conf

    file by adding the lines below for intercepting the requests to Apple Siri server and route them through our locally running SiriProxy handler. Make sure you use your RPi static ip instead of [CHANGE_TO_YOUR_RPI_STATIC_IP] shown below.

  7. # Old iOS production Siri server
    address=/guzzoni.apple.com/[CHANGE_TO_YOUR_RPI_STATIC_IP]
    # New iOS beta Siri server
    address=/kryten.apple.com/[CHANGE_TO_YOUR_RPI_STATIC_IP]
    
    DNSMasq
  8. Restart DNSMasq using
    /etc/init.d/dnsmasq restart

    .

  9. Install all the requirements using :
  10. apt-get install ruby build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config -y
    
  11. Now install RVM using
    curl -L https://get.rvm.io | bash -s stable --ruby

    , this will take quite a while.

  12. Update .bashrc using:
    [[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh"
    echo '[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh" # Load RVM function' >> ~/.bash_profile
    . ~/.bashrc
    
  13. Now, we will install and setup Ruby 2.0.0 using :
  14. rvm install 2.0.0
    rvm use 2.0.0 --default
    
  15. Install and setup SiriProxy GEM (package) using :
  16. gem install siriproxy
    mkdir ~/.siriproxy
    
  17. Generate the certificates for our iPhone to fake Apple SSL.
  18. siriproxy gencerts
    
  19. Transfer this certificate to your phone (it will be located at ~/.siriproxy/ca.pem) by emailing it and opening the email on your phone. On the iPhone simply tap the email attachment and follow the prompts to install.
  20. Siriproxy SSL certificate profile
  21. Configure your iPhone WiFi to use our DNSMasq server installed on Raspberry Pi by navigating to Settings->WiFi->[Your WiFi Access Point Name]->DNS, change this to your Raspberry Pi static IP.
  22. DNS config
  23. We are now all set, start siriproxy using :
    siriproxy server

    and it should look like this ready to listen for commands.

  24. Si
  25. To test, launch Siri on your phone and speak test siri proxy. The terminal window running SiriProxy will show activity capturing the request and reply with Siri Proxy is up and running!.
  26. Siriproxy server
  27. To stop the server type CTRL+C at the terminal.

Comments

Thanks for sharing this, I was wondering is there anything similar on Android. I mean "Siriproxy for Android" ?

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.