3

I would configure my Rapsberry Pi B to create a WiFi network in bridge mode (without DHCP daemon on raspberry).

I followed this Guide Use Your Raspberry Pi as WiFi Bridge.

My wlan adtpater is Alpa AWUS036H and this is lsusb output:

Bus 001 Device 005: ID 0480:a007 Toshiba America Info. Systems, Inc. External Disk USB 3.0
Bus 001 Device 004: ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC95

I configured Hostapd ( /etc/hostapd/hostapd.conf) with this settings:

interface=wlan0
driver=nl80211
ssid=Pi_AP
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

When i run $ hostapd -dd /etc/hostapd/hostapd.conf this is the output:

random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
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)
nl80211: Failed to set interface 3 to mode 3: -95 (Operation not supported)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Failed to set interface 3 to mode 3: -95 (Operation not supported)
nl80211: Interface mode change to 3 from 0 failed
nl80211: Could not configure driver mode
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211 driver initialization failed.
hostapd_interface_deinit_free(0x7fdc39f0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x7fdc39f0)
hostapd_bss_deinit: deinit bss wlan0
hostapd_cleanup(hapd=0x7fdc4618 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit
hostapd_interface_free(0x7fdc39f0)
hostapd_interface_free: free hapd 0x7fdc4618
hostapd_cleanup_iface(0x7fdc39f0)
hostapd_cleanup_iface_partial(0x7fdc39f0)
hostapd_cleanup_iface: free iface=0x7fdc39f0

Why my Wlan adapter can't start in master mode? Is the driver correct?

Any suggestions?

Thanks!

2

Why my Wlan adapter can't start in master mode?

Not all wifi adapters are built for this purpose, and "Operation not supported" implies this is one of them.

This archived post from the linux wireless mail list a few years supports that:

I own an Alfa AWUS036H network adapter using the rtl8187 driver [...] which apparently requires master mode to be enabled in the driver. The page http://linuxwireless.org/en/users/Drivers/rtl8187 states: not working yet: AP/Master mode
What means yet? Is it planned to add master mode support in the near future?

In the case of the RTL8187L, which is the chip in your Alfa device, it means never. That chip only has a single hardware transmit queue and the work of getting the high-priority traffic, such as beacons, transmitted at the correct time would be much more than it would be worth.

To summarize: You are out of luck, that device cannot be used as an access point.

  • Oh :( Thanks for the explanation. Now I'm looking for a compatible wlan adapter. Any suggestions? – Federico Mar 30 '16 at 7:13
  • My recommendation with buying hardware for linux generally is to research whether people have used it in the way you want first. Some manufacturers do contribute driver code to the kernel, but there is not a large motivation for some of them to do so (particularly with small general consumer items) and for some of them the open source licensing requirement is a dis-incentive. In the latter case someone has to reverse engineer them. The only wifi chip I've used for an AP is the one in my laptop (realtek RTL8188CE), but not that often. – goldilocks Mar 30 '16 at 11:56
  • Beware anything which talks about downloading drivers from the manufacturer's site. This is sometimes done by OEM's that don't want to open source driver code, so they pre-compile and distribute them like they would a Windows or Mac driver. The problem is, linux changes too quickly, and the driver must be compiled for the exact kernel it is being used with. This is a nearly impossible problem with the pi, since it uses a special kernel to start with (which also gets updated frequently). So if you see that, avoid it. – goldilocks Mar 30 '16 at 12:00
1

goldilocks is right, your chipset is not supported. If you decide to obtain a new wireless adapter, I invite you to check this wiki page listing essential options provided by various WIFI chipsets. The capability required by hostapd is called AP (short for Access Point). For example, take a look at your current chipset, RTL8187:

enter image description here

Personally, I use adapters with Ralink chipset, as you can see almost all chipsets from them support AP mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.