Hostapd on BPI-M3


#1

Hello

I can not use a “hostapd” on bananaPi M3.

if I run the hostapd without the option “-d” (demon) the software tells me that the interface works, by cons I have no wireless network visible.

the interface is not connect in iwconfig.

you have an idea

Thank you


#2

commande line start hostapd

    root@bananapi:~# hostapd-rt /etc/hostapd.conf-rt2
    Configuration file: /etc/hostapd.conf-rt2
    nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
    wlan3: interface state UNINITIALIZED->COUNTRY_UPDATE
    Using interface wlan3 with hwaddr e0:76:d0:2d:1e:d7 and ssid "Video"
    wlan3: interface state COUNTRY_UPDATE->ENABLED
    wlan3: AP-ENABLED

on other termanal at the same time

root@bananapi:~# iwconfig  wlan3
wlan3     IEEE 802.11  ESSID:""
          Mode:Managed  Frequency:2.422 GHz  Access Point: Not-Associated
          Bit Rate:72 Mb/s   Tx-Power:32 dBm
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=5/5  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

dmesg

[521838.284636] netdev_ifidx(5), chan_type(1) target channel(9)
[521838.302815] Disconnect STA : ff:ff:ff:ff:ff:ff scb_val.val 3
[521838.416953] CFG80211-ERROR) check_dev_role_integrity : device role select failed

/etc/hostapd.conf-rt2

# if you want to bridge the onboard eth0 and the wireless USB adapter's wlan0, this should work
interface=wlan3



# this is the driver that must be used for ath9k and other similar chipset devices
driver=nl80211


#  yes, it says 802.11g, but the n-speeds get layered on top of it
hw_mode=g


#  this enables the 802.11n speeds and capabilities ...  You will also need to enable WMM for full HT functionality.
ieee80211n=1
wmm_enabled=1
wme_enabled=1


#  self-explanatory, but not all channels may be enabled for you - check /var/log/messages for details
channel=9
#  also, make sure you survey your 2.4GHz environment, and find some uncluttered/uncrowded channels


#   adjust to fit your location
country_code=FI
#   Here is the authoritative list of countries:
#   http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm

#   let your AP broadcast the settings that agree with the above-mentioned regulatory requirements per country
ieee80211d=1


#   adjust to fit your preference
ssid=Video


#   this is how I set mine up - works perfectly for iPhone, Mac OS X (SnowLeopard) & Linux
auth_algs=3
wpa=3
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
macaddr_acl=0


#   these have to be set in agreement w/ channel and some other values... read hostapd.conf docs
ht_capab=[MAX-AMSDU-3839][DSSS_CCK-40][MAX-RX-AMPDU-65535][MIN-RX-AMPDU-8]
#  ...  these can be tuned to specific capabilities per device/chipset


#  IIUC, this enables reauthentication for clients, so the passphrase doesn't have to be re-entered
eap_reauth_period=3600000
#   ... my understanding... 3600 seconds = 1 hr, so your device would have to reauthenticate if it rejoined after 1 hr
#   I have mine set quite a bit higher than 3600 seconds... so that my iPhone doesn't ask me to type in the password 
#   frequently...  


# makes the SSID visible and broadcasted
ignore_broadcast_ssid=0




#  debugging output - uncomment them to activate; issue  hostapd -d /etc/hostapd/hostapd.conf
#  to get debugging info in visible/real-time form
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2

Thanks


#3

Hey,

did you found a solution ? I’ve tried it 1000 times also with 2 external USB-WIFI-Adabter (TL-WN823N & TL-WN722N) but unfortunately without any success…

Maybe someone else have any ideas…


(Philipp König) #4

:joy: :joy: :joy: :joy:

NO WAY


(Andriy Pankevych) #5

HI,

I’ve spent two day for this. The trick is in module parametr:

]# rmmod bcmdhd ]# modprobe bcmdhd op_mode=2

Then I used create_ap:

]# create_ap --no-virt wlan0 eth0 <AP_Name> <AP_Password>

Works for me on archlinux. You can add it here:

]# cat /etc/modules-load.d/wifi.conf
bcmdhd op_mode=2

Have a nice day.