BPI-R2 2.4Ghz and 5.6Ghz Wifi Working fine

Thank you, already ordered :smiley:

Maybe some one configured AP with DHCP server. I have error during starting dhcp server.

Look in my wiki,there is dnsmasq used as dhcp on ap0

I created a file in ‘/etc/dnsmasq.d/interfaces.conf’ with:

#interface=eth0
#interface=wlan0
#interface=eth1
interface=ap0
 
# DHCP-Server not active for Interface
#no-dhcp-interface=ppp0
no-dhcp-interface=eth0
no-dhcp-interface=eth1
 
#dhcp-authoritative
dhcp-range=ap0,192.168.10.100,192.168.10.150,255.255.255.0,48h
dhcp-option=ap0,3,192.168.10.1
#dhcp-range=wlan1,192.168.11.100,192.168.11.150,255.255.255.0,48h
#dhcp-option=wlan1,3,192.168.11.1

Then echo A >/dev/wmtWifi (activate AP-Mode) hostapd -dd /etc/hostapd/hostapd.conf

Then started 'service dnsmasq start'

Wifi AP is visible, but clients get strange ip and mask 255.255.0.0

You must enable the dnsmasq.d folder in /etc/dnsmasq.conf

Ok, i see that this part is missing on top,but it’s in ip-configuration-section

