0
$\begingroup$

Rosanswers logo

Hello,

I have been trying lately to connect a ROS core in my laptop with a ROS android app on my Galaxy Tab 2. Wi-fi is not possible because we do not have internet in the places where we need to move the robot. So I have tried to connect via USB, as I read that through USB tethering one could confirm this connection. However, I could not succeed in this, as the tablet does connect to the core, but does not appear to the master at the laptop (the topics and nodes from the android app do not appear as they do when using wi-fi).

Is there any more information about how to do this connection via USB? Or maybe through bluetooth, which I didn't find any at all.

Thanks.


Originally posted by hiro64 on ROS Answers with karma: 58 on 2014-11-04

Post score: 2


Original comments

Comment by hiro64 on 2014-11-14:
Through USB I couldn't get it working any way, either through tethering or reverse tethering. WIth Bluetooth, I tried to use the Bluetooth Manager to share a connection from the PC, but also to no avail.

Comment by hiro64 on 2014-11-14:
So I ended up connecting them through a hotspot created by another Android device, without any data connection involved, which finally did work. However, this is not an answer to my question, which was about USB or Bluetooth, so I'll just keep it here as an alternative solution.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

Sounds like you need to check your network configuration to get tethering to work properly. Does the connection show up in ifconfig?

It's possible tethering is disabled/crippled on the tablet by the manufacturer as it was on my Nexus 10, since a tablet doesn't have cellular internet and therefore doesn't need to provide tethering for a typical end-user.

In that case you can check out if the cyanogenmod distribution for your device enables it. If it doesn't, you can build the kernel from source and enable tethering yourself (http://forum.xda-developers.com/showthread.php?t=2047685).

If you get tethering working, you can also setup reverse tethering (http://forum.xda-developers.com/showthread.php?t=2287494). With reverse tethering, your tablet uses the PC as the host, which makes more sense for most use cases with ROS. Automating this to be on connect would involve running some adb shell commands in a script on the pc, triggered by udev.

If you find tethering STILL doesn't work, you can try to get something working with the adb ppp command (http://stackoverflow.com/questions/4565100/how-to-use-adb-ppp), though I found this to be really temperamental and not supported on many devices.


Originally posted by paulbovbel with karma: 4518 on 2014-11-04

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by hiro64 on 2014-11-06:
The connection does show up in ifconfig. I should try your other suggestions, thank you.

Comment by paulbovbel on 2014-11-06:
What's your full network setup. Are the two connected to each other in isolation (i.e. the computer is not connected to any other device)?

Comment by hiro64 on 2014-11-06:
Yes. When I try to tether the tablet with the laptop (Ubuntu), it appears as a Wired Connection. Then I disconnect from the other connections and connect only with this Wired Connection.

Comment by paulbovbel on 2014-11-06:
So, if it shows up in ifconfig, the network connection exists. Your problem probably lies in network setup. If you're tethering, the tablet acts as a dhcp host and assigns an IP address to your pc. Make sure you can ping the pc from the tablet shell and vice versa.

Comment by paulbovbel on 2014-11-06:
If you setup reverse tethering, the guide shows you how to do it with static ips, however you could also setup your laptop to act as a dhcp host.

Comment by hiro64 on 2014-11-11:
So, reverse tethering only worked when the notebook was connected to the internet. Otherwise, the topics simply don't appear to the master, even though the ROS android app does connect normally.

Comment by paulbovbel on 2014-11-11:
i would guess that that's due to something in your network config. I did this on a headless install of ubuntu (so no network manager), and bridged the pc's usb and wifi network interface, letting a router act as the dhcp host, so I didn't exactly follow the guide i linked on the PC side.

$\endgroup$
0
$\begingroup$

Rosanswers logo

What about setting up a WiFi access point or hotspot on your robot an connect your tablet with this access point in a local network (no internet required if you just whish to connect them both)


Originally posted by Wolf with karma: 7555 on 2014-11-04

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by paulbovbel on 2014-11-04:
If you have wifi on your robot, I would suggest running the hotspot on the tablet. Ubuntu hotspots run in ad-hoc mode, which Android does not support connecting to.

Comment by hiro64 on 2014-11-06:
I tried both ways, but it still didn't work. They connect to each other and even show up in the connected devices list, but no nodes or topics from the android device appear to the master at the laptop.

Comment by paulbovbel on 2014-11-06:
You should probably get this option working and get familiar with rosjava before going the usb tethering route, which is more troublesome to config properly.

$\endgroup$
0
$\begingroup$

Rosanswers logo

Hi hiro64, you might want to check my answer here: http://answers.ros.org/question/197629/rosjava-over-bluetooth-android-to-pc-ubuntu/#197812


Originally posted by chris_amelinckx with karma: 61 on 2014-11-21

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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