Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Connecting Movo to the Internet #36

Closed
stefie10 opened this issue May 3, 2018 · 12 comments
Closed

Connecting Movo to the Internet #36

stefie10 opened this issue May 3, 2018 · 12 comments

Comments

@stefie10
Copy link

stefie10 commented May 3, 2018

Hi,

What is the preferred way to connect movo to the internet? Since movo2 acts as a dhcp server, it's nontrivial. I worked around it by plugging a USB/ethernet adaptor directly into movo2 (since our cover is off), and doing it that way. This only worked for movo2 of course, and not movo1. I was planning to configure movo2 to act as a gateway to movo1, so movo1 has internet as well.

The purpose of internet access is two-fold: 1) we'd like to be able to run ntpdate or the like on both movo1 and movo2 at each boot to ensure all our machines are using the same clocks. 2) we'd like to be able to install updates on movo1 and movo2.

So a related question is, is it okay to apt-get update apt-get upgrade movo1 and movo2? Have you tested this? I'd like to make sure we are current on security updates etc.

Thank you!

Stefanie

@mattcorsaro1
Copy link
Collaborator

Connecting to the internet was discussed here and here. I never ended up connecting the Movo computers, but I updated them with these instructions.

@stefie10
Copy link
Author

I just wanted to share my solution: we took the top off and installed a USB-ethernet adaptor to movo2. This gives internet to movo2. Then, I configured our lab's router to give the ethernet adaptor a static IP address and hostname, movo2usb. Next I configured our lab's router with a static routing table to send all packets for anything on the 10.66.171.* network to movo2usb. Last of all, I configured movo1's network to use our router for DNS resolution. (movo2 does it by default since it gets a DHCP address from our router.)

In this configuration I get 19hz framerate on /kinect2/hd/image_color. I can ping both movo1 and movo2 from any machine on our lab's lan. And I can get internet from movo1 and movo2 to run apt-get update/apt-get upgrade, as well as ntp.

@martine1406
Copy link
Contributor

martine1406 commented Oct 30, 2018

Hi @stefie10

We see that connecting movo to internet seems to be a of interest for many research teams. Therefore, your post becomes more than interesting.
We would like to have more details on this last step you mention:

Last of all, I configured movo1's network to use our router for DNS resolution. (movo2 does it by default since it gets a DHCP address from our router.)

Did you have to modify the bridge that is done in movo2 between eth0 and wlan0? Or something in movo1's etc/network/interfaces? Or define a route between movo2 and your new ethernet connection provided by the ethernet adaptor? If not, how does movo1 knows about the ethernet adaptor? movo2 receives an IP address that is in the same sub-network as movo2usb via DHCP, but movo1's IP is not in the same subnetwork, so how does it work?

Sorry if this is an obvious question.

@alexvannobel
Copy link
Collaborator

I did something similar to @stefie10 to give Internet access to the MOVO1 computer, in a script I added to the kinetic-devel branch (WIP) :
https://github.com/Kinovarobotics/kinova-movo/blob/kinetic-devel/movo_common/si_utils/scripts/setup_internet_on_movo1
I run it from MOVO2 while it is connected to the Internet with a USB-to-Ethernet adapter and it enables Internet on MOVO1.
It works on Ubuntu 16.04 but I am pretty sure it would work as-is or with very small modifications on Ubuntu 14.04.
Hope this helps!

@ljklonepiece
Copy link

I did something similar to @stefie10 to give Internet access to the MOVO1 computer, in a script I added to the kinetic-devel branch (WIP) :
https://github.com/Kinovarobotics/kinova-movo/blob/kinetic-devel/movo_common/si_utils/scripts/setup_internet_on_movo1
I run it from MOVO2 while it is connected to the Internet with a USB-to-Ethernet adapter and it enables Internet on MOVO1.
It works on Ubuntu 16.04 but I am pretty sure it would work as-is or with very small modifications on Ubuntu 14.04.
Hope this helps!

Hi @alexvannobel , thanks for the solution!

regarding the step "I run it from MOVO2 while it is connected to the Internet with a USB-to-Ethernet adapter and it enables Internet on MOVO1."

i am a bit confused by the "USB-to-Ethernet adapter", the MOVO comes with an ethernet port at its back, we plug in an ethernet cable directly, but this does not give MOVO internet access. Are we doing something wrong?
Could you suggest ways to connect MOVO to internet? we are running on 14.04

