Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Problems on ALARM with Raspberry Pi 3 #185

Closed
NicoHood opened this issue Jul 22, 2016 · 3 comments
Closed

Problems on ALARM with Raspberry Pi 3 #185

NicoHood opened this issue Jul 22, 2016 · 3 comments

Comments

@NicoHood
Copy link
Contributor

NicoHood commented Jul 22, 2016

Hi,
I just tried your script on the raspi3 with arch linux for arm (using manual makepkg).

But I get the following error:

sudo create_ap wlan0 eth0 MyAccessPoint 12345678
[sudo] password for alarm: 
Config dir: /tmp/create_ap.wlan0.conf.6qCQfBJ8
PID: 422
Network Manager found, set ap0 as unmanaged device... DONE
Creating a virtual WiFi interface... ap0 created.
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlan0.conf.6qCQfBJ8/hostapd_ctrl
Configuration file: /tmp/create_ap.wlan0.conf.6qCQfBJ8/hostapd.conf
Failed to create interface mon.ap0: -95 (Operation not supported)
ap0: Could not connect to kernel driver
Using interface ap0 with hwaddr <removed> and ssid "MyAccessPoint"
ap0: interface state UNINITIALIZED->ENABLED
ap0: AP-ENABLED

[...]

wlan0: STA yy:yy:yy:yy:yy:yy WPA: pairwise key handshake completed (RSN)
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: authenticated
wlan0: STA yy:yy:yy:yy:yy:yy IEEE 802.11: associated

Also if i try running the command again I get:

sudo create_ap wlan0 eth0 MyAccessPoint 12345678
[sudo] password for alarm: 
Config dir: /tmp/create_ap.wlan0.conf.hBQpIhnu
PID: 1685
Network Manager found, set ap1 as unmanaged device... DONE
Creating a virtual WiFi interface... command failed: Device or resource busy (-16)

ERROR: Maybe your WiFi adapter does not fully support virtual interfaces.
       Try again with --no-virt.


Doing cleanup.. done

ifconfig does not show the wlan0 after this anymore.
Any ideas why this happens and how to debug? I removed my dnsmasq config but kept /etc/hostapd/hostapd.conf which should not cause problems. With my own command line setup i could use the hostapd. If you wish I can show you my manual command.

Edit:
Additional information:
I tested my setup with the setting that create_ap created. Except ctrl_interface I had all the same and it worked fine. In my setup I did not use ctrl_interface. And of course the interface is wlan0 and not ap0. Those settings are:

beacon_int=100
ssid=MyAccessPoint
interface=ap0
driver=nl80211
channel=1
ctrl_interface=/tmp/create_ap.wlan0.conf.a6FzFHVe/hostapd_ctrl
ctrl_interface_group=0
ignore_broadcast_ssid=0
ap_isolate=0
hw_mode=g
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP

Edit2:
Looking at the verbose output of hostapd It looks like only this differs:

create_ap

Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2437 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2437 MHz, cf2=0 MHz)
  * freq=2437
  * vht_enabled=0
  * ht_enabled=0

manual

Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
hw vht capab: 0x0, conf vht capab: 0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2437 (ht_enabled=1, vht_enabled=0, bandwidth=20 MHz, cf1=2437 MHz, cf2=0 MHz)
  * freq=2437
  * vht_enabled=0
  * ht_enabled=1
  * sec_channel_offset=0
  * channel_type=1

The manual setting enables ht it seems.

[alarm@alarmpi3 ~]$ iw list | grep ht -i
            HT20
            RX HT20 SGI
            DSSS/CCK HT40
        HT TX/RX MCS rate indexes supported: 0-7
        Bitrates (non-HT):
@NicoHood
Copy link
Contributor Author

NicoHood commented Jul 22, 2016

This solved the error:

sudo create_ap wlan0 eth0 MyAccessPoint 12345678 --no-virt

However the problem with the virtual interface still exists (it will not get removed properly). I am also not sure about the ht settings. First I thought this also caused some problems, but this was more on the client side.

When trying to change the ssid again it seem that it fails again with the command above. But this only happens sometimes. I then try to set a different ht property which seems to solve it. But this might just be a workaround and the real bug is a race condition, a required delay or a windows client bug. (I used windows 8 to connect to the network):

sudo create_ap wlan0 eth0 MyAccessPoint2 12345678 --no-virt --ht_capab 20

I also found: Driver does not support configured HT capability [HT40*] and the option --ieee80211n gives an error. This might be possible, as the wlan module is quite simple on the raspi.

@macmpi
Copy link

macmpi commented Oct 23, 2016

Hi, experienced the same issue with latest Raspbian Jessie and Pi3, when setting passphrase.
However I'm curious as to how --no-virt relates to password enabling: --no-virt seems to only influence routing in create_ap.

One could think virtual interface capability could be linked to chipset supporting multiple SSID as per this, but then it would also apply to no passphrase open networks...

Interested in your thoughts.
Thanks.

@oblique
Copy link
Owner

oblique commented Nov 26, 2016

Fixed in 595ea38

@oblique oblique closed this as completed Nov 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants