2

I'm new to the Raspberry Pi and Linux and wanted to install SiriProxy.

I followed the steps in this guide: http://www.idownloadblog.com/2011/12/09/how-to-install-siri-proxy-tutorial-video/

After completing all the steps I was met with an error stating that it could not find eventmachine on the current machine.

When I ran gem install eventmachine -v 1.0.0 as the root user, it returned:

    root@raspberrypi:/var/lib/gems/1.9.1/gems# gem install eventmachine
    Building native extensions.  This could take a while...
    ERROR:  Error installing eventmachine:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb
    /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:2:in `<main>'


    Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-1.0.0 for inspection.
    Results logged to /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/ext/gem_make.out

If anyone has any suggestions at all I would greatly appreciate it, and as I said I am new to this, so explanations for complicated terms would be helpful. :)

EDIT: Alright, I've been able to solve this error by literally just running "bundle" in the /root/SiriProxy/bin/ directory. This happened to install every gem neccessary for SiriProxy. Running "ruby siriproxy server" returned:

root@raspberrypi:~/SiriProxy/bin# ruby siriproxy server
Starting SiriProxy on port 443..
SiriProxy up and running.

Though when sending voice packets from the iPhone(5, non-jailbroken, no VPN, on the same WIFI network) I received this error:

Create server for iPhone connection
/var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/em/connection.rb:411:in `block in start_tls': Could not find /root/.siriproxy/server.passless.key for start_tls         (EventMachine::FileNotFoundException)
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/em/connection.rb:409:in `each'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/em/connection.rb:409:in `start_tls'
    from /root/SiriProxy/lib/siriproxy/connection/iphone.rb:15:in `post_init'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/em/connection.rb:58:in `block in new'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/em/connection.rb:49:in `instance_eval'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/em/connection.rb:49:in `new'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1462:in `event_callback'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run'
    from /root/SiriProxy/lib/siriproxy.rb:16:in `initialize'
    from /root/SiriProxy/lib/siriproxy/command_line.rb:96:in `new'
    from /root/SiriProxy/lib/siriproxy/command_line.rb:96:in `start_server'
    from /root/SiriProxy/lib/siriproxy/command_line.rb:85:in `run_server'
    from /root/SiriProxy/lib/siriproxy/command_line.rb:37:in `initialize'
    from siriproxy:6:in `new'
    from siriproxy:6:in `<main>'

Upon checking the directory in question(/root/.siriproxy/) I found only the config file:

root@raspberrypi:~/SiriProxy/bin# cd /root/.siriproxy/
root@raspberrypi:~/.siriproxy# ls
config.yml
root@raspberrypi:~/.siriproxy# cd /home/pi/.siriproxy/
root@raspberrypi:/home/pi/.siriproxy# ls
config.yml

Searching the filesystem for the file returned no results:

root@raspberrypi:/home/pi/.siriproxy# find / -name server.passless.key
root@raspberrypi:/home/pi/.siriproxy#

Anyone have any idea where I can find these files/resolve this error?

anoadragon453
  • 43
  • 1
  • 6
  • http://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror – Casper Dec 29 '12 at 04:17
  • Thread resolved my original problem, though a new one has popped up specific to SiriProxy. Updated original question with info. – anoadragon453 Dec 29 '12 at 05:23
  • I think you forgot to run command 14 onwards from the tutorial.. – Casper Dec 29 '12 at 05:26
  • Running siriproxy gencerts did generate the neccessary files, thank you, however upon connecting to the server via my iPhone, the error pops up before I even say anything: [link](http://pastebay.net/1168452) – anoadragon453 Dec 29 '12 at 05:46

2 Answers2

0

Not sure how you got to where you are, but I just completed getting SiriProxy running on a RPi from scratch without much trouble. The only problem I had was the known CFPropertyList crash which there is a known fix for. I documented all the steps from scratch including a post for the CFPropertyList fix.

https://github.com/plamoni/SiriProxy/wiki/Installation-How-Tos

If it were me, I would start from scratch from a new RPi SDC image. It also might help to first try getting SiriProxy running on a VM first before you try on an embedded device.

Elvis

Elvis
  • 318
  • 1
  • 2
  • 12
  • Well, I deleted the three partitions from the SD card, reinstalled Wheezy onto the SD card, expanded the partition to fill the card(32GB) and followed every step to a 'T' on you git. When I ran siriproxy server in the SiriProxy directory, I get the familiar "Starting SiriProxy on port 443SiriProxy is up and running.." I then go to my iPhone after changing the DNS setting to the IP address of the Pi, and after saying "Test Siri Proxy", and get the usual Siri's: "Wait, is this a test?" Nothing happens on the Pi's screen, and upon pressing "Ctrl+C" I get this message: http://pastebay.net/1169447 – anoadragon453 Jan 02 '13 at 03:55
  • I assume you installed the certificate on the phone. You also need to either configure your router to perform a transparent DNS redirect or install DNSMASQ and make the appropriate tweaks. Also Siri is known to leak over the cellular connection even when connected to Wifi. Turn off cellular data. Occasionally I've had to toggle airplane mode too. Give those a try. – Elvis Jan 02 '13 at 20:32
  • Don't forget the SiriProxy CFPropertyList fix too, which is posted to the how to instructions: https://gist.github.com/4409751 – Elvis Jan 02 '13 at 20:41
  • I'm not sure what to do. I've turned on Airplane mode and wifi, changed the DNS address. Didn't work. I tried the CFPropertyList fix, even though the error showed no signs of it being and issue, and starting the server shows the same problem. I've edited /etc/dhcp/dhclient.conf, started the server, nothing. I don't believe it's a router issue as I have had SiriProxy running before on a dualboot of windows and ubuntu, which worked just fine. Perhaps it's something specific the raspberrypi must be configured for? I'm at a loss. – anoadragon453 Jan 03 '13 at 01:02
  • I assume you restarted DNSMASQ after edits. Try my RPi image with Siriproxy preinstalled: http://sourceforge.net/projects/siriproxyrpi/ You will have to install and configure DNSMASQ if you are not using the dd-wrt transparent redirect. – Elvis Jan 03 '13 at 01:58
  • Also if you regen the certificates you will have to remove any previous certs and install the new one. I use the same certificate on all my SiriProxy installations. – Elvis Jan 03 '13 at 02:19
  • I installed your RaspberryPi image(which I have to say is much faster to use to get back to a working state than the completely blank image thank you), however when starting siriproxy server I get the same exact error, that being, nothing appearing. I have regenerated the certificates and installed them. I tried plugging the Pi into the ethernet and tweaking the IP address, no luck. I've installed DNSMASQ though after tweaking the config file, still no luck. Could you explain how I would configure my router for a dd-wrt redirect or tweak DNSMASQ properly? I use AT&T Uverse. Is that the reason? – anoadragon453 Jan 04 '13 at 02:02
  • too much to post in a comment. see new answer. – Elvis Jan 04 '13 at 06:58
0

We will get through it, but here are a few things to eliminate possible contributors.

Make sure to connect ethernet and leave it connected when it is booting
- If ethernet is not connected during boot up, the RPi will not configure ethernet.
- The default RPi interfaces file does not include a line to make ethernet restart if the connection is not connected during boot or gets disconnected after boot. auto eth0

try using a ping command to get a response from the RPi once you know what address it should be using ping xxx.xxx.xxx.xxx

Change the /etc/network/interfaces file back to use DHCP
- Comment out the static address lines
- Uncomment out the DHCP lines to look like this

auto eth0
iface eth0 inet dhcp

Reboot the RPi

Once rebooted, determine what IP address your router assigned
- type
ifconfig
- Example

eth0     Link encap:Ethernet  HWaddr 00:11:22:33:44:55   
             inet addr:192.168.69.97  Bcast:192.168.69.255  Mask:255.255.255.0 
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
             RX packets:7015 errors:0 dropped:0 overruns:0 frame:0 
             TX packets:4236 errors:0 dropped:0 overruns:0 carrier:0 
             collisions:0 txqueuelen:1000  
             RX bytes:861497 (841.3 KiB)  TX bytes:849687 (829.7 KiB)

Add a single line to the /etc/dnsmasq.conf default file.
- Example address=/guzzoni.apple.com/192.168.69.97

Restart DNSMASQ
- type sh /etc/init.d/dnsmasq restart

make sure /root/.siriproxy/ca.pem file is on your iOS device

turn off cellular data connection on your iOS device, and leave it off

toggle airplane mode, leave off for at least 5 seconds

on your iOS device, tell it to forget your Wifi connection

reconnect to your Wifi SSID

once connected, tap to the details page of the wifi connection and change only the DNS address to point to the address of he RPI determined above
- Once changed, tap the back button, and tap details again to see the DNS setting is retained.
- You make want to toggle airplane mode and confirm the DNS setting is retained one more time.

sometimes it take a couple of attmepts to get the phone to connect to SiriProxy the first time
- almost like the iPhone has to timeout over the cellular connection first before it will actually try the wifi connection.
- if the first attempt does not immediately start connecting, give it a few seconds, exit the Siri interface and relaunch Siri.
- I think ios 6.0.2 created more problems than it solved, because it was not this troublesome before.

if you get it working at this point, you will want to try configuring the /etc/network/interfaces file to use a static IP address
- Comment out the DHCP lines
- Example (make sure to get the columns lined up and order the same)

auto eth0 
iface eth0 inet static 
       address 192.168.69.97 
       netmask 255.255.255.0 
       broadcast 192.168.69.255 
       network 192.168.69.0 
       gateway 192.168.69.1

if that doesn't work then perhaps you ISP (U-Verse) doesn't like you to use static IP address.

if your router was supplied by ATT, then the dd-wrt transparent DNS redirect is not an option

Elvis
  • 318
  • 1
  • 2
  • 12
  • Not sure what did it, but it works. Thanks so much for your help, you've been very patient. Thanks again! ^_^ – anoadragon453 Jan 05 '13 at 03:24
  • glad it all worked out. two things i recently did was one, updated the firmware on my RPi and tweaked the /boot/config.txt file to use the minimum RAM for the GPU as possible `gpu_mem=16` since I am running it as a headless system. – Elvis Jan 05 '13 at 05:06