LeMaker Guitar:WiFi configuration

From BananaPro/Pi
Jump to: navigation, search

Other languages:
English • ‎中文(简体)‎

Description

The Guitar use the RTL8723BS module which integrates WIFI/BT function blocks.The following tutorial will tell you how to use the WIFI.


WIFI station mode

Load the WIFI driver

For LeMaker Guitar, the operating system will auto load wlan_8723bs WIFI driver by default. You can type the command as below to list all drivers

lsmod
Module                  Size  Used by
…
wlan_8723bs          1327715  0
….

But If you can’t find the wlan_8723bs WIFI driver, you should type the command as below to load the WIFI driver.

sudo modprobe wlan_8723bs


If you want to auto load the WIFI driver when you boot the operating system, you should add “wlan_8723bs” into the /etc/modules file

sudo nano /etc/modules
wlan_8723bs

Configure WIFI

Lemuntu

For Lemuntu, you can connect to the WIFI AP by using the wpa_gui as follow:
WIFI Conf1.png


WIFI Conf2.png


WIFI Conf3.png


The configure paramters will be saved in /etc/wpa_supplicant/wpa_supplicant.conf.

cat /etc/wpa_supplicant/wpa_supplicant.conf 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
 
 
network={
        ssid="LeMaker"    	#WIFI Name
        psk="****** "		#WIFI password
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}

Ubuntu-Mate

For Ubuntu-mate, you can connect to the WIFI AP by clicking the button which is at the right-up corner of the desktop.
WIFI Conf Ubuntu mate.png

Linux without desktop

If you use the Linux-like system without desktop, we recommend you to use wpa_supplicant tool to connect WIFI AP.
Install wpa_supplicant

sudo apt-get install wpasupplicant


Edit the wpa_supplicant.conf

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf


Add the content below into the wpa_supplicant.conf. If the wpa_supplicant.conf is not exist, you need create one. ssid: the WIFI AP name, psk: the password of WIFI AP.

ap_scan=1 # use the wpa_supplicant to scan and choose the AP
network={
		ssid=”your_wifi_name”
		psk=”your_wifi_password”
}


Edit /etc/network/interfaces

sudo nano /etc/network/interfaces


Edit the wlan part of the interfaces file:

auto wlanx
iface wlanx inet dhcp
pre-up wpa_supplicant -B -i wlanx -c/etc/wpa_supplicant/wpa_supplicant.conf
pre-down killall -q wpa_supplicant

Note: wlanx represent wlan0,wlan1 ...

WIFI AP mode

If you want to use the WIFI AP mode, you can refer to the instructions as below.
Step 1: Load WIFI driver

sudo modprobe wlan_8723bs


Step 2: Install hostapd tool

sudo apt-get install git
 
 
git clone git://github.com/tgraf/libnl-1.1-stable.git #install libnl
cd libnl-1.1-stable/
./configure
make
sudo make install
 
 
sudo apt-get install libnl-3-dev
sudo apt-get install openssl
sudo apt-get install libssl-dev
 
 
git clone git://w1.fi/srv/git/hostap.git
cd hostap/hostapd/
cp defconfig .config
make
sudo make install

Create and edit the hostapd.conf

sudo mkdir -p /etc/hostapd
sudo nano /etc/hostapd/hostapd.conf
interface=wlanx
driver=nl80211
ssid=LeMaker_1020       
channel=6
hw_mode=g
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


Step 3: Edit the network interfaces

sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan1
iface wlan1 inet static
address 192.168.100.1
netmask 255.255.255.0


Step 4: Install the DHCP server

sudo apt-get install udhcpd
sudo nano /etc/udhcpd.conf
# The start and end of the IP lease block
 
 
start           192.168.100.20  #default: 192.168.0.20
end            192.168.100.254 #default: 192.168.0.254
 
 
# The interface that udhcpd will use
 
 
interface       wlan2            #default: eth0
 
 
#Examles
opt     dns     192.168.100.1 8.8.8.8
option  subnet  255.255.255.0
opt     router  192.168.100.1
opt     wins    192.168.100.1
option  dns     129.219.100.1   # appened to above DNS servers for a total of 3
option  domain  local
option  lease   864000          # 10 days of seconds


Step 5: Reboot and start DHCP and hostapd

sudo reboot
udhcpd /etc/udhcpd.conf
hostapd –B /etc/hostapd/hostapd.conf


Note: wlanx represent wlan0,wlan1 ...


Now you can use the LeMaker Guitar as a wireless access point.

See also

  1. http://w1.fi/hostapd/
  2. http://w1.fi/wpa_supplicant/
  3. http://www.infradead.org/~tgr/libnl/