Bananian

Setting up wlan0 as an access point in BPI-R1

47 21208
harry99n replied at Sun Apr 26, 2015 16:10
Hi!

Thanks Tido for his advice. In the meantime BPR1 is working as WLAN client, router and axcess ...

Hi!

hostapd in n-mode now working.
Reason: wrong additional '+' in the line ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]

Thanks for support
Harry

Stybyk  
I make all what you write:
and it don´t make directory with hostapd in etc/...
I can´t find where may be fail. There is the log of "make" driver install...

  1. ..hostapd-0.8_rtw_r7475.20130812/hostapd # make
  2.   CC  main.c
  3.   CC  config_file.c
  4.   CC  ../src/ap/hostapd.c
  5. ../src/ap/wpa_auth_glue.c: In function ‘hostapd_wpa_auth_send_ether’:
  6. ../src/ap/wpa_auth_glue.c:351:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  7.   CC  ../src/ap/wpa_auth_glue.c
  8.   CC  ../src/ap/drv_callbacks.c
  9.   CC  ../src/ap/ap_drv_ops.c
  10.   CC  ../src/ap/utils.c
  11.   CC  ../src/ap/authsrv.c
  12.   CC  ../src/ap/ieee802_1x.c
  13.   CC  ../src/ap/ap_config.c
  14.   CC  ../src/ap/ieee802_11_auth.c
  15.   CC  ../src/ap/sta_info.c
  16.   CC  ../src/ap/wpa_auth.c
  17.   CC  ../src/ap/tkip_countermeasures.c
  18.   CC  ../src/ap/ap_mlme.c
  19.   CC  ../src/ap/wpa_auth_ie.c
  20.   CC  ../src/ap/preauth_auth.c
  21.   CC  ../src/ap/pmksa_cache_auth.c
  22.   CC  ../src/drivers/drivers.c
  23.   CC  ../src/utils/eloop.c
  24.   CC  ../src/utils/common.c
  25.   CC  ../src/utils/wpa_debug.c
  26.   CC  ../src/utils/wpabuf.c
  27.   CC  ../src/utils/os_unix.c
  28.   CC  ../src/utils/ip_addr.c
  29.   CC  ../src/common/ieee802_11_common.c
  30.   CC  ../src/common/wpa_common.c
  31.   CC  ../src/eapol_auth/eapol_auth_sm.c
  32.   CC  dump_state.c
  33.   CC  ../src/eapol_auth/eapol_auth_dump.c
  34.   CC  ../src/radius/radius.c
  35.   CC  ../src/radius/radius_client.c
  36.   CC  ../src/ap/accounting.c
  37.   CC  ../src/ap/vlan_init.c
  38.   CC  ctrl_iface.c
  39.   CC  ../src/ap/ctrl_iface_ap.c
  40.   CC  ../src/crypto/md5.c
  41. ../src/drivers/driver_rtw.c:1439:12: warning: ‘rtl871x_set_acl_remove_sta’ defined but not used [-Wunused-function]
  42.   CC  ../src/drivers/driver_rtw.c
  43.   CC  ../src/drivers/netlink.c
  44.   CC  ../src/drivers/linux_ioctl.c
  45.   CC  ../src/l2_packet/l2_packet_linux.c
  46.   CC  ../src/utils/uuid.c
  47.   CC  ../src/ap/wps_hostapd.c
  48.   CC  ../src/eap_server/eap_server_wsc.c
  49.   CC  ../src/eap_common/eap_wsc_common.c
  50. ../src/wps/wps.c: In function ‘wps_is_addr_authorized’:
  51. ../src/wps/wps.c:280:11: warning: unused variable ‘bcast’ [-Wunused-variable]
  52. ../src/wps/wps.c:279:12: warning: unused variable ‘pos’ [-Wunused-variable]
  53. ../src/wps/wps.c:278:15: warning: unused variable ‘i’ [-Wunused-variable]
  54.   CC  ../src/wps/wps.c
  55.   CC  ../src/wps/wps_common.c
  56.   CC  ../src/wps/wps_attr_parse.c
  57.   CC  ../src/wps/wps_attr_build.c
  58.   CC  ../src/wps/wps_attr_process.c
  59.   CC  ../src/wps/wps_dev_attr.c
  60.   CC  ../src/wps/wps_enrollee.c
  61.   CC  ../src/wps/wps_registrar.c
  62.   CC  eap_register.c
  63.   CC  ../src/eap_server/eap_server.c
  64.   CC  ../src/eap_common/eap_common.c
  65.   CC  ../src/eap_server/eap_server_methods.c
  66.   CC  ../src/eap_server/eap_server_identity.c
  67.   CC  ../src/crypto/crypto_internal-modexp.c
  68. In file included from ../src/tls/bignum.c:21:0:
  69. ../src/tls/libtommath.c: In function ‘mp_exptmod’:
  70. ../src/tls/libtommath.c:580:7: warning: variable ‘dr’ set but not used [-Wunused-but-set-variable]
  71.   CC  ../src/tls/bignum.c
  72.   CC  ../src/crypto/crypto_internal.c
  73.   CC  ../src/crypto/tls_none.c
  74.   CC  ../src/crypto/aes-internal.c
  75.   CC  ../src/crypto/aes-internal-enc.c
  76.   CC  ../src/crypto/aes-wrap.c
  77.   CC  ../src/crypto/aes-cbc.c
  78.   CC  ../src/crypto/aes-internal-dec.c
  79.   CC  ../src/crypto/sha1.c
  80.   CC  ../src/crypto/sha1-internal.c
  81.   CC  ../src/crypto/sha1-pbkdf2.c
  82.   CC  ../src/crypto/md5-internal.c
  83.   CC  ../src/crypto/rc4.c
  84.   CC  ../src/crypto/sha256.c
  85.   CC  ../src/crypto/sha256-internal.c
  86.   CC  ../src/crypto/dh_groups.c
  87.   CC  ../src/crypto/dh_group5.c
  88.   CC  ../src/crypto/random.c
  89.   CC  ../src/utils/base64.c
  90.   CC  ../src/ap/beacon.c
  91.   CC  ../src/ap/wmm.c
  92.   CC  ../src/ap/ap_list.c
  93. ../src/ap/ieee802_11.c: In function ‘handle_action’:
  94. ../src/ap/ieee802_11.c:1393:19: warning: variable ‘sta’ set but not used [-Wunused-but-set-variable]

  95.   CC  ../src/ap/ieee802_11.c
  96.   CC  ../src/ap/hw_features.c
  97.   CC  ../src/ap/ieee802_11_ht.c
  98.   LD  hostapd
  99.   CC  hostapd_cli.c
  100.   CC  ../src/common/wpa_ctrl.c
  101.   LD  hostapd_cli
