I own a Ras Pi and a network card based on RT3072, hoping to set up a router. Drivers are already existed, but HostAPD shows error “drive not found” after I specify driver in hostapd.conf. I’ve tried “rt2800usb” “rt2x00usb” “rt2870usb” and so on. Which driver should I specify in hostapd.conf?
I can only offer general advice here. The hostapd.conf ‘driver=’ entry is usually configured to use nl80211 (but other drivers may exist for particular hardware/situations).
http://www.linuxwireless.org/en/developers/Documentation/nl80211/
Useful references:
https://wireless.wiki.kernel.org/en/users/Documentation/hostapd
https://wiki.archlinux.org/index.php/software_access_point
https://wireless.wiki.kernel.org/en/users/documentation/hostapd
If your Card can do it…
Do you really need the driver entry in hostapd.conf?
On my RasPi, model 1B with RT5370, with Raspbian it works without.
Hendrik
I’m not using hostapd, but it appears that it defaults to a ‘hostap’ when not specified. The hostapd.conf file contains the following info
driver=hostap
Not quite, the important part for a somehow recent card is this here:
# default: hostap). **nl80211 is used with all Linux mac80211 drivers**
The “hostap” driver interface is the (very) old one used by hostapd in “ye olden days” with the cards supported by hostapd at the time.
With the kernel driver “rt2800usb” certainly the hostapd driver interface “nl80211” is the correct one (if the card itself supports AP mode with hostapd) and hostapd will use that one by default.
AK
I was really only replying to hendwolt’s question, since he claims he didn’t specify it explicitly. Not recommending it.
The “hostap” driver interface is the (very) old one used by hostapd in “ye olden days” with the cards supported by hostapd at the time.
I suspected that is the case, although I don’t have a lot of experience with this.
With the kernel driver “rt2800usb” certainly the hostapd driver interface “nl80211” is the correct one (if the card itself supports AP mode with hostapd) and hostapd will use that one by default.
AK
Thanks for chiming in with this info. As I’d hoped, and recommended trying in my initial reply.
● hostapd.service - Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Loaded: loaded (/usr/lib/systemd/system/hostapd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-05-18 23:24:41 CST; 3s ago
Process: 2551 ExecStart=/usr/sbin/hostapd /etc/hostapd.conf (code=exited, status=1/FAILURE)
Main PID: 2551 (code=exited, status=1/FAILURE)
May 18 23:24:41 linux.suse hostapd[2551]: wlan0: interface state COUNTRY_UPDATE->DISABLED
May 18 23:24:41 linux.suse hostapd[2551]: wlan0: AP-DISABLED
May 18 23:24:41 linux.suse hostapd[2551]: wlan0: Unable to setup interface.
May 18 23:24:41 linux.suse hostapd[2551]: wlan0: interface state DISABLED->DISABLED
May 18 23:24:41 linux.suse hostapd[2551]: wlan0: AP-DISABLED
May 18 23:24:41 linux.suse hostapd[2551]: hostapd_free_hapd_data: Interface wlan0 wasn’t started
May 18 23:24:41 linux.suse hostapd[2551]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 18 23:24:41 linux.suse systemd[1]: hostapd.service: Main process exited, code=exited, status=1/FAILURE
May 18 23:24:41 linux.suse systemd[1]: hostapd.service: Unit entered failed state.
May 18 23:24:41 linux.suse systemd[1]: **hostapd.service: Failed with result ‘exit-code’.
How can I solve these?**
Are you sure, that your wlan card works with your raspi at all?
And can it work as an access point?
You can check the AP capabilities with
iw list | grep AP
In my case (remember it is Raspbian, based on Debian 8 Jessie, not openSUSE) I use hostapd in version 2.3.
Hendrik
It can be used to connect to other Wi-Fi, also iw list shows it can be an AP.
My next suggestion: Start hostapd on a console in debug mode; for example like this:
hostapd -dd -P /run/hostapd.pid /etc/hostapd/hostapd.conf
Then you should see more of what’s going on:
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:10
nl80211: Supported cipher 00-0f-ac:8
nl80211: Supported cipher 00-0f-ac:9
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
...
Haven’t visited this post for a long time. “nl80211” is suitable for most of the wireless cards, while other third-part drivers can be found and be used.