Skip to content
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

no valid interface combination #11

Open
aspx1981 opened this issue Mar 18, 2022 · 6 comments
Open

no valid interface combination #11

aspx1981 opened this issue Mar 18, 2022 · 6 comments

Comments

@aspx1981
Copy link

aspx1981 commented Mar 18, 2022

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 (#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
* managed
* AP
* AP/VLAN
* monitor
* mesh point
* P2P-client
* P2P-GO
Band 1:
....
Bitrates (non-HT):
* 1.0 Mbps (short preamble supported)
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1] (23.0 dBm)
* 2417 MHz [2] (23.0 dBm)
* 2422 MHz [3] (23.0 dBm)
* 2427 MHz [4] (23.0 dBm)
* 2432 MHz [5] (23.0 dBm)
* 2437 MHz [6] (23.0 dBm)
* 2442 MHz [7] (23.0 dBm)
* 2447 MHz [8] (23.0 dBm)
* 2452 MHz [9] (23.0 dBm)
* 2457 MHz [10] (23.0 dBm)
* 2462 MHz [11] (23.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)
Band 2:
.......
Bitrates (non-HT):
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 5180 MHz [36] (20.0 dBm)
* 5200 MHz [40] (20.0 dBm)
* 5220 MHz [44] (20.0 dBm)
* 5240 MHz [48] (20.0 dBm)
* 5260 MHz [52] (20.0 dBm) (radar detection)
* 5280 MHz [56] (20.0 dBm) (radar detection)
* 5300 MHz [60] (20.0 dBm) (radar detection)
* 5320 MHz [64] (20.0 dBm) (radar detection)
* 5500 MHz [100] (20.0 dBm) (radar detection)
* 5520 MHz [104] (20.0 dBm) (radar detection)
* 5540 MHz [108] (20.0 dBm) (radar detection)
* 5560 MHz [112] (20.0 dBm) (radar detection)
* 5580 MHz [116] (20.0 dBm) (radar detection)
* 5600 MHz [120] (20.0 dBm) (radar detection)
* 5620 MHz [124] (20.0 dBm) (radar detection)
* 5640 MHz [128] (20.0 dBm) (radar detection)
* 5660 MHz [132] (20.0 dBm) (radar detection)
* 5680 MHz [136] (20.0 dBm) (radar detection)
* 5700 MHz [140] (20.0 dBm) (radar detection)
* 5720 MHz [144] (20.0 dBm) (radar detection)
* 5745 MHz [149] (20.0 dBm)
* 5765 MHz [153] (20.0 dBm)
* 5785 MHz [157] (20.0 dBm)
* 5805 MHz [161] (20.0 dBm)
* 5825 MHz [165] (20.0 dBm)
* 5845 MHz [169] (20.0 dBm) (no IR)
* 5865 MHz [173] (20.0 dBm) (no IR)
Supported commands:
* new_interface
* set_interface
* new_key
* start_ap
* new_station
* new_mpath
* set_mesh_config
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* frame
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* tdls_mgmt
* tdls_oper
* probe_client
* set_noack_map
* register_beacons
* start_p2p_device
* set_mcast_rate
* connect
* disconnect
* channel_switch
* set_qos_map
* set_multicast_to_unicast
software interface modes (can always be added):
* AP/VLAN
* monitor
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 ?
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.

@morrownr
Copy link
Owner

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

@aspx1981
Copy link
Author

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:

  1. I think power
    a. when I use the original usb extension cable in the box, the driver return below error on /var/log/syslog
    kernel: [ 2007.108603] mt76x2u 1-1.3:1.0: rx urb failed: -71
    ************************many times ************************
    kernel: [ 2007.161305] mt76x2u 1-1.3:1.0: tx urb failed: -71
    b. without the original usb extension cable in the box interface suddenly goes down, the driver return below error on /var/log/syslog
    *************************************************************
    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 ?
  2. Guest WiFi wlan2 is not coming up ?
    a. should I change the mac-address ?
    b. should I create somehow a wlan2 interface ?
    c. how can I assign different ip range to each WLAN ?

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
#bridge=br0

                          ### 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
  1. WiFi speed tuning/optimisation
    a. available channels in this adapter ? many occupied by neighbours
    b enable 80MHz ?
    c. signal instability on 5GHz, any option to enable on the driver ?

Thanks a lot for all your help and time
Really appreciated by me and family :)

@amisix
Copy link

amisix commented Mar 24, 2022

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.

@aspx1981
Copy link
Author

Thanks for your sharing your experience, I solved the power issue with a temporary workaround.
Could you pls help also with topic 2 ?

Thanks

@aspx1981
Copy link
Author

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 ?

@morrownr
Copy link
Owner

I still cannot see WiFi2GGuest

The following issue has information about setting up Guest.

morrownr/USB-WiFi#3

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

No branches or pull requests

3 participants