Copy the Code
Please do you have any idea where will be fail ?




Add post (Tue May 19, 2015 01:06):
Solved by instal with apt-get install hostapd

TS_Fan  
Hello Everyone,

I was able to get my BPI-R1 up and running using this excellent guide.
https://docs.google.com/document ... _XnT0sDg/edit?pli=1

My clients can connect to the bridged wifi successfully. But as soon as there's some heavy traffic the wifi stops working. Only a restart of hostapd helps.

Output from hostapd.
Wireless event: cmd=0x8c04 len=20
wlan0: STA b8:8d:12:0a:74:2e IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED b8:8d:12:0a:74:2e
wlan0: STA b8:8d:12:0a:74:2e WPA: event 2 notification
rtl871x_set_key_ops
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state DISCONNECTED
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state INITIALIZE
rtl871x_set_key_ops
wlan0: STA b8:8d:12:0a:74:2e IEEE 802.1X: unauthorizing port
+rtl871x_sta_remove_ops, b8:8d:12:0a:74:2e is sta address removed
hostapd_ht_operation_update current operation mode=0x0
hostapd_ht_operation_update new operation mode=0x0 changes=0
Wireless event: cmd=0x8c03 len=20
+rtl871x_get_sta_wpaie, b8:8d:12:0a:74:2e is sta's address
Add randomness: count=12 entropy=10
wlan0: STA b8:8d:12:0a:74:2e IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
  New STA
wlan0: STA b8:8d:12:0a:74:2e WPA: event 1 notification
rtl871x_set_key_ops
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA b8:8d:12:0a:74:2e WPA: start authentication
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state INITIALIZE
rtl871x_set_key_ops
wlan0: STA b8:8d:12:0a:74:2e IEEE 802.1X: unauthorizing port
WPA: b8:8d:12:0a:74:2e WPA_PTK_GROUP entering state IDLE
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state AUTHENTICATION
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state AUTHENTICATION2
WPA: Assign ANonce - hexdump(len=32): 94 41 d2 98 6c 45 39 a8 87 90 0f b1 4c 84 3e 11 53 03 05 81 68 bc 89 94 ab cd d6 1f dd 37 33 67
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state INITPSK
WPA: b8:8d:12:0a:74:2e WPA_PTK entering state PTKSTART
wlan0: STA b8:8d:12:0a:74:2e WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
+rtl871x_send_eapol
TX EAPOL - hexdump(len=113): b8 8d 12 0a 74 2e ac a2 13 5c 96 2e 88 8e 02 03 00 5f 02 00 8a 00 10 00 00 00 00 00 00 00 01 94 41 d2 98 6c 45 39 a8 87 90 0f b1 4c 84 3e 11 53 03 05 81 68 bc 89 94 ab cd d6 1f dd 37 33 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: Use EAPOL-Key timeout of 1000 ms (retry counter 1)

Anyone having the same issue? Any help is very much appreciated.

Tido  
Edited by Tido at Tue Jun 23, 2015 07:51

Hi, thank you for the compliment.

You didn't let us know which image you have chosen, but as your hostapd seems to make you trouble, I guess Bananian? And because you're in the Bananian of the of the Forum.

If you have done the backup's as well in the guide, you can now safely give the: armBIAN 2.7 kernel3.4.107   a try.

please report back, when done.

TS_Fan  
Thanks for the quick response.
Sorry, forgot to mention. I am using Bananian 15.04.

I will try armBIAN, although I am kind of reluctant to start all over ;-)
Is there any explanation why armBIAN might work better, to increase my motivation?

Tido  
Yes there is, it has the latest hostapd.
You can also copy it over and try if it works, basically the image from armBIAN is simply more updated.
It features the latest findings and corrections before Bananian.

TS_Fan  
Tido replied at Wed Jun 24, 2015 00:42
Yes there is, it has the latest hostapd.
You can also copy it over and try if it works, basically th ...


Today I tested with Igors new image:

root@lamobo# uname -a
Linux lamobo 3.4.108-lamobo-r1 #8 SMP PREEMPT Sun Jul 12 07:42:07 CEST 2015 armv7l GNU/Linux

Unfortunately the same behaviour. When copying large files over wifi the wifi stops working. Hostapd is still running and I can see the network from my Notebook but cannot connect anymore.

Hostapd ouptut when I try to reconnect:

I tested with:
Wireless event: cmd=0x8c03 len=20
+rtl871x_get_sta_wpaie, c8:85:50:9c:3f:48 is sta's address
wlan0: Event ASSOC (0) received
wlan0: STA c8:85:50:9c:3f:48 IEEE 802.11: associated
STA included RSN IE in (Re)AssocReq
  New STA
ap_sta_add: register ap_handle_timer timeout for c8:85:50:9c:3f:48 (300 seconds - ap_max_inactivity)
wlan0: STA c8:85:50:9c:3f:48 WPA: event 1 notification
rtl871x_set_key_ops
IEEE 802.1X: Ignore STA - 802.1X not enabled or forced for WPS
wlan0: STA c8:85:50:9c:3f:48 WPA: start authentication
WPA: c8:85:50:9c:3f:48 WPA_PTK entering state INITIALIZE
rtl871x_set_key_ops
wlan0: STA c8:85:50:9c:3f:48 IEEE 802.1X: unauthorizing port
WPA: c8:85:50:9c:3f:48 WPA_PTK_GROUP entering state IDLE
WPA: c8:85:50:9c:3f:48 WPA_PTK entering state AUTHENTICATION
WPA: c8:85:50:9c:3f:48 WPA_PTK entering state AUTHENTICATION2
Get randomness: len=32 entropy=1
WPA: Assign ANonce - hexdump(len=32): d8 39 5c df 84 f7 0f 11 91 ce 66 b9 22 c1 20 03 c9 d2 1d 56 f7 1b f1 79 76 ed e7 5d f7 50 6f 55
WPA: c8:85:50:9c:3f:48 WPA_PTK entering state INITPSK
Searching a PSK for c8:85:50:9c:3f:48 prev_psk=(nil)
Searching a PSK for c8:85:50:9c:3f:48 prev_psk=(nil)
WPA: c8:85:50:9c:3f:48 WPA_PTK entering state PTKSTART
wlan0: STA c8:85:50:9c:3f:48 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=1 kde_len=0 keyidx=0 encr=0)

I am using the latest driver btw: RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911


Any ideas what might go wrong?

igorpec  
Can u try the same situation with kernel 4.1.2 ... it's different driver and different hostapd configuration.

schasch  
hello,

did anyone realize this with bananian 15.08?
I can't get it stable to run?!?!?!

If someone got it please tell me the
combination of bananian, hostapd-version and config, 8192cu-driver-version, kernel version and other patched-stuff to get it run.

regards
schasch


schasch  
I got the AP 1504 working but didn't get it to work on 1508.
I copied hostald-rt and hostapd-rt.conf from armbian.
Now I can login again to my AP
maybe it was my old conf. Don't matter anymore.
thanks

You have to log in before you can reply Login | Sign Up

Points Rules