fyi, we got the following dmesg after plug in the wifi adapter

1498485567

thanks a lot!

@martine1406
Copy link
Contributor

martine1406 commented Nov 1, 2018

HI @ljklonepiece

@alexvannobel, correct me if I am wrong, but the reason for the USB-to-Ethernet adapter is that we want to add an Ethernet connection to movo2, without changing the configuration on the existing Ethernet connections. The RJ45 connector behind movo is intended to communicate with movo via Ethernet. In this case, movo2 is configured to attribute an IP address to your remote computer via DHCP (acts as the DHCP server). This RJ45 connector is wired internally to a switch. movo1 and movo2 are also connected to this same switch. movo2 sees this connection to the switch as eth0, and exposes a bridge between eth0 and wlan0 (the wi-fi connection it emits).

Now, with the USB-to-Ethernet adapter, we create a new eth1 connection. The script @alexvannobel has done configures movo2 to route the packets destined to the internet towards the eth1 connection, and configures movo1 to use movo2 as its default gateway and 8.8.4.4 (which is a DNS from google).

It may be possible to use the RJ45 connector behind movo to connect to the internet, but I would expect that movo2's DHCP server configuration on its eth0 connection would need to be changed. For e.g., if we change that for movo2 to become a DHCP client, movo1 might have trouble communicating with movo2 because it will not know the IP address attributed to movo2. I just feel that @alexvannobel's solution does not interfere with the current configurations in movo (it is just an add-on), so it seems simpler and safer.

let me know your thoughts

@ljklonepiece
Copy link

Hi @martine1406 ,

thank you for the detailed reply and explanations, it makes more sense to us now.
We finally are able to connect movo2 to the internet first via usb-ethernet adapter (take off the top lid and plug in a usb slot on the intel NUC. with internet connection, we are able to install drivers for our usb-wifi adapter, and now movo2 is connected to internet with wifi.

the script by @alexvannobel route packets to ethernet connection
My next question is how to configure movo2 to route packets towards wifi connection so that any other pcs on the same local network is able to echo rostopics from both movo1 and movo2?

Thanks a lot!

@martine1406
Copy link
Contributor

Hi @ljklonepiece

Good news. I am unfortunately not an expert at this matter, but here are my general thoughts (maybe @alexvannobel or @sparadiskinova could complete/correct the answer):

  1. connect a usb to wifi adaptor instead of the usb to ethernet adaptor
  2. again movo2 will have internet by default
  3. modify the script by @alexvannobel to route packets to the wlan1 connection instead of eth1
    (sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE)

Have you tried this?

@ericrosenbrown
Copy link

@martine1406 I tried the steps you listed out 6 days ago, but it did not help us get internet for movo1. We are able to shh into movo1 from movo2 and movo2 has internet, but running the script by @alexvannobel did not get movo1 internet, nor did making your modifications help give it internet. Is there any thoughts on what we should do to get movo1 internet? Our movo2 is on 16.04 with kinetic, and our movo1 is 14.04 with indigo.

Thanks!

@martine1406
Copy link
Contributor

Hi @ericrosenbrown

First of all, I would clearly recommend that both your movos run the same OS. Can you put both movo computer on Ubuntu 14.04 (what I would recommend for now) or 16.04 (if you feel like using the kinetic-devel branch in trial mode)
From the information you give, I have no idea why the movo1 computer would not be able to access the internet using @alexvannobel's script. @alexvannobel, do you have any specific recommendation on running your script?
I can check tomorrow if one of us can retest that script on our movo demo unit.
Any other indication you could give us that could help with the debug?

@ericrosenbrown
Copy link

@martine1406 We want both of our movo computers to be 16.04. They were initially both on 14.04, so we first started up with upgrading movo2 to 16.04, and then wanted to upgrade movo1 to 16.04, but were unable to do that without connecting movo1 to the internet, which is what we're trying to solve.

We tried running the script but were unable to get any internet working.

For other indications: We are able to ping movo1 from movo2, and vise versa (as you may expect since we're able to ssh into movo1). Movo2 is able to get internet, but movo1 is not.

Any thoughts on what we should do? Thanks!

@martine1406
Copy link
Contributor

Hi @ericrosenbrown

Oh ok, yes I get it. Have you tried the tips provided by Alex on issue #55?

@alexvannobel alexvannobel pinned this issue Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants