views:

60

answers:

1

Hello,

I am playing around a bit with peer-to-peer communication with android devices.

I have written a basic program that creates a listening ServerSocket on each phone using the application. Using the application you can also connect to other devices that is listening, by connecting to the remote ServerSocket. Nothing strange about that.

My problem is that it seems that the listening port is not open for connection on different devices. I can connect to my HTC Desire, works like a charm. But connecting to a HTC Hero I get timeout, same if I try to connect to the emulator. But connection FROM the emulator to the Desire and FROM the Hero to the Desire works like a charm. Whats up with this? No security apps is installed and both devices(and the emulator) is running 2.1.

A: 

I'm not sure about the enulator, but the issue with the real devices may be network operator related. Most network operators assign private IP adresses to cell phone terminals, making it impossible to connect to them from the "real internet". Is it possible that you are using different operators for your Desire and for the Hero? Perhaps the Hero works, if you try it with the SIM card from the Desire?

jarnbjo
Yeah, I have thought about that. I am using different operators on the phones. And I noticed that I cant ping the Hero. I will try to switch operators and see if it works.
James Ford