• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinokernel and ubootSteps to make pcDuino v2 a WiFi Access Point (AP)
Previous Next

Steps to make pcDuino v2 a WiFi Access Point (AP)

Posted by: Yang , December 31, 2013

[vc_row][vc_column width=”1/1″][vc_message color=”alert-warning” style=”rounded”]This tutorial is use to pcDuino V2 with black wifi module (rt1818cus driver) and pcDuino Lite WiFi with black wifi module (rt1818cus driver)

The pcDuino 2 / 3, Lite Wifi with Green WiFi Module (rt1818eus driver) is different .[/vc_message][vc_column_text]pcDuino V2 has an on board WiFi module already, and the part number of this wifi module is rtl8188cus, which is different from the previous module rt5370st for pcDuino V1. This new wifi module also has AP function. Many people have done the AP function with rtl8188 on Raspberry Pi, but it’s not working on pcDuino with the same method. In this tutorial, we are going to show you how to make pcDuino v2 a wireless access point (AP).

1[/vc_column_text][vc_tour][vc_tab title=”Download and Install software packages” tab_id=”1388459563-1-12″][vc_column_text]1.Download  software tools:

$sudo apt-get update

$sudo apt-get install git vim

$sudo apt-get install isc-dhcp-server

2. Download source code for drivers from official website:

$wget ftp://WebUser:Lc9FuH5r@58.211.24.153/cn/wlan/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip

#http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#2742

3.Download header file for compiling the driver:

$sudo apt-get install pcduino-linux-headers-3.4.29+

$cd  /usr/src/ linux-headers-3.4.29+/arch

$cp  arm  armv7l  -rf

Note:  You will need to reboot pcDuino after this step if you are using pcDuino Lite wifi, wait for  3 seconds at  u-boot stage, enter the command, otherwise it can not be started properly.

$setenv loglevel 8 ramfs

$boot

$mount  /deV/nandd /mnt

$cd  /mn lib/modules/3.4.29+/kernel/drivers

$rm gpu –rf

$reboot

4. Delete original “8188cu.ko”:

$rm  /lib/modules/3.4.29+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko

$rm  /lib/modules/3.4.29+/kernel/drivers/net/wireless/8192cu.ko

5. Compile installing driver:

$unzip  RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip

$cd   RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911

$chmod +x install.sh

$sudo ./install.sh

6. Finish Installation:

ubuntu@ubuntu:~/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911$ lsmod

Module                  Size  Used by

8192cu                624916  0

sw_interrupt            2424  0

gpio                    4509  0

pwm                     5050  0

adc                     1671  0

hardwarelib             1551  4 sw_interrupt,gpio,pwm,adc

rt5370sta             616973  0

[/vc_column_text][/vc_tab][vc_tab title=”hostapd” tab_id=”1388459563-2-8″][vc_column_text]The built-in hostapd can’t support system service mode. However, there are one package available online.

$git clone https://github.com/jenssegers/RTL8188-hostapd

$cd RTL8188-hostapd/hostapd

$sudo make install

Install 8188’s hostapd:

$cd  RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd

$tar xvf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz

$cd  hostapd

$sudo make install

Configure hostapd:

$vim  /etc/hostapd/hostapd.conf

# Basic configuration

interface=wlan3  #it depends on your own connection

ssid=wifi

channel=1

#bridge=br0

# WPA and WPA2 configuration

macaddr_acl=0

auth_algs=1

ignore_broadcast_ssid=0

wpa=3

wpa_passphrase=12345678

wpa_key_mgmt=WPA-PSK

wpa_pairwise=TKIP

rsn_pairwise=CCMP

# Hardware configuration

driver=rtl871xdrv

ieee80211n=1

hw_mode=g

device_name=RTL8192CU

manufacturer=Realtek

service hostapd restart

Name this wifi AP as wifi, password as 12345678

Now you need to reset your wifi password, and you can find this wifi available, but if it’s not working, you need to configure your internet.

vim /etc/network/interfaces

auto wlan3

iface wlan3 inet static

        address 192.168.100.1

        netmask 255.255.255.0              

service networking restart

Configure dhcp:

vim /etc/dhcp/dhcpd.conf #add it in the end

subnet 192.168.100.0 netmask 255.255.255.0 {

  range 192.168.100.10 192.168.100.100;

  option routers 192.168.100.1;

  option domain-name-servers 8.8.8.8;

}

service isc-dhcp-server restart

[/vc_column_text][/vc_tab][vc_tab title=”Configue it to be automatically start” tab_id=”1388460638113-2-9″][vc_column_text]Dhcpd can start after hostapd started, hostapd can shut down after dhcpd shut down.

$update-rc.d hostapd defaults 80 20

$update-rc.d isc-dhcp-server defaults 90 10

[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: kernel and uboot, Showcase, WiFi

Share!
Tweet

Yang

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors