-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add instructions to host a wireless network from a Raspberry Pi #3138
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.
Lets get some proper diagrams in here before proceeding.
|
||
Consider a wired network that uses the `10.x.x.x` IP block. You can connect your Raspberry Pi to that network and serve wireless clients on a separate network that uses another IP block, such as `192.168.x.x`. In the diagram below, note that the laptop exists in an IP block separate from the router and wired clients: | ||
|
||
---- |
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.
Can you ping @jackbenwillis about these diagrams? I think we'd want proper artwork in here. I know the original tutorials had ASCII art, but we're trying to do a bit better about things these days!
=== Use your Raspberry Pi as a network bridge | ||
|
||
By default, the wireless network hosted from your Raspberry Pi exists separately from the parent network connected via Ethernet. In this arrangement, devices connected to the parent network cannot directly communicate with devices connected to the wireless network hosted from your Raspberry Pi. If you want connected wireless devices to be able to communicate with devices on the parent network, you can configure your Raspberry Pi as a https://en.wikipedia.org/wiki/Network_bridge[network bridge]. With a network bridge in place, each device connected to the Pi-hosted wireless network is assigned an IP address in the parent network. In the diagram below, note that the laptop exists in the same IP block as the router and wired clients: | ||
|
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.
Same with this one!
I've thrown a task into Asana for the design team. |
Ready to merge? |
No blocking comments, ready when you are. |
documentation/asciidoc/computers/configuration/host-wireless-network.adoc
Show resolved
Hide resolved
To disable the network: | ||
|
||
1. Click the network icon in the system tray. Select *Turn Off Wireless LAN*. | ||
2. Click the network icon in the system tray. Select *Turn On Wireless LAN*. | ||
|
||
The wireless module should automatically connect to your preferred wireless network when you complete the second step. If it doesn't, pick a wireless network from the dropdown. |
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.
Huh, this section doesn't seem to make sense?
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.
What specifically doesn't make sense?
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.
Perhaps it was just me misunderstanding things, but it seems to be saying "To disable the network... turn it off and on again" ??
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.
More specifically, the only way to disable the hotspot and start using your wifi module to connect to other networks is to... disable and re-enable the wireless radio. I should probably update this to say "hotspot network". I added this because the UI doesn't provide an easy way to get out of hotspot mode that I can find, and I'm afraid some users might get "stuck" in hotspot mode and not know how to get out of it.
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.
Might also be worth clarifying that when you "turn it on again" the hotspot network will have been disabled? I think that might have been what was confusing me.
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.
Does this mean that the hotspot network doesn't automatically survive a reboot? Or does NetworkManager treat a reboot event differently to disabling and then re-enabling the WiFi?
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.
Good question. Basically:
- network manager always connects to the highest priority connection on launch (including the hotspot)
- the UI doesn't include any way to disable the hotspot and switch back to wireless client mode
- if you don't set the hotspot priority (that is, if all priority levels are equal), network manager connects to available known networks as a client first
So turning wireless off and on again just passes the buck to priority settings. You can set the hotspot priority highest to force network manager to default to the hotspot on launch. But if you set the priority higher there doesn't seem to be any way to reliably get back to client mode using the UI.
It is tempting to remove the UI instructions entirely here and point users to the CLI method instead. Increasingly I suspect it might be the only viable option.
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.
Ugh. Apologies for opening the hornet's nest, but I'll leave you and Alasdair to thrash out the best solution 😉
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.
For this, considering, I think we should dump the GUI instructions and revert to CLI only.
documentation/asciidoc/computers/configuration/host-wireless-network.adoc
Show resolved
Hide resolved
* If you have already created a wireless hotspot connection, add the existing interface to the bridge with the following command: | ||
+ | ||
---- | ||
sudo nmcli connection modify 'Hotspot' master bridge0 |
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.
Does the Hotspot
name here correspond to the <example-network-name>
used earlier?
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 network manager, networks have both a name and an ssid. is the ssid for that network, but using the hotspot
command in nmcli
seems to always generate a network with the name "Hotspot" unless you specify a different name.
Added a sentence clarifying this!
Network diagrams uploaded and added directly to |
nmcli