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

Rock/Wireless

< Rock
Revision as of 17:46, 9 February 2014 by 79.255.17.223 (Talk)

Before start

The Radxa Rock provides various ways to connect, wired and wireless. The full version has wifi and bluetooth on board, and lite version has wifi only. Both module are connect to the cpu via the USB interface.

Using wireless under Android

The wifi and bluetooth(if has) works out of the box, check out in the Setting to configure it.

Using wireless under Linux

Wifi

The model number of the module on RR and RR lite is RTL8723AU on RR full version and RTL8188ETV on lite version. You can see the id of the module with the following command on RR:

   sudo apt-get install usbutils
   lsusb

For RR full version the output is

   root@radxa:~# lsusb
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
   Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
   Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
   Bus 002 Device 003: ID 0bda:0724 Realtek Semiconductor Corp.

on lite version, the output is:

   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                  
   Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                  
   Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB         
   Bus 002 Device 003: ID 0bda:0179 Realtek Semiconductor Corp.    

The 0bda:0724 is the id of rtl8723 modlue, the 0bda:0179 is the id of rtl8188etv module.

Manually config to connect wireless router

To use RR(lite) to connect to your wireless router, you need to do the following:

   apt-get install wireless-tools
   apt-get install wpasupplicant
   ifconfig wlan0 up

Now you can view is the wifi module works by scanning the AP nearby

   iwlist wlan0 scan


edit /etc/wpa_supplicant.conf

   ctrl_interface=/var/run/wpa_supplicant
   network={
   	ssid="your ssid name"
   	psk="your wireless password"
   }

and then run

   wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf 

to connect to the wireless router.

If you want to set the RR to connect to the wireless router automatically every time it boot up. Add the following to the /etc/network/interfaces

   auto wlan0
   iface wlan0 inet dhcp
   wpa-conf /etc/wpa_supplicant.conf

AP mode(RR acts as wireless router)

Bluetooth

to get the driver:

  git clone https://github.com/lwfinger/rtl8723au_bt

To compile the driver, you need to have compiled your own Kernel like described in

 http://wiki.radxa.com/Rock/Booting_Linux

Then on your Linux host computer you will find a directory "/lib/modules/3.0.36+/" containing a "kernel" directory and two symbolic links called "build" and "source" to your Rockchip kernel source directory (originally called "rockchip-3.0") wherever you downloaded it to. This is the prerequisite for compiling rockchip modules.

Then change into the bluetooth driver directory rtl8723au_bt and edit the textfile called "Makefile". My "Makefile" now looks like this, I marked the changes bold:

 FW_DIR	:= /lib/firmware/rtk_bt
 MDL_DIR	:= /lib/modules/3.0.36+
 DRV_DIR	:= $(MDL_DIR)/kernel/drivers/bluetooth
     
 ifneq ($(KERNELRELEASE),)
     
        obj-m := rtk_btusb.o
     
 else
    PWD := $(shell pwd)
    KVER := "3.0.36+"
    KDIR := /lib/modules/3.0.36+/build
    all:
    $(MAKE) -C $(KDIR) M=$(PWD) modules
   
   clean:
     rm -rf *.o *.mod.c *.mod.o *.ko *.symvers *.order *.a
 endif
     
 install:
      mkdir -p $(FW_DIR)
      cp -f rlt8723a_chip_b_cut_bt40_fw_asic_rom_patch-svn8511-0x0020342E-20121105-LINUX_USB.bin $(FW_DIR)/rtk8723a.bin
      cp -f rtk_btusb.ko $(DRV_DIR)/rtk_btusb.ko
      #depmod -a $(MDL_DIR)'
      #echo "install rtk_btusb success!
      
 uninstall:
      rm -f $(DRV_DIR)/rtk_btusb.ko
      depmod -a $(MDL_DIR)
      rm -f $(FW_DIR)/rtk8723a.bin
      echo "uninstall rtk_btusb success!"


Then do

 export ARCH=arm
 export CROSS_COMPILE=arm-linux-gnueabihf-
 make
 sudo make install

After that copy the following files from the host system into the same folder on Radxa Rock:

 /lib/firmware/rtk_bt/rtk8723a.bin
 /lib/modules/3.0.36+/kernel/drivers/bluetooth/rtk_btusb.ko

Last on Radxa Rock system change into the folder

 /lib/modules/3.0.36+/kernel/drivers/bluetooth 

and enter the command

 sudo insmod rtk_btusb.ko

Now "hcitool dev" recognizes the adapter (hci0) and "hcitool scan" finds remote bluetooth devices. But I could not get any device to pair. Any ideas appreciated.

Alex letux@arcor.de