gok03 / rosjava

Automatically exported from code.google.com/p/rosjava
0 stars 0 forks source link

InetAddressFactory.newNonLoopback() returns non-wifi network adapter on a phone #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Change android_tutorial_pubsub to use 
NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress()
); instead of NodeConfiguration nodeConfiguration = 
NodeConfiguration.newPrivate();
2. Build android_tutorial_pubsub.
3. Upload and execute it onto a android phone.
4. Start it.
5. Enter the ROS master URI
6. Hit "OK"

What is the expected output? What do you see instead?
App PubSubTutorial should connect to the masters URI and start publishing 
Messages. It should do so and use its wifi ip address in the topics information.

It does connect to the ROS master, but it propagates its UMTS/GSM ip address. 
This is, in my case, vsnet0 instead of wlan0. This ip address is obviously not 
useful for other nodes as they are unable to connect to it.

What version of the product are you using? On what operating system?
Latest rosjava_core and android_core from 10.October 2012Android 4.1.1 . I do 
not know how to extract the exact version info from my installation.

Please provide any additional information below.
vsnet0 is a PointToPoint interface, wlan0 is not. The attached patch checks if 
the first nonLoopback interface is a PointToPoint one. If not it should be the 
desired wifi interface.

Original issue reported on code.google.com by markus.b...@gmail.com on 12 Oct 2012 at 7:10

Attachments:

GoogleCodeExporter commented 9 years ago
Please see http://code.google.com/p/rosjava/issues/detail?id=150 for an updated 
patch for this issue. 

Sorry for opening another issue for the same problem.
Markus

Original comment by markus.b...@gmail.com on 6 Nov 2012 at 2:32