I have an android phone running a client.py and a server.py running in my computer. My computer's ip is set to 192.168.16.7 (running ubuntu 13.04. Did it in the network manager) and my phone's ip is set to 192.168.16.9. I created a wifi hotspot using my phone and tethered my computer to it. This is my server.py:
import socket
s=socket.socket()
port=12345
s.bind(("192.168.16.7",port))
s.listen(5)
while True:
c,addr=s.accept()
print "got connection from ",addr
c.send('Thankyou for connecting')
c.close()
And my client.py is :
import socket
port=12345
s=socket.socket()
s.connect(("192.168.16.7",port))
s.send("Hello world")
s.close
server.py runs in my computer and client.py is in my phone. But when I try to run client.py in the phone, it tells me that the network is unreachable. How do I fix this?