Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock/AP android"

(Replaced content with "{{rock_header}} If you want to use the radxa rock as a WIFI-AP under android . you can enable the item in settings(More->Portable hotspot->Portable Wi-Fi hotspot). But t...")
 
Line 3: Line 3:
  
 
But the setting will be cancelled after reboot. we provider image resolves the problem,you can download here.[http://pan.baidu.com/s/1hqp96CW  140224_android_softAp.tgz].
 
But the setting will be cancelled after reboot. we provider image resolves the problem,you can download here.[http://pan.baidu.com/s/1hqp96CW  140224_android_softAp.tgz].
 
==== AP mode(RR acts as wireless router) ====
 
 
Enable your hostAP easier
 
 
 
====Prepare works====
 
 
1.1 Compile hostapd
 
 
wget http://dl.radxa.com/rock/source/RTL8723A_WiFi_linux_v4.1.7_8023_BTCOEX20130528_ver3.3_beta.rar
 
sudo apt-get install unrar
 
unrar x RTL8723A_WiFi_linux_v4.1.7_8023_BTCOEX20130528_ver3.3_beta.rar
 
sudo apt-get install build-essential
 
cd RTL8723A_WiFi_linux_v4.1.7_8023_BTCOEX20130528_ver3.3_beta/
 
cd wpa_supplicant_hostapd/
 
tar xzf wpa_supplicant_hostapd-0.8_rtw_r7048.20130424.tar.gz
 
cd wpa_supplicant_hostapd-0.8_rtw_r7048.20130424/
 
make
 
sudo make install
 
sudo mkdir -p /etc/hostapd
 
 
1.2 [[Rock/install toolchain|Install toolchain]].
 
 
1.3 Download the kernel from the address:
 
root@radxa:/tmp# git clone -b radxa-stable-3.0 https://github.com/radxa/linux-rockchip.git
 
 
or download here
 
 
http://pan.baidu.com/s/1jfOTo  (china)
 
 
====Compile the driver====
 
 
=====Attention please: first,ensure your kernel has been compiled=====
 
 
unrar x RTL8723A_WiFi_linux_v4.1.7_8023_BTCOEX20130528_ver3.3_beta.rar
 
cd RTL8723A_WiFi_linux_v4.1.7_8023_BTCOEX20130528_ver3.3_beta
 
cd driver
 
tar zxvf rtl8723A_WiFi_linux_v4.1.7_8023.20130628_BTCOEX20130528_ver3.3_beta.tar.gz
 
cd rtl8723A_WiFi_linux_v4.1.7_8023.20130628_BTCOEX20130528_ver3.3_beta
 
vim Makefile
 
 
=====To select target platform for compilation=====
 
 
47 CONFIG_PLATFORM_I386_PC = n
 
'''48 CONFIG_PTFORM_ANDROID_X86 = n'''
 
49 CONFIG_PLATFORM_JB_X86 = n
 
...
 
...
 
66 CONFIG_PLATFORM_ARM_TCC8920_JB42 = n
 
'''67 CONFIG_PLATFORM_ARM_RK2818 = y'''
 
68 CONFIG_PLATFORM_ARM_URBETTER = n
 
...
 
...
 
'''603 ARCH := arm'''    #the architecture of the CPU.
 
'''604 CROSS_COMPILE := arm-eabi-'''    # the toolchain prefix
 
'''605 KSRC := /media/jim/radxa_rock_linux/linux-rockchip'''  # the path of kernel source
 
 
=====Build wifi driver=====
 
root@radxa:/tmp/driver/rtl8723A_Wi...3.3_beta# '''make'''
 
 
root@radxa:~# '''rm /lib/modules/3.0.36+/kernel/drivers/net/wireless/rtl8723au_lwfinger/8723au.ko'''
 
 
root@radxa:~# '''cp wlan.ko /lib/modules/3.0.36+/kernel/drivers/net/wireless/rtl8723au_lwfinger'''
 
 
root@radxa:~# '''reboot'''
 
 
=====Configure dhcp server,wifi(user,password),autorun the softAP=====
 
 
=====3.1 Configure static IP=====
 
root@radxa:/etc#vim /etc/network/interfaces
 
auto wlan0
 
iface wlan0 inet static
 
address 192.168.2.1
 
netmask 255.255.255.0
 
 
=====3.2 Configure the dhcp server=====
 
 
root@radxa:/etc# '''apt-get install dnsmasq'''
 
 
root@radxa:/etc# '''vim dnsmasq.conf'''
 
 
interface=wlan0
 
bind-interfaces
 
except-interface=lo 
 
dhcp-range=192.168.2.150,192.168.2.254,12h  #configure the range of available ip
 
dhcp-option=3,192.168.2.1  #configure the server
 
 
=====3.3 Make your network faster=====
 
 
root@radxa:/etc# '''apt-get install haveged'''
 
 
=====3.4  Configure the wifi(user,password):=====
 
 
root@radxa:/etc# '''cp /tmp/RTL8723A_WiFi_/wpa_supplicant_hostapd/rtl_hostapd_2G.conf  /etc/hostapd/hostapd.conf'''
 
 
root@radxa:/etc# '''vim /etc/hostapd/hostapd.conf'''
 
 
interface=wlan0
 
ctrl_interface=/var/run/hostapd
 
ssid="user-name"
 
channel=6
 
wpa=2
 
wpa_passphrase="password"
 
#bridge=br0
 
 
=====3.5 Autorun your softAP:=====
 
 
root@radxa:/etc# '''vim wifs.sh'''
 
 
#!/bin/sh
 
#start the AP service
 
#Start hostapd, and it will automatically be bringed up
 
sudo hostapd -B /etc/hostapd/hostapd.conf
 
#Set ip on wlan0
 
sudo /sbin/ip addr add 192.168.2.1/24 dev wlan0
 
#Start dnsmasq
 
sudo /usr/sbin/service dnsmasq start
 
#Start ip_forward
 
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
 
#add iptables rule for NAT
 
sudo /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 
#start haveged
 
sudo /etc/init.d/haveged start
 
 
root@radxa# '''vim /etc/rc.local'''
 
 
'''/etc/wifs.sh'''
 
/lib/init/vars.sh
 
/lib/lsb/init-functions
 
 
root@radxa# reboot
 

Latest revision as of 09:20, 7 February 2015

If you want to use the radxa rock as a WIFI-AP under android . you can enable the item in settings(More->Portable hotspot->Portable Wi-Fi hotspot).

But the setting will be cancelled after reboot. we provider image resolves the problem,you can download here.140224_android_softAp.tgz.