Skip to content

Update access-point.md #859

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

Closed

Conversation

ultimateblockage
Copy link

This setup tutorial requires RFKILL to be disabled in order to allow hostapd to bring up and control the wlan0 interface. I've added the line following the installation and stop of hostapd and dnsmasq to reflect this.

This setup tutorial requires RFKILL to be disabled in order to allow hostapd to bring up and control the wlan0 interface. I've added the line following the installation and stop of hostapd and dnsmasq to reflect this.
@XECDesign
Copy link
Contributor

You'd only need to run rfkill manually if you havent' set the wifi country using raspi-config or rc_gui and only on a pi3 b+ or if you've blocked wifi yourself. In the former case, rfkill would block wifi again after restart, unless you've manually set the country in wpa_supplicant.conf.

In other words, this step would only be required if you've done something wrong before. If this is merged as is, it would create more confusion when people find that wifi is getting blocked again after they reboot.

@ultimateblockage
Copy link
Author

Using the latest Raspbian image and going through the tutorial line-by-line, it does not work. I had not done anything "wrong" as you state.

If you disable RFKILL it does work.

Therefore the tutorial requires an update, either to set the wifi country as you point out, or as I solved it, by disabling RFKILL.

@XECDesign
Copy link
Contributor

That solution will last you until you reboot. I agree that the documentation should maybe take into account that people would be following the steps without setting the wifi country first.

@JamesH65
Copy link
Contributor

JamesH65 commented Mar 19, 2018 via email

@ultimateblockage
Copy link
Author

My solution is to disable RFKILL (not just stop it) that does work perpetually after reboot.

@XECDesign
Copy link
Contributor

Apologies, you're right. I thought you ran rfkill unblock wifi, not disable the systemd-rfkill service entirely.

@jakemagee
Copy link

If setting the Wi-Fi country also fixes the issue, would that be the better solution to add in the documentation?

@ultimateblockage
Copy link
Author

I believe RFKILL remains in control of wifi and bluetooth unless permanently disabled i.e. it isn't as simple as just setting the wifi country as an alternative to disabling RFKILL.

@XECDesign
Copy link
Contributor

For full context of how it's disabled in the first place:
RPi-Distro/raspberrypi-sys-mods@6868618

@ultimateblockage
Copy link
Author

So that doesn't work as I was able to connect to wifi on first boot, even without the country set. Only after having done that, loading the tutorial in front of an audience of 20, did I go through the tutorial and at the end find that it didn't work as an access point.

@ghost
Copy link

ghost commented Apr 16, 2018

This needs to be fixed, there's no clear answer on the forums, everyone is coming up with different "solutions" that doesn't work for the most part.

@JamesH65
Copy link
Contributor

Understood, it's a matter of finding the time to do it. TBH, I have no idea what needs to change, so I'm in the same boat as everyone else. If anyone DOES know what needs to be fixed, and can update the docs and send in a PR< that would save a load of time.

@JamesH65
Copy link
Contributor

@XECDesign Do you have any recommendations on what to change and where? Would like to clear this one up with a change to the docs, but not sure exactly what needs to change.

@XECDesign
Copy link
Contributor

XECDesign commented Apr 20, 2018

Set the wifi country using the GUI or raspi-config. Some users may also need to run sudo rfkill unblock all. It's all a bit clunky no matter how you do it.

@JamesH65
Copy link
Contributor

Sorry about delay in getting back to this. I'm still not sure what is actually required, and to why only some users might need to use sudo rfkill unblock all and what that actually fixes?

@XECDesign
Copy link
Contributor

XECDesign commented Jul 13, 2018

When wifi is first disabled, a file is created in /run to tell raspi-config whether or not the user disabled wifi or if it was disabled automatically. After rebooting, there's no way to know. To stay on the safe side and avoid radiating rf, it doesn't run rfkill unblock.

So, if you boot up and set wifi country, it will work. If you boot up, reboot, and then set wifi country, you'll need to unblock wifi as well.

Having a requirement not to radiate unless the user intentionally enables that option results in nonsense like this.

Instructions should be - if you're on a 3B+, set wifi country and run unblock all. Alternatively, use OP's approach of disabling rfkill alltogether, but add the unblock all command instead of requiring a reboot.

@lurch
Copy link
Contributor

lurch commented Apr 29, 2020

Is this still relevant, given the changes to Raspbian that have been made since this issue was opened, and given the recent big changes to the access-point documentation?

@JamesH65
Copy link
Contributor

Don't know - I thought I had got rid of all the related PR's. @epoch1970 Any thoughts?

@epoch1970
Copy link
Contributor

epoch1970 commented Apr 29, 2020

I've never seen this. I only have 3Bs to play with. Last test I ran was w/ Raspbian Full (I always use Lite): fresh SD, boot, wizard, update, reboot (because it asked for it), apply guides. Worked "100%". I didn't try telling the wizard not to update, and reboot anyways. I will try that, but in years using Lite on Pi3B, I don't think I've every had rfkill causing an issue. Again, I only have 3Bs to test with.

@XECDesign
Copy link
Contributor

Some of the information here is no longer relevant, but rfkill is still used by default on pis with 5ghz wlan.

If there's nothing in the latest version of the docs about rfkill, then I'd suggest adding sudo rfkill unblock all near the start. I'd be cautious about the wording, making sure it's clear that the wifi country is set first.

@epoch1970
Copy link
Contributor

If there's nothing in the latest version of the docs about rfkill, then I'd suggest adding sudo rfkill unblock all near the start. I'd be cautious about the wording, making sure it's clear that the wifi country is set first.

There is nothing about rfkill in the latest versions (routed or bridged). Looking at https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md,
I'd be tempted to add something to "Before you start" or add a new title after that, but before "Install the access point and network management software"
Again I can write a paragraph, but no 5Ghz for me, so I don't really know what I'd be talking about, and couldn't test.

Do you want me to try?

@JamesH65
Copy link
Contributor

@epoch1970 If you can supply another PR, we can review it and go from there. Thanks!

@aallan
Copy link
Contributor

aallan commented Jun 7, 2021

In light of #1911 is this PR still relevant? If there is supporting third-party documentation outside of this repo, and there hasn't been much recent progress I'd be inclined to close it?

@epoch1970
Copy link
Contributor

This should be closed as obsolete. The AP docs have been improved to include topics rfkill and WiFi country long ago.

@aallan
Copy link
Contributor

aallan commented Jun 7, 2021

This should be closed as obsolete.

Closing as obsolete!

@aallan aallan closed this Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants