1

I am using an android app that streams real-time accelerometer data to the specified ip address of a server. I have written a "server" in C running on Linux which is running in VMware.

I am connected to the hotspot created by the Windows7(Host machine) running the VMware Workstation.

So my question is how do I connect the virtual-machine to same network as the hotspot so that I can get the phone and the "server" program on the same network and stream data to the server program?

1 Answer 1

0

You have two options for the VM, you can configure it to use NAT mode or Bridged mode (or Host-only, but we'll ignore it).

In NAT mode, you will need to setup port forwarding in VMWare on the specific port your server application is listening on. Once you've done this, the Android app will use the IP address of the Win7 host machine.

In Bridge mode, your Linux VM will get it's own IP in the same subnet as the Win7 machine and the Android application will point directly to this address.

A good place to start is to determine the IP address of each device and verify they are in the same subnet. For example, a very common subnet for home networks is 192.168.1.XXX. In Bridge mode, make sure you can ping the Android device from the Linux server and vice versa. If you can't do this, don't bother running the server/app until this is resolved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .