-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update connecting-to-the-internet-via-usb.md #306
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. There are a few things I would like to fix before we merge it.
Also see #39. It is basically the same thing as what is being added here, but was never finished. It is quite a bit out of date, but there may be some useful info there.
3. Set default Linux network settings: "Wireless and Networks" > "All Network Connections" > "Wired" > | ||
"IPv4" > "Change" > "Load Linux Defaults". The EV3 should get address 10.42.0.3, gateway 10.42.0.1. | ||
|
||
4. Verify if the EV3 is recognized by your Linux PC: "lsusb" should show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use single backtick instead of quotes for lsusb
@@ -135,6 +135,75 @@ If you are using an older version, please upgrade. | |||
|
|||
{% include /util/screenshot.html source="/images/brickman/wired-status-online-connect-automatically-selected.png" %} | |||
|
|||
|
|||
* {: tab="Debian_commandline"}{% include /style/icon.html type="info" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There doesn't seem to be anything Debian-specifc here. Maybe we could just call this "linux_command_line"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right.
|
||
* {: tab="Debian_commandline"}{% include /style/icon.html type="info" %} | ||
These instructions were written using Debian look-alikes for those wanting to know what happens under the hood. | ||
The commands need to be executed by or as root. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"by or as" seems redundant. One or the other is sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as = sudo
|
||
2. Verify that USB tethering is disabled: "Wireless and Networks" > "Tethering. | ||
|
||
3. Set default Linux network settings: "Wireless and Networks" > "All Network Connections" > "Wired" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with the rest of the website, use italics for name of things printed on the screen.
*Wireless and Networks > All Network Connections > Wired*
Also, a screenshot here would be nice. We may have some existing ones that can be reused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean screenshots of how to navigate through ev3dev's menus?
|
||
4. Verify if the EV3 is recognized by your Linux PC: "lsusb" should show | ||
|
||
`Bus 001 Device 002: ID 0525:a4aa Netchip Technology, Inc. Linux-USB CDC Composite Gadge (Ethernet and ACM)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent 4 extra spaces instead of using single backtick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #307, we'll be able to use code fences, so let's replace this with a fence and not remove the fences in other places. Fences are much more readable than indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fences are much more readable than indentation.
I disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it really doesn't make a difference in normal text, in lists I find it very hard to identify code formatting when it's space-indented. I think that code fences make it much easier to quickly identify the code in an indented list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In lists, it is still indented 4 extra spaces from the list text, so it looks exactly the same as normal text to me.
And regardless of any opinions on which is "better", the rest of the website uses indents, so I would like to stay consistent with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, indented code is a pain to edit, especially in lists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've changed my mind (c.f. #308).
In this pull request though, I would like to have a blank line before the start of each code fence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In lists, it is still indented 4 extra spaces from the list text, so it looks exactly the same as normal text to me.
It's extremely difficult to differentiate between sub-bullets, indented additional lines, and code blocks; they all are indented in the same way. Using indentation for code blocks is an unnatural use of whitespace, and as a result it conflicts with all the other uses of whitespace.
And regardless of any opinions on which is "better", the rest of the website uses indents, so I would like to stay consistent with that.
argumentum ad antiquitatem. "It has always been done this way" isn't a reason to continue doing it; switching to code fences is trivial and something that I would happily put in the work for now that we have that ability.
How so?
Because you must maintain the indentation. Every line must be prepended with four spaces, so not only do you need to add the spacing before every line, but you also need to mess with indentation when copy-pasting code. This is especially difficult in GitHub's online editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it looks like GitHub has decided not to auto-load comments on review threads 😆 Sounds good.
`# ifconfig enp0s2f1u5 10.42.0.1 netmask 255.255.255.0 up` | ||
|
||
8. Verify if you can ping the EV3: | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent 4 extra spaces instead of using code fence
connection which you want to make available to your EV3, there is more that needs to be done. | ||
|
||
10. Allow your system to forward IP traffic (given eth0 carries your internet connection): | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
# echo 1 > /proc/sys/net/ipv4/ip_forward | ||
``` | ||
(to make this permanent, add "net.ipv4.ip_forward=1" to /etc/sysctl.conf) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
|
||
11. Assign a name-server (eg. google-public-dns-a) to your EV3 (you need to be logged in on your EV3 as root): | ||
|
||
`# echo "nameserver 8.8.8.8" > /etc/resolv.conf` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use ConnMan on the EV3 for network management. It will write over any changes made manually to /etc/resolv.conf
. Instead a step should be added after step 3 that explains how to set the DNS using Brickman.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some reading about connman (does it sound like con-man?), tried in vain to get it to do what I wanted, and disabled it. Now, ev3dev nicely configures the network the way I tell it to in /etc/network/interfaces and /etc/resolv.conf.
12. Verify if you can ping that nameserver: | ||
|
||
`# ping 8.8.8.8` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a step where you press the Connect button for the network connection on the EV3? When you do this, it will say "Online" on the screen, which verifies that DNS resolution is working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite right, after selection of the "Load Linux Defaults", but possibly because of the manual interventions, the state remains "Connected", even though I can "apt-get upgrade".
Hallo David, |
Forgot an elementary part of this exercise: loading the g_cdc module.
I am sorry that this makes you angry. I hope that you are willing to complete this work so that other people will not have to be frustrated like you are now. |
Just found the answers to my offline and preview questions in the README.md. What a strange name for that document. Why is it called "README.md"? |
Because that is the convention across GitHub and the broader software-development world. The expectation is that you will "read it" (hence "read me") to get important information on the project you are looking at. GitHub extends that basic idea to render the README as the home page of your repository. I would recommend getting into the habit of reading the opening paragraph of every README that you see on GitHub, because it'll probably answer most of your questions about the project. |
Sorry about that, WasabiFan, this is probably not the right place, but I was only making fun of myself. |
Nothing went wrong. The submitter just did not make time to address the review comments. You have already done this (thank you), so there is nothing to worry about. |
@dlech can you take another pass at this now that your review has been addressed? |
|
||
1. Booting with a standard ev3dev image, lsusb will show | ||
|
||
`Bus 002 Device 008: ID 0694:0005 Lego Group` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be using code fence. e.g.
```
Bus 002 Device 008: ID 0694:0005 Lego Group
```
|
||
10. Assign the gateway address to the EV3 network device: | ||
|
||
`# ifconfig enp0s2f1u5 10.42.0.1 netmask 255.255.255.0 up` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code fence
13. Allow your system to forward IP traffic (given eth0 carries your | ||
internet connection): | ||
|
||
`# echo 1 > /proc/sys/net/ipv4/ip_forward` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code fence
14. Assign a name-server (eg. google-public-dns-a) to your EV3 (you need | ||
to be logged in on your EV3 as root): | ||
|
||
`# echo "nameserver 8.8.8.8" > /etc/resolv.conf` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in my previous review, ev3dev uses ConnMan for network management. It will write over /etc/resolv.conf
, so I don't thing manually editing it is a good idea. Instead, I think it would be better to set the nameserver using Bricman at the same time we are setting the manual configuration above.
|
||
15. Verify if you can ping that nameserver: | ||
|
||
`# ping 8.8.8.8` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, as in my previous review, I mentioned that it is possible to see the connection status using Brickman. It would save the steps of having to log in to the EV3 in order to complete this tutorial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. In that case we can drop steps 1 to 15.
|
||
4. Connect the USB cable to your computer and its mini-B plug to the EV3 (slot marked "PC"). | ||
|
||
5. Verify that USB tethering is disabled: *"Wireless and Networks" > "Tethering*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer no quotes on *Wireless and Networks > Tethering*
If you insist on quotes, you are missing one at the end of Tethering
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could also be more clear that we are now using the EV3, not the host computer.
|
||
5. Verify that USB tethering is disabled: *"Wireless and Networks" > "Tethering*. | ||
|
||
6. Set default Linux network settings: *"Wireless and Networks" > "All Network Connections" > "Wired" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, prefer no quotes here
The commands need to be executed by root. | ||
{:class="alert alert-info"} | ||
|
||
1. Booting with a standard ev3dev image, lsusb will show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not clear if lsusb
should be run on the EV3 or the host computer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should give some credit to the people interested in this subject: they would not expect to see the EV3 when lsusb would be run on the EV3. Moreover, before step 12 it is not possible to enter an OS command on the EV3. But I'll try to add this to the introduction, along with Debian version etc.
|
||
I'll be using the EV3 as a USB Gadget, as follows. | ||
|
||
2. When you've copied the ev3dev's image to the SD-card, mount the second partition (EV3DEV_ROOTFS). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we doing this? ev3dev already sets up a gadget driver by default. Does it not work for you?
@@ -135,6 +135,99 @@ If you are using an older version, please upgrade. | |||
|
|||
{% include /util/screenshot.html source="/images/brickman/wired-status-online-connect-automatically-selected.png" %} | |||
|
|||
|
|||
* {: tab="linux_command_line"}{% include /style/icon.html type="info" %} | |||
These instructions were written using Debian look-alikes for those wanting to know what happens under the hood. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention the exact debian version that was used for the tutorial. We should also mention that is should work for most Linux distros that don't otherwise have a network manager program (or something like that).
@ghpille Are you going to be able to finish this? I really want to make sure that we get these changes merged this time! |
@WasabiFan I certainly hope so, but currently facing a part of my roof taken away by a storm and my girlfriends heating system breaking down while it's winter down here. Priorities, priorities ... |
Aw, I hate when that happens 😉 No problem, I just wanted to make sure this wasn't forgotten about. There's no rush on this work. |
@ghpille why aren't you finishing this?? |
@enitsche Are you interested in my private life? It took me a couple of weeks to replace my girlfriends heating system, the replacment weighing some 280kg. The same time I had to replace a 200l boiler. Then my dog died, took me a week to find a new one, but this last one asks for more attention then the previous one. I've been on holiday for 3 weeks to southern France, spent an entire weekend making plum jam, had a small car accident but it took me some time to repair the damage. I don't keep a diary, there are large hiatuses. Dlech made it clear that the steps I added to the tutorial, are unnecessary. In that case, why would I finish it? |
I've never used Gnome, and never any GUI for my network connections. I couldn't find how to establish the connection, so I found out myself, but I wanted to register what I learned. This page seemed the most appropriate place.