0
$\begingroup$

Rosanswers logo

I'm working with an android app that runs a node that publishes a ros message to use elsewhere. For some unknown reason, MasterChooser only connects to roscore when it's running on one of two machines. If roscore is running on any other machine on the same network, MasterChooser cannot connect to it. We tried assigning a static IP to one of them in case the router was doing anything weird but nothing has helped.

What could be causing this/how do we fix it?


Originally posted by Nick30075 on ROS Answers with karma: 11 on 2017-10-03

Post score: 0


Original comments

Comment by gvdhoorn on 2017-10-03:
Please check you have a working DNS setup for all involved hosts (ie: all hosts can ping each other by name, not IP).

Comment by Nick30075 on 2017-10-03:
There does appear to be an issue with the tablet's DNS. I'll have to talk to our IT guy about it. Thanks.

Comment by Nick30075 on 2017-10-05:
We've set up the tablet properly, gave it a static IP, and tried two different DNS servers. The issue persists. Any ideas?

Comment by gvdhoorn on 2017-10-06:
I'm not sure how rosjava does this internally, but with "working DNS setup" I meant that all your hosts can resolve each others names. Is that true for the tablet and all potential master machines?

Comment by Nick30075 on 2017-10-06:
We tried it with two DNS servers and it's true one way (master can resolve tablet name but tablet cannot resolve master name). It looks like we might have to screw with the tablet to get root on it. I'll talk to our OS guy and see what he can do.

Comment by gvdhoorn on 2017-10-06:
I don't think it should be that difficult: DNS servers are external to your device anyway and the only thing that is needed is for the tablet to be able to resolve the DNS name of the master machine to an IP and vice-versa. The same for the master machine.

But this is only important if this is ..

Comment by gvdhoorn on 2017-10-06:
.. the actual problem.

It's easy to get overly focused on one particular aspect. We're not even sure this is the problem.

Comment by Nick30075 on 2017-10-06:
Yeah, we tried it with google's DNS server and our router's own DNS server and it didn't work. I read in a generic android thread that the device needs other devices set in its own /etc/hosts for DNS to work properly. We're going to try that to diagnose this but it won't be until next week.

Comment by gvdhoorn on 2017-10-07:
Your IT support should know, but most routers allow you to add local devices to the DNS db in some way. As long as you're on the same net, that should work, no need to change anything on the tablet.

But again: this is only important if it's the actual cause.

Comment by Nick30075 on 2017-10-09:
Okay, we tried with another DNS setup and it didn't work.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As @gvdhoorn points out in the comments, this sounds like a typical networking problem. Are you using hostnames or IP addresses in the master chooser? From the network point of view, you need your Android device to be able to resolve the address of the master you are trying to connect to.

I'd suggest you to see the console output using adb to know more about your problem; it's a bit hard to tell where the problem is without more information. To do so, install adb, and run adb logcat from your terminal, with the Android device connected via USB.

Note that the USB has to be enabled for debugging purposes in the Android device to do this: https://www.kingoapp.com/root-tutorials/how-to-enable-usb-debugging-mode-on-android.htm.


Originally posted by jubeira with karma: 1054 on 2017-10-10

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.