I encounter the same problem: https://discuss.tvm.apache.org/t/solved-cannot-connect-to-my-android-phone-by-rpc/6370 but i did not find the solution even if it was labeled with the tag[Solved]
These are my environ and relate settings:
TVM_TRACKER_HOST=0.0.0.0
TVM_TRACKER_PORT=9190
First I have started a rpc tracker:
python3 -m tvm.exec.rpc_tracker --host=0.0.0.0 --port=9190
the output is
INFO:RPCTracker:bind to 0.0.0.0:9190
and then I excute in a another terminal:
python3 -m tvm.exec.query_rpc_tracker --host=0.0.0.0 --port=9190
it shows:
Tracker address 0.0.0.0:9190
Server List
------------------------------
server-address key
------------------------------
172.17.0.1:5001 server:android
------------------------------
Queue Status
-------------------------------
key total free pending
-------------------------------
android 1 1 0
-------------------------------
and my pc can ping the phone, my phone can ping the pc too.
it seems like the connection was built well
but when I execute
cd /workspace/apps/android_rpc
python3 tests/android_rpc_test.py
it was stuck.
root@tvm:/workspace/apps/android_rpc/tests# python3 android_rpc_test.py
^CTraceback (most recent call last):
File "android_rpc_test.py", line 130, in <module>
test_rpc_module()
File "android_rpc_test.py", line 58, in test_rpc_module
remote = tracker.request(key, priority=0, session_timeout=60)
File "/usr/tvm/python/tvm/rpc/client.py", line 414, in request
value = base.recvjson(self._sock)
File "/usr/tvm/python/tvm/rpc/base.py", line 118, in recvjson
size = struct.unpack("<i", recvall(sock, 4))[0]
File "/usr/tvm/python/tvm/rpc/base.py", line 81, in recvall
chunk = sock.recv(min(nbytes - nread, 1024))
KeyboardInterrupt
do u have some ideas about these? Thanks a lot.