/etc/dnsmasq.conf (activate line by removing # on begin of line)

conf-dir=/etc/dnsmasq.d

I missed that one, thank you. I edited file Uncommented only one row. And restart dnsmasq, but the same, client can’t get ip. What else I can do wrong?

# Include another lot of configuration options.
#conf-file=/etc/dnsmasq.more.conf
conf-dir=/etc/dnsmasq.d

# Include all the files in a directory except those ending in .bak
#conf-dir=/etc/dnsmasq.d,.bak

# Include all files in a directory which end in .conf
#conf-dir=/etc/dnsmasq.d/,*.conf

Have you set an ip+subnet to your ap0-interface?

any errors (syslog) when starting dnsmasq?

Well done! Clients are getting ip correctly! I thought that one must be executed only once… Frank W, Thank you! And one more time for your wiki.

Since the ap is created manually after boot via wmt-tools/echo the ip must be set after that. Thats why i do that all with script. But i dont’t know if uploaded my last version.

Currently there is a Problem after stopping/restarting hostapd…maybe this can be fixed with echo 0>/dev/wmtWifi,but i have not tested it yet…and after that we must start at echo A…

i have tested and can confirm that AP is visible again after killing hostapd if wifi device is resetted via

echo 0 > /dev/wmtWifi
echo A > /dev/wmtWifi

I’ve test the AP mode, find it works fine, please follow my steps to enable it.

Firstly please install Ubuntu 16.04 image, and then:

Remove pkg wpasupplicant(apt-get remove wpa_supplicant) if you’re using Ubuntu 16.04 image

Comment out echo 1 > ${{WIFI_DEV} in /etc/init.d/wifi_enable if you’re using Ubuntu 16.04 image

Reboot

Run command “echo A >/dev/wmtWifi”

Run comand : hostapd -dd -C /etc/hostapd/hostapd.conf

Below is an example of hostapd.conf: hw_mode=g interface=ap0 driver=nl80211 channel=1 auth_algs=1 ssid=test Also the patch @BitMaster provided is delivered to github. Thanks a lot, BitMaster. https://github.com/BPI-SINOVOIP/BPI-R2-bsp/commit/219be3221aadb2d316557df8064bb231ca46ed5123

When I try to apt-get remove wpa_supplicant, It does not found any package. When I try, apt-get remove wpasupplicant, It deletes networks manager too.

Also "hostapd -dd -C /etc/hostapd.conf " command is not working.

apt-get remove wpasupplicant

is right command, and yes you cannot use Network-manager if you want to use AP-Mode

make sure you have created a config /etc/hostapd.conf if passing that to hostapd…i did not use -C flag of hostapd

Ä°f I cannot use network manager, How Will I make hotspot configs or options? I mean How can I bridge eth0 to wireless and arrange or enable a hotspot name, password or specifications?

Also, Any hostapd app is not enable on lastest Ubuntu image, I have installed the app after. So, There is no /etc/hostapd/hostapd.conf

You must it create it, you’ll find simple examples in my wiki

Forgive me. I can’t find it. Can you send me a link about this subject?

http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:wlan#internal

1 Like

since I started the bridge consisting of all five Lan-interfaces my syslog gets flooded with these entries:

 Feb  2 17:15:01 supernane kernel: [98816.052946] [WMT-DEV][W]WMT_open:wait_event_timeout (2000)ms,(200)jiffies,return -EIO

Does someone have an idea what this might mean?

WMT-DEV sounds like the driver for internal wifi…maybe you can search for that string in drivers/misc/mediatek and simply disable this message

drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_dev.c:2336:	WMT_WARN_FUNC("wait_event_timeout (%d)ms,(%d)jiffies,return -EIO\n",

one line before that was called:

ret = wait_event_timeout(gWmtInitWq, gWmtInitDone != 0, msecs_to_jiffies(WMT_DEV_INIT_TO_MS));

But it’s strange that this message comes when lan-ports are bridged which should be independend from wifi-chip

maybe you can set the debug-level to show only errors:

drivers/misc/mediatek/connectivity/common/conn_soc/linux/pri/wmt_exp.c:65:UINT32 gWmtDbgLvl = WMT_LOG_DBG; //=> WMT_LOG_ERR

I have an issue with Wifi. It takes for ever to connect, i try from different mobile or laptop same issue.

Syslog:

Feb  4 20:01:36 bpi-r2 hostapd: ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: associated
Feb  4 20:01:46 bpi-r2 hostapd: ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: disassociated
Feb  4 20:01:48 bpi-r2 hostapd: ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: associated
Feb  4 20:01:58 bpi-r2 hostapd: ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: disassociated
Feb  4 20:01:59 bpi-r2 hostapd: ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: associated
Feb  4 20:02:09 bpi-r2 hostapd: ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: disassociated
...

Whith hostapd in debug you can see the follwing logs:

ap0: Event DISASSOC (1) received
ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.11: disassociated
ap0: AP-STA-DISCONNECTED b4:9d:0b:zz:yy:xx
ap0: STA b4:9d:0b:zz:yy:xx WPA: event 2 notification
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=0x58dff8 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=b4:9d:0b:zz:yy:xx
WPA: b4:9d:0b:zz:yy:xx WPA_PTK entering state DISCONNECTED
WPA: b4:9d:0b:zz:yy:xx WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=12 (ap0) alg=0 addr=0x58dff8 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=b4:9d:0b:zz:yy:xx
nl80211: Set STA flags - ifname=ap0 addr=b4:9d:0b:zz:yy:xx total_flags=0x0 flags_or=0x0 flags_and=0xfffffffe authorized=0
ap0: STA b4:9d:0b:zz:yy:xx IEEE 802.1X: unauthorizing port
Could not set station b4:9d:0b:zz:yy:xx flags for kernel driver (errno=11).
nl80211: sta_remove -> DEL_STATION ap0 b4:9d:0b:zz:yy:xx --> 0 (Success)
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
ap_free_sta: cancel ap_handle_timer for b4:9d:0b:zz:yy:xx

/etc/hostapd/hostapd.conf:

interface=ap0
bridge=br0
driver=nl80211
hw_mode=g
channel=6

ieee80211n=1
wmm_enabled=1

ssid=<SSID>
auth_algs=1
macaddr_acl=0
wpa=2
wpa_key_mgmt=WPA-PSK  
#sets encryption used by WPA2
rsn_pairwise=CCMP
wpa_passphrase=<passphrase>

ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

How is br0 defined? Have you set an ip on it and a dhcp-server?