Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Create server for iPhone connection #153

Closed
FernandoGStocco opened this issue Dec 6, 2011 · 28 comments
Closed

Create server for iPhone connection #153

FernandoGStocco opened this issue Dec 6, 2011 · 28 comments

Comments

@FernandoGStocco
Copy link

whenever I activate rvmsudo siriproxy server i get this (just want to enforce the fact that my mac's dns is NOT the one I'm pointing my iPhone to and i have iPhone correctly pointed to Mac's internal IP. screenshots: http://twitpic.com/7paouy http://twitpic.com/7paooj and http://twitpic.com/7paoj7):

mac-mini-de-paulo-neto:siriproxy Fernando.$ rvmsudo siriproxy server
Password:
Starting SiriProxy on port 443..
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fea9227d5b0 @Signature=3, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fea9227d330, @zip_stream=#Zlib::Deflate:0x007fea9227d308, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fea91842000 @manager=#<SiriProxy::PluginManager:0x007fea9227ccc8 @plugins=[...]>>]
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fea91841cb8 @Signature=4, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fea918418d0, @zip_stream=#Zlib::Deflate:0x007fea91841830, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fea9183f530 @manager=#<SiriProxy::PluginManager:0x007fea918406d8 @plugins=[...]>>]
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fea9183edd8 @Signature=5, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fea9183e950, @zip_stream=#Zlib::Deflate:0x007fea9183e900, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fea9183c948 @manager=#<SiriProxy::PluginManager:0x007fea9183dd70 @plugins=[...]>>]
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fea9183c308 @Signature=6, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fea9183c0d8, @zip_stream=#Zlib::Deflate:0x007fea9183c088, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fea918399f0 @manager=#<SiriProxy::PluginManager:0x007fea9183ab70 @plugins=[...]>>]
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fea91839248 @Signature=7, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fea91838e88, @zip_stream=#Zlib::Deflate:0x007fea91838e60, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fea91836b60 @manager=#<SiriProxy::PluginManager:0x007fea91837e48 @plugins=[...]>>]
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fea91836750 @Signature=8, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fea91835e90, @zip_stream=#Zlib::Deflate:0x007fea91835d78, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fea91833fa0 @manager=#<SiriProxy::PluginManager:0x007fea91834ef0 @plugins=[...]>>]

@Enophi
Copy link

Enophi commented Dec 6, 2011

Exactly the same issue...

@dcinzona
Copy link

dcinzona commented Dec 6, 2011

Your mac resolves guzzoni.apple.com correctly or no?
Your phone should resolve to your mac, and I think your mac needs to resolve to the real server.
Can you ping guzzoni.apple.com on both devices (and let me know what the IP's are)?

@ianb821
Copy link

ianb821 commented Dec 6, 2011

Same here, any help would be great.
I can have it running perfectly using the old method which uses start.rb to start up the proxy server, but when tried to do it the new way shown in the tutorial I get that error. I just tried reverting back to the old way and it works like a charm every time, so I'm not sure what the difference would be.

@plamoni
Copy link
Owner

plamoni commented Dec 7, 2011

We see similar output from certificate errors. If you're 100% sure your DNS is set up properly, then make sure your certificates are properly generated and the ca.pem is installed on your iPhone.

@FernandoGStocco
Copy link
Author

As soon as I'm home I'll try pinging guzzoni.
About ca.pem, I installed on my phone the certificate created with "My Fake CA" method because there was no clear answer as to why ca.pem would be empty when generated by siriproxy gencerts.

@ianb821
Copy link

ianb821 commented Dec 7, 2011

I had a similar error. When I used the SiriProxy gencerts method and sent the ca.pem to my phone as I had done before, I got an error "This profile contains no information" or something to that effect. When I checked the file, it's size was 0 bytes, so I retried with the same result. I tried using the old way of creating the 'My Fake Ca' and replacing it with the empty file, but I'm still getting the same results.

@ianb821
Copy link

ianb821 commented Dec 7, 2011

I just got home and started from scratch again. when I generated the certs, the ca.pem file was still 0 bytes, so I just went through the old method and replaced all the files in the ./siriproxy/ folder and it works fine, still not sure what was going on with the gencerts command, but it's up and running!

@sudoname
Copy link

sudoname commented Dec 7, 2011

i got this far on my mac air and i am thinking about going Ubuntu but i wanna give the certs one more try... ca.pem is 0 byte will my fake ca is 4KB. does anyone know why?
BTW my server is set up correctly, i can ping guzzoni.apple.com from both my devices and it even gives my MACs IP when i put nslookup guzzoni.apple.com 127.0.0.1 from my computer. i have narrowed it down to my certs.... so any one know what to do from here?

thanks

@muhkuh0815
Copy link

i copied the certs from ubunto to my mac, works fine

@dcinzona
Copy link

dcinzona commented Dec 7, 2011

You are using the wrong version of openssl

@FernandoGStocco
Copy link
Author

My Mac does not not resolve guzzoni.apple.com correctly. 100% packet loss

@dcinzona
Copy link

dcinzona commented Dec 8, 2011

Theres your problem

@sudoname
Copy link

sudoname commented Dec 8, 2011

check your dnsmasq.conf and make sure /address=guzzoni.apple.com/"IP" is the same as your computer IP address. if you cant "talk" to guzzoni, then this wont work. good luck

@plamoni
Copy link
Owner

plamoni commented Dec 10, 2011

sudoname: nslookup guzzoni.apple.com 127.0.0.1 on your Mac should return the REAL address for guzzoni, not the fake one. If it returns the fake one, you'll get a loop as described above.

@sudoname
Copy link

thanks @plamoni , its been working for a long time now... my new problem is the creation of the *.rb files in the plugins. i can't get the plugins i created to work cos i can't figure out how to generate the executable files. thanks pete

@dcinzona
Copy link

where does it fail? running siriproxy bundle will gemify the plugins.

@sudoname
Copy link

i just wrote this (to show the error i am getting) i have not looked for coding error i, i just want it to run so i can debug it.

oh and "siriproxy-wayne" is a folder in that exact location.... Thanks

Abayomi:bin newuser$ rvm use 1.9.3-p0 --default
Using /Users/newuser/.rvm/gems/ruby-1.9.3-p0
Abayomi:bin newuser$ ./siriproxy bundle
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Fetching source index for http://rubygems.org/
Could not find gem 'siriproxy-wayne (>= 0) ruby' in source at /Users/newuser/.rvm/gems/ruby-1.9.3-p0/gems/siriproxy-0.3.0/plugins/Siriproxy-wayne.
Source does not contain any versions of 'siriproxy-wayne (>= 0) ruby'
Abayomi:bin newuser$

@dcinzona
Copy link

Can you share the source for the plugin or no? Specifically the gemspec
and the config.yml

@sudoname
Copy link

this is the one i just wrote to illustrate the point
here is the config.yml component

  • name: 'Wayne'
    path: '/Users/newuser/.rvm/gems/ruby-1.9.3-p0/gems/siriproxy-0.3.0/plugins/Siriproxy-wayne'

gemspec
$:.push File.expand_path("../lib", FILE)

Gem::Specification.new do |s|
s.name = "siriproxy-Wayne"
s.version = "1.0"
s.author = ["sudoname"]
s.email = [""]
s.homepage = ""
s.summary = %q{to hear siri talk}
s.description = %q{siri talks! }

s.rubyforge_project = "siriproxy-Wayne"

s.files = git ls-files.split("\n")
s.test_files = git ls-files -- {test,spec,features}/*.split("\n")
s.executables = git ls-files -- bin/*.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

@dcinzona
Copy link

This may not be your issue, but I found that replacing:

s.files = git ls-files.split("\n")
s.test_files = git ls-files -- {test,spec,features}/*.split("\n")
s.executables = git ls-files -- bin/*.split("\n").map{ |f|
File.basename(f) }
s.require_paths = ["lib"]

with:

s.files = git ls-files 2> /dev/null.split("\n")
s.test_files = git ls-files -- {test,spec,features}/* 2> /dev/null.split("\n")
s.executables = git ls-files -- bin/* 2> /dev/null.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

allowed me to build the plugin successfully. (note the
2>/dev/null`.split("\n")


sudoname
mailto:reply@reply.github.com
December 10, 2011 3:14 PM

this is the one i just wrote to illustrate the point
here is the config.yml component

  • name: 'Wayne'
    path:
    '/Users/newuser/.rvm/gems/ruby-1.9.3-p0/gems/siriproxy-0.3.0/plugins/Siriproxy-wayne'

gemspec
$:.push File.expand_path("../lib", FILE)

Gem::Specification.new do |s|
s.name = "siriproxy-Wayne"
s.version = "1.0"
s.author = ["sudoname"]
s.email = [""]
s.homepage = ""
s.summary = %q{to hear siri talk}
s.description = %q{siri talks! }

s.rubyforge_project = "siriproxy-Wayne"

s.files = git ls-files.split("\n")
s.test_files = git ls-files -- {test,spec,features}/*.split("\n")
s.executables = git ls-files -- bin/*.split("\n").map{ |f|
File.basename(f) }
s.require_paths = ["lib"]


Reply to this email directly or view it on GitHub:
#153 (comment)

@dcinzona
Copy link

I dont know why it decided to wrap the code...

Replace:

s.files = git ls-files.split("\n")
s.test_files = git ls-files -- {test,spec,features}/*.split("\n")
s.executables = git ls-files -- bin/*.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

with:

s.files = git ls-files 2> /dev/null.split("\n")
s.test_files = git ls-files -- {test,spec,features}/* 2> /dev/null.split("\n")
s.executables = git ls-files -- bin/* 2> /dev/null.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

@sudoname
Copy link

thanks i got that lol...
can you explain this line?
class SiriProxy::Plugin::Wayne < SiriProxy::Plugin

thanks

@dcinzona
Copy link

I'm not a big Ruby coder but I'm going to assume that is classifying the script as s SiriProxy plugin.

I defer to those ruby devs out there.

Did the bundle work after that change?

@sudoname
Copy link

No it didn't but thanks

Sent from my iPhone 4S

On Dec 10, 2011, at 3:05 PM, Gustavo Tandeciarz reply@reply.github.com wrote:

I'm not a big Ruby coder but I'm going to assume that is classifying the script as s SiriProxy plugin.

I defer to those ruby devs out there.

Did the bundle work after that change?


Reply to this email directly or view it on GitHub:
#153 (comment)

@dcinzona
Copy link

hmm... crappy. Sorry man, I'd have to look at your setup to be able to troubleshoot better...
The plugin setup right now is kind of a PITA to figure out, huge learning curve, but once you get it figured out for your configuration, it's not so bad.

@pengas
Copy link

pengas commented Dec 12, 2011

hey guys,

i'm running siri against siriproxy on a mac book air.

from my mac i can telenet to guzzoni over port 443 fine. i modified the hosts file on the iphone to route to my mac and portscan and safari both show that it works okay.

however, when i launch siri - no data is passed and siri apologizes for having trouble connecting to the network.

next step is to try this with an iphone 4s and if that doesn't work - sniff packets in the network to see what's going on...

any thoughts would be great.

cheers.

@FernandoGStocco
Copy link
Author

@pengas have you modified com.apple.assistant.plist to talk to guzzoni.apple.com instead of cd-team's servers?

@pengas
Copy link

pengas commented Dec 12, 2011

@FernandoGStocco no i did not. before your comment i had realized i need to add siri.cd-team.org to my /etc/hosts on the device. once i did that the server responded, though i get out the debug message:

Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x007fab540a2510 @Signature=13, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#Zlib::Inflate:0x007fab540a2088, @zip_stream=#Zlib::Deflate:0x007fab540a2038, @consumed_ace=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x007fab5409fcc0 @manager=#<SiriProxy::PluginManager:0x007fab540a0ee0 @plugins=[...]>>]

i did reach out to /private/var/mobile/Library/Preferences/com.apple.assistant.plist and updated the hostname field.

now after reboot of both device and server siri just hangs forever and the server is not getting any requests...

when running a network utility from the device against both siri.cd-team.org and guzzoni.apple.com the siriproxy server responds...

thoughts?

@plamoni plamoni closed this as completed Mar 8, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants