Open GoogleCodeExporter opened 8 years ago
For PPC I had to change usbmux.py:
diff -r -Bbu --ignore-all-space iphonetunnel-mac-read-only/gui/usbmux.py
iphonetunnel-mac-read-only 2/gui/usbmux.py
--- iphonetunnel-mac-read-only/gui/usbmux.py 2010-01-27 17:42:39.000000000
+0100
+++ iphonetunnel-mac-read-only 2/gui/usbmux.py 2010-01-27 17:10:47.000000000
+0100
@@ -201,7 +201,9 @@
if rlo:
self._processpacket()
def connect(self, device, port):
- ret = self._exchange(self.proto.TYPE_CONNECT,
{'DeviceID':device.devid, 'PortNumber':((port<<8) & 0xFF00) | (port>>8)})
+ if sys.byteorder == "little":
+ port=(((port<<8) & 0xFF00) | (port>>8))
+ ret = self._exchange(self.proto.TYPE_CONNECT,
{'DeviceID':device.devid, 'PortNumber':port})
if ret != 0:
raise MuxError("Connect failed: error %d"%ret)
self.proto.connected = True
Original comment by Christop...@gmail.com
on 27 Jan 2010 at 4:46
Better solution:
socket.htonl(port)
The diff is now:
diff -r -Bbu --ignore-all-space iphonetunnel-mac-read-only/gui/usbmux.py
iphonetunnel-mac-read-only 2/gui/usbmux.py
--- iphonetunnel-mac-read-only/gui/usbmux.py 2010-01-27 17:58:21.000000000
+0100
+++ iphonetunnel-mac-read-only 2/gui/usbmux.py 2010-01-27 17:56:50.000000000
+0100
@@ -201,7 +201,7 @@
if rlo:
self._processpacket()
def connect(self, device, port):
- ret = self._exchange(self.proto.TYPE_CONNECT,
{'DeviceID':device.devid, 'PortNumber':((port<<8) & 0xFF00) | (port>>8)})
+ ret = self._exchange(self.proto.TYPE_CONNECT,
{'DeviceID':device.devid, 'PortNumber':socket.htonl(port)})
if ret != 0:
raise MuxError("Connect failed: error %d"%ret)
self.proto.connected = True
Original comment by Christop...@gmail.com
on 27 Jan 2010 at 4:58
It's htons, of course:
- ret = self._exchange(self.proto.TYPE_CONNECT,
{'DeviceID':device.devid, 'PortNumber':((port<<8) & 0xFF00) | (port>>8)})
+ ret = self._exchange(self.proto.TYPE_CONNECT,
{'DeviceID':device.devid, 'PortNumber':socket.htons(port)})
Original comment by Christop...@gmail.com
on 27 Jan 2010 at 5:09
I have Leopard on PPC and changing
iPhoneTunnel.app/Contents/Resources/usbmux.py in the way described in Comment 3
fixed the "ssh_exchange_identification: Connection closed by remote host" error
Thanks heaps!
Original comment by chy...@googlemail.com
on 1 Dec 2010 at 5:59
heelp. poor guy w/ ibook G4 PPC w/o Airport running osx 10.4 Tiger, and
iPodTouch 1gen needs to put this into practice. Ready modified package would be
greatly appreciated if made available,
also don't know where to replace plistlib.py, found correspinding pyc and pyo
in .../lib/python2.3/plat-mac/ , still don't understand python enough to know
how to proceed.
thaaanx
Original comment by juanflau...@gmail.com
on 22 Aug 2013 at 5:37
Original issue reported on code.google.com by
Christop...@gmail.com
on 27 Jan 2010 at 2:51Attachments: