How to run listener.cpp on PC to receive message from Android (using Rosjava)?
The goal is to send message from Android and receive it on my PC. My idea is to use this tutorial to build a package on PC containing an executable "listener". Then I write an android application based on rosjava. and set the MasterUri to PC (which is http://192.168.13.7:11311) my code is like this:
String hostLocal = InetAddressFactory.newNonLoopback().getHostAddress();
String hostMaster = "192.168.13.7";
URI uri = URI.create("http://" + hostMaster + ":" + "11311");
NodeConfiguration nodeConfigurationTalker = NodeConfiguration.newPublic(hostLocal, uri);
talker = new Talker;
nodeRunner.run(tistener, nodeConfigurationTalker);
Then I started roscore on PC and talker on android AVD (target 10), remembering to
export ROS_MASTER_URI=http://localhost:11311 and export ROS_IP=192.168.13.7.
but then there occurs this error
java.lang.RuntimeException:java.net.ConnectException:10.0.2.15/10.0.2.15:58353 - Connection refused
roswtf suggests Could not connect the android Node. and of course i couldn't receive anything on my pc...
I wonder what could be the cause. Do I need to set up anything else to combine c++ and rosjava? what could be the correct network setup? Is there any tutorial which is intended for communication between android and PC? The android_tutorial_pubsub builds its roscore in android itself.