caiwang / board2ihost

0 stars 0 forks source link

radxa setup hostapd #39

Open caiwang opened 9 years ago

caiwang commented 9 years ago

Issue by caiwang Sunday Mar 01, 2015 at 04:04 GMT Originally opened as https://github.com/caiwang/ihostsrc/issues/39


root@radxa:~# apt-get install -y hostapd Reading package lists... Done Building dependency tree
Reading state information... Done The following NEW packages will be installed: hostapd 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 360 kB of archives. After this operation, 874 kB of additional disk space will be used. Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe hostapd armhf 1:2.1-0ubuntu1 [360 kB] Fetched 360 kB in 6s (53.0 kB/s)
Selecting previously unselected package hostapd. (Reading database ... 21296 files and directories currently installed.) Preparing to unpack .../hostapd_1%3a2.1-0ubuntu1_armhf.deb ... Unpacking hostapd (1:2.1-0ubuntu1) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for ureadahead (0.100.0-16) ... Setting up hostapd (1:2.1-0ubuntu1) ... Processing triggers for ureadahead (0.100.0-16) ...

caiwang commented 9 years ago

Comment by caiwang Sunday Mar 01, 2015 at 04:06 GMT


sed -i 's|#DAEMON_CONF=""|DAEMON_CONF="/etc/hostapd/hostapd.conf"|g' /etc/default/hostapd

root@radxa:~# cat /etc/default/hostapd | grep DAEMON_CONF

Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration

DAEMON_CONF="/etc/hostapd/hostapd.conf"

caiwang commented 9 years ago

Comment by caiwang Sunday Mar 01, 2015 at 04:07 GMT


rm /etc/hostapd/hostapd.conf

echo "interface=wlan0 driver=nl80211 hw_mode=g ssid=mmtx channel=2

ignore_broadcast_ssid=0 auth_algs=1 wpa=1 wpa_psk_file=/etc/hostapd-psk wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP TKIP rsn_pairwise=CCMP" > /etc/hostapd/hostapd.conf

caiwang commented 9 years ago

Comment by caiwang Sunday Mar 01, 2015 at 04:07 GMT


echo "00:00:00:00:00:00 matrixadmin" > /etc/hostapd-psk

caiwang commented 9 years ago

Comment by caiwang Sunday Mar 01, 2015 at 04:19 GMT


root@radxa:~# hostapd -dd /etc/hostapd/hostapd.conf random: Trying to read entropy from /dev/random Configuration file: /etc/hostapd/hostapd.conf nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory) rfkill: initial event: idx=0 type=2 op=0 soft=1 hard=0 nl80211: Remove monitor interface: refcount=0 netlink: Operstate: ifindex=5 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP) nl80211: Set mode ifindex 5 iftype 2 (STATION) nl80211: Failed to set interface 5 to mode 2: -19 (No such device) nl80211 driver initialization failed. hostapd_interface_deinit_free(0xb26f0) hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1 hostapd_interface_deinit(0xb26f0) hostapd_bss_deinit: deinit bss wlan0 hostapd_cleanup(hapd=0xb3308 (wlan0)) hostapd_free_hapd_data: Interface wlan0 wasn't started hostapd_interface_deinit_free: driver=(nil) drv_priv=(nil) -> hapd_deinit hostapd_interface_free(0xb26f0) hostapd_interface_free: free hapd 0xb3308 hostapd_cleanup_iface(0xb26f0) hostapd_cleanup_iface_partial(0xb26f0) hostapd_cleanup_iface: free iface=0xb26f0 root@radxa:~#

caiwang commented 9 years ago

Comment by caiwang Sunday Mar 01, 2015 at 06:58 GMT


remove

root@radxa:~# apt-get remove hostapd Reading package lists... Done Building dependency tree
Reading state information... Done The following packages will be REMOVED: hostapd 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 874 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 21319 files and directories currently installed.) Removing hostapd (1:2.1-0ubuntu1) ...