Resolving multiple network adapters on a phone #147
Description
Original author: [email protected] (October 12, 2012 19:10:07)
InetAddressFactory.newNonLoopback() returns non-wifi network adapter on a phone
What steps will reproduce the problem?
- Change android_tutorial_pubsub to use NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress()); instead of NodeConfiguration nodeConfiguration = NodeConfiguration.newPrivate();
- Build android_tutorial_pubsub.
- Upload and execute it onto a android phone.
- Start it.
- Enter the ROS master URI
- 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: http://code.google.com/p/rosjava/issues/detail?id=147