-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Switching the interface of the access point not working properly #580
Comments
Sounds good Christian and thanks for the patch. Is this related to #578? |
Its actually pretty independent from the general problem with /etc/dhcpdc.conf, except, that the patch already includes the fix for ajax/networking/gen_int_config.php to avoid the wrong order of the options inside of the file. In addition the defaults are read from the "defaults" file to create dhcpcd.conf. |
@zbchristian created a PR from your patch. |
@billz
RaspAP settings:
The patch should take care to assign the static IP to wlan1. |
@zbchristian use of two wifi adapters has been unsupported mainly due to the large number of poor quality dongles on the market. This is discussed on the wiki.
Users would often attempt to configure a cheap dongle and raise issues with this project when it fails to work. We can include configuration steps, but with the proviso that this is totally unsupported. |
Give the PR a look. I did a quick test pass and found an error in writing |
Concerning the PR: |
Concerning wifi dongles: yes the driver is a real problem, especially for Realtek based devices |
Hi Billz, Christian |
Merged, thanks |
I am interested in getting this working also, and happy to help out! Out of curiosity: What would it take to have the AP on wlan0 and the Wifi on wlan1? I would like the AP to be on the internal Wifi because that seems to be the one that's the most guaranteed to be up and running. |
@lehni The code exists already and is under review by billz (branch zbchristian-wlan-switch). The problem with having wlan0 as the AP and wlan1 as client is, that the wifi client is pretty much hard coded to wlan0. Most of the time as RASPI_WIFI_CLIENT_INTERFACE, which is set in config.php to wlan0, but wlan0 is explicitly used in the code as well. You can try to change it and see, if it works. |
I've committed changes to the feature branch that enable arbitrary switching of the AP interface via the UI. See notes in the PR, thanks |
Testers needed for #582. You can (re)install RaspAP with this feature like so:
...or pull the feature branch into an existing installation:
Kudos to @zbchristian for pushing this forward! |
@billz I checked the version. The switching of the AP wifi interface works, but the assignment of the wifi client fails, when two separate wifi interfaces are used. |
@zbchristian excellent, I have not tested this in wifi client mode yet. I wanted to verify that switching between wlan0/wlan1 didn't break anything as the session var replaces the constant throughout the project. Will check your PR shortly, thanks |
PR tested and merged. Starting from a clean install on an RPi 4 configured in managed mode, RaspAP is using the onboard wireless |
Hi - yes I would test. I have tried already using the curl command you circulated. I have a +3B using 32 OS and I said y to all including adblock and openvpn. Nothing else is running. My second wifi is a Linksys USB using a RTL8812au chipset. I have a process to compile this and I have had it running successfully in other software as the second RPI wifi. |
Hi I tried this several times using a Linksys usb dongle (RTL8812au chipset) and a +3B running a fresh install of OS 32 Lite. I said y to all installation questions. I compiled the wifi usb using https://raspberrypi.stackexchange.com/questions/64502/install-drivers-for-rtl8812au-wireless-usb-adapter answer 1.I have had the wifi dongle working in Raspap using the up2smoke procedure. I add a wpa-supplicant to the SD card so the RPI boots and connects to my wifi. Nothing else is installed.
I have not made it work - on opening the UI I see hotspot inactive. The AP mode icon is ghosted. Wifi Client is correct. But if I try to get the hotspot working by restarting or rebooting then typically the RPI freezes and I lose it from the network. If I enable logging this is the usual output:
Configurationfile: /etc/hostapd/hostapd.conf
nl80211:Could not configure driver mode
nl80211:deinit ifname=wlan0 disabled_11b_rates=0
nl80211driver initialization failed.
wlan0:interface state UNINITIALIZED->DISABLED
wlan0:AP-DISABLED
wlan0:CTRL-EVENT-TERMINATING
hostapd_free_hapd_data:Interface wlan0 wasn't started
Is there anything else I can log to give you more info?
On Monday, 8 June 2020, 09:40:35 BST, Bill Zimmerman <notifications@github.com> wrote:
Testers needed for #582. You can (re)install RaspAP with this feature like so:
curl -sL https://install.raspap.com | bash -s -- --repo billz/raspap-webgui --branch zbchristian-wlan-switch
...or pull the feature branch into an existing installation:
cd /var/www/html
sudo git fetch origin
sudo git checkout -b zbchristian-wlan-switch origin/zbchristian-wlan-switch
Kudos to @zbchristian for pushing this forward!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ran through another clean install on RPi OS (32-bit) Lite with an Edimax EW-7811Un. No special drivers.
Followed up with a baseline compatibility test: connect ethernet, reboot, reconfigure AP on wlan0, restart hostapd, connect several clients. No issues, all steps performed via UI. |
Hi I followed the procedure. Here is my iwconfig before I do (3). lo no wireless extensions. wlan0 unassociated Nickname:"WIFI@REALTEK" I follow the rest of the steps and go to the UI - see hotspot inactive wlan0 down, hostapd down. I connect wlan0 to my network and wlan0 is up. Then I try to connect wlan1 on hotspot page. No channel # appears and if I change the SSID/password and hit save settings it just reverts to defaults. If I go back to dashboard wlan0 is down. If I look at the network page wlan1 is showing the UI IP address and wlan0 no carrier. |
@billz Installed the feature branch from scratch with two wifi interfaces (Edimax 7811Un and Ralink RT5370). Both are supported out of the box by Raspian lite. Two issues: displayed client interface is not correct on the dashboard and the After the fix everything worked out of the box. The AP interface can now be wlan0 or wlan1 and the the other wifi interface is used as the client. |
@zbchristian great, I had not tested this case. thanks for catching it.
Excellent, I'll check out the PR. Think we're getting close to releasing this. |
Just to confrim @zbchristian my Linksys usb dongle although apparently ready to use after compiling is not being accepted. I have finally obtained a RT5370 usb wifi and that works well. Thanks for getting such a nice addition working. |
@feh123 Great, that it works for you now. |
@zbchristian thanks for the info - I may try to use my rtl8812au dongle again as it is faster than the dongle I have installed. But at the moment just nice to have it working. |
@feh123 many thanks for your testing efforts. |
FWIW I have also installed and tested Edimax EW-7811Un Realtek (8188CUS). Everything worked on a fresh Raspbian Buster install. I ordered several other USB dongles and will try them out when I have a chance. Thank you very much @billz @zbchristian @feh123 |
@dixon1e glad to hear it and appreciate the feedback. Please do share your findings with other adapters. Perhaps we can create a resource for this. |
@billz sounds like a great idea. Tested one other just to make sure I wasn't making mistakes. Tested good: Ralink MT7601U (Brand name ZTC-WUE001-BK) |
I have a Linksys WUSB6300 (RTL8812au) working too thanks to @zbchristian link to aircrack-ng. |
Hi billz,
since I am running with two different wifi interfaces, I need the AP to use wlan1 and wlan0 is the client. There are multiple problems in includes/hostad.php, which prevent the change of the AP interface.
Main problem is, that RASPI_WIFI_CLIENT_INTERFACE is hardcoded nearly everywhere. I went through and replaced all occurences by $_POST['interface'].
In addition I did changes to adapt the static IP of the chosen interface to match the dhcp range. And the new settings are written back to the corresponding .ini file.
I did not touch any of the settings for briged mode or WifiAP mode. I am not using them and can not test it.
The dhcpcd.conf default value are now read from the "defaults" file instead of the hardcoded values.
In order to get the attached clients listed on the dashboard for an interface other than wlan0, the AP interface has to be extracted. I added this to templates/dashboard.php.
Hope I made all changes clear enough. See attached patch for the details.
Best
Christian
0001-Fix-hostapd.php-to-allow-for-a-different-interface-t.patch.zip
The text was updated successfully, but these errors were encountered: