Open aspx1981 opened 2 years ago
Hello,
Hi
I'd like to create 3 different wi-fi networks on my raspberry pi 4 with hostapd in Ubuntu 21.10. Using iw list I got that the onboard card is not able of more then one SSID
I am not a fan of the RasPi4B onboard wifi.
I disable onboard Wi-Fi and attach the new usb, installation was Plug'n'Play. Then I copied the same hostapd.conf, but hostapd.service is not coming up.
Paste your hostapd.conf in a reply.
valid interface combinations: * #{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 2, total <= 2, #channels <= 1, STA/AP BI must match ...........
Is this correct ?
Yes
Is this the same in yours ?
Yes
Is the dongle defect ?
No,
Is the wrong driver ?
No. I'll assume you are using RasPiOS 32 bit Jan 22 release.
Does it mean that I can add 2 SSID for each band (2x2.4GHz + 2x 5GHz) ?
No. You can have 2 SSID's based on AP <=2
but I think there is some confusion when you say each band. If you are under the impression that a single usb wifi adapter can support the 2.4 and 5 GHz bands at the same time, this is not true. These adapters have one radio so they can support 2.4 or 5 GHz but not both at the same time. So if you want SSID's of myAP
and guest
at the same time on 5 GHz, you can do that but both will need to use the same channel. I can point you to details of how to do that.
If yes could you pls let me know which details you need to help me ?
As requested above. Paste your hostapd.conf and lets get you up in AP mode first.
Also, tell me what guide you are using to set hostapd up?
Regards
Hello,
thanks for your prompt answer and sorry I was offline last 5d trying to make this work. I flashed the SD with all the Ubuntu version. Now I went back to 64bit Ubuntu 20.04 LTS on Raspberry Pi4 and AWUS036ACM attached on USB 2.0 port (USB 3.0 ports already occupied). Is it Ubuntu 32bit better ? Which release ?
main issues:
ubuntu dhcpd[5433]: receive_packet failed on wlan1: Network is down
ubuntu wpa_supplicant[819]: wlan1: CTRL-EVENT-SCAN-FAILED ret=-100
************************many times ************************
ubuntu dhcpd[5433]: receive_packet failed on wlan1: Network is down
ubuntu wpa_supplicant[819]: wlan1: CTRL-EVENT-SCAN-FAILED ret=-95
c. how can I control how much max current raspberry can provide by usb ? how can I power off a usb device by command line ?
below hostapd.conf for AWUS036ACM WiFi 5Ghz Private WLAN and Guest WLAN ctrl_interface=/var/run/hostapd ctrl_interface_group=0 interface=wlan1 driver=nl80211
### IEEE 802.11
# Band: a = 5g (a/n/ac), g = 2g (b/g/n)
hw_mode=a
channel=36
max_num_sta=128
auth_algs=1
#macaddr_acl=0
### DFS
country_code=US
ieee80211d=1
ieee80211h=1
### IEEE 802.11n
ieee80211n=1
#ht_capab=[HT20][HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935]
ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1]
### IEEE 802.11ac
ieee80211ac=1
#vht_oper_chwidth=1
#vht_capab=[HT40-]
#vht_oper_centr_freq_seg0_idx=46
### IEEE 802.11i
#bssid=02:aa:bb:cc:dd:50 # commented just to make 1 WiFi working
ssid=WiFI2G
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_passphrase=*****************
wpa_group_rekey=60
wpa_gmk_rekey=3600
bss=wlan2
bssid=06:aa:bb:cc:dd:55
ssid=Wifi2GGuest
wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
wpa_passphrase=11111111
wpa_group_rekey=60
wpa_gmk_rekey=3600
#ignore_broadcast_ssid=0
#logger_syslog_level=0
### WMM # commented because I don't know the meaning
wmm_enabled=1
#uapsd_advertisement_enabled=1
#wmm_ac_bk_cwmin=4
#wmm_ac_bk_cwmax=10
#wmm_ac_bk_aifs=7
#wmm_ac_bk_txop_limit=0
#wmm_ac_bk_acm=0
#wmm_ac_be_aifs=3
#wmm_ac_be_cwmin=4
#wmm_ac_be_cwmax=10
#wmm_ac_be_txop_limit=0
#wmm_ac_be_acm=0
#wmm_ac_vi_aifs=2
#wmm_ac_vi_cwmin=3
#wmm_ac_vi_cwmax=4
#wmm_ac_vi_txop_limit=94
#wmm_ac_vi_acm=0
#wmm_ac_vo_aifs=2
#wmm_ac_vo_cwmin=2
#wmm_ac_vo_cwmax=3
#wmm_ac_vo_txop_limit=47
#wmm_ac_vo_acm=0
### TX queue parameters
#tx_queue_data3_aifs=7
#tx_queue_data3_cwmin=15
#tx_queue_data3_cwmax=1023
#tx_queue_data3_burst=0
#tx_queue_data2_aifs=3
#tx_queue_data2_cwmin=15
#tx_queue_data2_cwmax=63
#tx_queue_data2_burst=0
#tx_queue_data1_aifs=1
#tx_queue_data1_cwmin=7
#tx_queue_data1_cwmax=15
#tx_queue_data1_burst=3.0
#tx_queue_data0_aifs=1
#tx_queue_data0_cwmin=3
#tx_queue_data0_cwmax=7
#tx_queue_data0_burst=1.5
Thanks a lot for all your help and time Really appreciated by me and family :)
Number 1 is power, I had the exact same issue (and error messages). The Raspberry Pi 4 outputs 1200mA for all 4 USB ports already and it cannot be modified via command line or other means unfortunately. It comes from the factory with max_usb_current=1 set in the firmware from what I've read.
Get a powered hub - I highly recommend this Jeaxin USB 3.0 powered hub because it has a micro USB power connector so you can use a single power supply to power the hub then power the Raspberry Pi through the hub with a short 6" USB cable. If your power supply is a Raspberry Pi 4 power supply with USB C you can pick up a USB C to USB micro converter dongle then use that to plug your good Raspberry 4 power supply into the USB 3.0 hub. Keeping the USB cables 6" or shorter helps considerably with voltage drop.
You can affix the powered hub to the side of the Raspberry Pi case with Alien Tape, it works quite well and looks clean. Another thing you can do is pick up a 6" USB A extender which lets you Alien Tape the ACM adapter to the top of the Raspberry Pi case - out of the way but powered off the USB hub. Just some ideas to hopefully make the power issue easier to resolve as I had bumped up against this issue pretty hard in the past.
Thanks for your sharing your experience, I solved the power issue with a temporary workaround. Could you pls help also with topic 2 ?
Thanks
I tried to add below lines to /usr/lib/systemd/system/hostapd.service
ExecStartPre=/bin/sh -ec 'ip link set dev wlan1 down' ExecStartPre=/bin/sh -ec 'ip link set dev wlan1 address 02:aa:bb:cc:dd:50' ExecStartPre=/bin/sh -ec 'ip link set dev wlan1 up
now the hostapd.service is active, I can see the newly added wlan2 but I still cannot see WiFi2GGuest and cannot join network WiFi2G with "no authentication error"
am I missing something ?
I still cannot see WiFi2GGuest
The following issue has information about setting up Guest.
Hello,
I'd like to create 3 different wi-fi networks on my raspberry pi 4 with hostapd in Ubuntu 21.10. Using iw list I got that the onboard card is not able of more then one SSID, so I tried with many different usb wi-fi, with no luck.
Finally I came across this discussion (https://github.com/morrownr/7612u/issues/3), so I immediately bought an Alfa AWUS036ACM, the first one also in the USB-WiFi discussion page (https://github.com/morrownr/USB-WiFi#chipset---mediatek-mt7612u---supported-in-kernel-since-linux-kernel-419-2018---mt7612u-info).
I disable onboard Wi-Fi and attach the new usb, installation was Plug'n'Play. Then I copied the same hostapd.conf, but hostapd.service is not coming up.
So first of all I liked to see if multi SSID is supported by this adapter, but unfortunately with iw list I discovered this in the section: ....... Supported interface modes:
{ IBSS } <= 1, #{ managed, AP, mesh point, P2P-client, P2P-GO } <= 2,
...........
Is this correct ? Is this the same in yours ? Is the dongle defect ? Is the wrong driver ? Does it mean that I can add 2 SSID for each band (2x2.4GHz + 2x 5GHz) ? If yes could you pls let me know which details you need to help me ?
Many thanks for your support.