I bought a TL-WN725N v2 wifi usb dongle for my Raspberry.
Amazon read it would work out of the box but it didn't. So I followed several tutorials to have the driver working.
Now the problem is to make it work as an Access Point.
Here is my hostapd.conf
file :
interface=wlan0
ssid=Your_AP_SSI
channel=1
## WPA and WPA2 configuration
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
## WPA settings
wpa=2
wpa_passphrase=my_secret_pass
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
## Hardware configuration
#driver=rtl871xdrv
driver=nl80211
ieee80211n=1
hw_mode=g
When I launch hostapd hostapd.conf it reads :
Configuration file: hostapd.conf
nl80211: Driver does not support authentication/association or connect commands
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started
Any ideas ?
Thx a lot !
Best Answer
Not all wifi cards, whether USB or not, can act as AP. From the look of it, it seems yours can't.
The way to find out is to issue the command
which will have a long and really comprehensive output, where you should search for the following section:
This is for my card, which shows the critical line: Supported interface modes: AP. As you can see, there follow also restrictions, under the heading valid interface combinations. In this special case, it means that I can use this card simultaneously in managed and AP mode, provided the two use the same channel. Which means I can set up an AP through hostapd, while I use a wifi connection to forward hostapd traffic to the Internet.
You ought to make the same check for your card.
If furthermore you wish to find out which USB adaptor can be put into AP mode, I am afraid there is no really authoritative list, mostly because of the manufacturers: for instance this Ubuntu help page states:
After this major disclaimer, I will just say that http://www.thinkpenguin.com/ and http://linuxwireless.org/ provide lists of AP-capable adapters, and that Atheros products are often AP-capable. I regret I cannot be any more precise.
EDIT:
I have done a bit of research, and I have found out that there actually are two versions of the TP-WN725N USB adapter. v1 has Vendor code 0bda and product code 8176 https://wikidevi.com/wiki/TP-LINK_TL-WN725N_v1, while v2 has 0bda:8179 https://wikidevi.com/wiki/TP-LINK_TL-WN725N_v2. These codes, though not accessible through lspci, can be seen from the output of lsusb. You can then distinguish between the two.
Now it is important to learn which driver you are using. Since you do not have lshw (I normally run Arch, but on my Raspberry I installed raspbian, that's why...), the only way to establish which driver you are running is to do:
It should be rtl8188cu for v1, but if you have v2 the above-referenced WikiDevi page says that there is a special, pre-compiled binary driver for the Raspberry which is located here. If you have v2, you should definitely use this.
For v1, I found this online guide, for v2 instead I found this.
One thing to check is whether you have the nl80211 driver available on your system; normally you should, but just to check, the file to be searched is mac80211.
I hope this will give you enough info to narrow down your problem.