Michael
Michael

Reputation: 8709

2 Way Communication with Android Phone and PC via Internet

I am trying to control a Remote Control Car with an Andriod Phone from my PC (over 3g internet)

I'm planning on using a ioio (Which is just a board that I can plug into a andriod phone via USB)

The part I am working on now is the communication from my PC to my Andriod App. I've never made Andriod apps before and I'm a amateur C# developer.

At the moment I am planning on communicating via UDP as I can create a UDP server/client in Java easy enough. (http://systembash.com/content/a-simple-java-udp-server-and-udp-client/)

However I think this may require a public IP address? Which I will not have either on my client or server.

So for simplicty sake, How would you commucicate over the internet between 2 JAVA applications. If you need to stream video from a camera and simple commands.

Upvotes: 3

Views: 1763

Answers (1)

Wyzard
Wyzard

Reputation: 34563

You don't necessarily need a public IP, you just need some sort of IP with which one device can send packets to the other. For example, you could connect the phone to your home wifi network, and use the private IPs (typically 192.168.1.x) of the two devices.

If you need the phone to be on 3G, and your PC is behind a NAT router (which is typical), then you'll need to forward a port to your PC — this is a configuration setting on the router — and then have the phone connect to that port on your router's public IP.

Upvotes: 1

Related Questions