[iOS-RPC] Not able to connect RPC tracker on iOS device

Hi Team,

I’m trying to connect iOS device via iOS RPC((https://github.com/apache/incubator-tvm/tree/master/apps/ios_rpc) app and i followed the below steps to connect the RPC tracker.

  1. Opened tvmrpc.xcodeproj by using XCode.

  2. Build and installed the iOS RPC application on the iPhone.

  3. Started RPC tracker from host machine(MAC) using --> “python -m tvm.exec.rpc_tracker --port 9090 --no-fork”

  4. Tried to Connect iOS device to this RPC tracker via the TVM RPC application. Opened the app, set the Address and Port fields to the address and port of the RPC tracker respectively. The key set to be “iphone”.

  5. After pressing the connect to proxy in iOS RPC app i got below error from RPC tracker

    INFO:RPCTracker:bind to 0.0.0.0:9090 WARNING:RPCTracker:Invalid connection from TCPSocket: (‘192.168.1.102’, 50370) lengthe of the message nn 21 b’q\xf2\x0f\x00\r\x00\x00\x00server:iphone’ RPC_TRACKER_MAGIC 193137 ERROR:asyncio:Exception in callback None() handle: Traceback (most recent call last): File “/Users/sony/anaconda3/envs/AutoTVM2/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/Users/sony/anaconda3/envs/AutoTVM2/lib/python3.8/site-packages/tornado/platform/asyncio.py”, line 139, in _handle_events handler_func(fileobj, events) File “/Users/sony/.local/lib/python3.8/site-packages/tvm-0.7.dev1-py3.8-macosx-10.9-x86_64.egg/tvm/rpc/tornado_util.py”, line 38, in _event_handler self._event_handler(events) File “/Users/sony/.local/lib/python3.8/site-packages/tvm-0.7.dev1-py3.8-macosx-10.9-x86_64.egg/tvm/rpc/tornado_util.py”, line 75, in _event_handler if self._update_read() and (events & self._ioloop.WRITE): File “/Users/sony/.local/lib/python3.8/site-packages/tvm-0.7.dev1-py3.8-macosx-10.9-x86_64.egg/tvm/rpc/tornado_util.py”, line 112, in _update_read self.on_message(msg) File “/Users/sony/.local/lib/python3.8/site-packages/tvm-0.7.dev1-py3.8-macosx-10.9-x86_64.egg/tvm/rpc/tracker.py”, line 200, in on_message self._init_conn(message) File “/Users/sony/.local/lib/python3.8/site-packages/tvm-0.7.dev1-py3.8-macosx-10.9-x86_64.egg/tvm/rpc/tracker.py”, line 183, in _init_conn magic = struct.unpack(’<i’, message)[0] struct.error: unpack requires a buffer of 4 bytes

Failed to receive remote confirmation code.

Can you please help me to fix the above issue

Thanks,

Hi @Dileep,

I am getting the same error, were you able to resolve it?

Thanks in advance!

Kuladeep.

Just a guess. It looks like probably you use different versions of rpc_tracker and rpc_server. Did you run iOS RPC and rpc_tracker on the same version of sources?

@echuraev thanks for your reply. Both my rpc_tracker and rpc_server are on the same version of sources. Anything else I might be misssing?