Page 1
RS9113-n-Link-Module-Driver- Installation-Guide October 2014 Redpine Signals, Inc. 2107 N. First Street, #680 San Jose, CA 95131. Tel: (408) 748-3385 Fax: (408) 705-2019 Email: info@redpinesignals.com Website: www.redpinesignals.com Redpine Signals, Inc. Proprietary and Confidential...
Page 2
Disclaimer: The information in this document pertains to information related to Redpine Signals, Inc. products. This information is provided as a service to our customers, and may be used for information purposes only. Redpine assumes no liabilities or responsibilities for errors or omissions in this document.
Driver Installation Procedure..........30 10.2 Building and running the sample HA switch application ..30 About sample application ..............30 Host API folder structure ..............30 Application state machine ..............31 Stack callbacks ................31 Redpine Signals, Inc. Proprietary and Confidential Page 3...
Page 4
Starting DHCP Server/Client ........... 35 Appendix: ................ 36 Iperf cross compilation: ............36 14.1 14.2 Configuration of kernels from 3.13 to 3.16 to support the Driver ………………………………………………………………………………….37 BT Porting for Android:............ 39 Redpine Signals, Inc. Proprietary and Confidential Page 4...
1 Introduction This document describes how to bring up the Redpine’s OneBox-Mobile Coexistence software based on RS9113 chipset on x86 or any embedded platform. OneBox-Mobile Coexistence software currently supports WiFi mode which has Access Point, Client and WiFi-Direct (P2P) modes and Bluetooth Classic, Bluetooth Low Energy and Zigbee modes.
Note: The example showed here is a generic release package for Linux OS. The package name may get changed accordingly based on the customer releases. For eg: cp RS9113.NXX.NL.GEN.LNX.x.x.x.tgz redpine/ Contents of the release package are 1) Readme 2) Release Notes 3) Documents Redpine Signals, Inc. Proprietary and Confidential Page 6...
Page 7
Untar the driver source using the following command # tar xzvf host.tgz host Follow the compilation procedure mentioned in Compilation Procedure on various platforms. Note that the compiled binaries will be finally copied in to the “/home/rsi/release” directory Redpine Signals, Inc. Proprietary and Confidential Page 7...
EDIT the DEF_KERNEL_DIR path in the Makefile as shown below. # DEF_KERNEL_DIR := (Platform Compiled Kernel path) For example: If the kernel build path is in /work/redpine folder, then the DEF_KERNEL_DIR should be modified as # DEF_KERNEL_DIR:= /work/redpine/linux-x.x.x. Redpine Signals, Inc. Proprietary and Confidential Page 8...
Page 9
For example , if the target platform is ARM and tool chain path is “/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl- linux-gnueabi/bin/arm-none-linux-gnueabi-“ then the command is issued as # make ARCH=arm CROSS_COMPILE = /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl- linux-gnueabi/bin/arm-none-linux-gnueabi- Please check the below snapshots for reference. Figure 1: Menuconfig Utility Main page Redpine Signals, Inc. Proprietary and Confidential Page 9...
Page 10
Figure 2: Selecting the interface type to test the driver Figure 3: Save the changes before exiting Redpine Signals, Inc. Proprietary and Confidential Page 10...
4 Software Boot loader Flashing For the driver versions 1.0.1e and above, software boot loader is • required for driver to work. On RS9113 cards with out Software boot loader, MBR and Software boot loader need to be flashed onto the card.
Page 12
SDIO DIP switch settings before flashing Boot loader Redpine Signals, Inc. Proprietary and Confidential Page 12...
/home/rsi/release/firmware folder before running the script. Run sbl_upgrade.sh script present in /home/rsi/release/ folder. • #sh sbl_upgrade.sh On successful upgradation, you can see the print “SWBL • FLASHING THROUGH SWBL PASSED…” in dmesg. Redpine Signals, Inc. Proprietary and Confidential Page 13...
Before running the script User needs to enable the appropriate network block settings with the information about the Accesspoint to connect with. The scripts mentioned here are present in /home/rsi/release path. Redpine Signals, Inc. Proprietary and Confidential Page 14...
Page 15
To configure the station in WEP-Shared (64-bit) mode use the • following configuration settings in the sta_settings.conf file network ={ ssid=“ SSID of the AP to connect with” wep_key0= “abcde” wep_tx_keyidx= 0 key_mgmt=NONE Redpine Signals, Inc. Proprietary and Confidential Page 15...
Page 16
SSID of the AP to connect with” key_mgmt=WPA-PSK psk=Passphrase specified at AP side proto=WPA2 pairwise=CCMP group=CCMP Run the following script to load the driver modules followed by starting the supplicant.. cd /home/rsi/release • sh start_sta.sh • Redpine Signals, Inc. Proprietary and Confidential Page 16...
Testing procedure: Deep sleep feature can be tested by measuring power consumption with/without Deep sleep. Note: Currently not supporting this feature. 6.5 Connecting to Hidden AP To connect to hidden AP, enable the below configuration in sta_settings.conf network={ Redpine Signals, Inc. Proprietary and Confidential Page 17...
To start the Access point in WEP-64 security mode use the following command $ sh start_ap.sh wpa_supplicant_wep64.conf • The Access point is configured with the following settings 1) SSID of the AP = “onebox_wep” Redpine Signals, Inc. Proprietary and Confidential Page 18...
Page 19
The Access point is configured with the following settings 1. SSID of the AP = “onebox_ccmp” 2. Frequency (2.4 GHz) – 2412 3. Security mode = CCMP 4. Pass phrase = “12345678” Redpine Signals, Inc. Proprietary and Confidential Page 19...
The following steps are to be followed to start the device in WiFi Direct mode. 1. sh start_p2p.sh The above command starts the device in p2p mode. After starting the supplicant the p2p_commands mentioned in the below section should be executed. Redpine Signals, Inc. Proprietary and Confidential Page 20...
To connect legacy stations to the p2p group the passphrase can be generated using the below command ./wpa_cli –i wifi0 p2p_get_passphrase This command gives the passphrase, using which the legacy stations(non p2p stations) can connect to the p2p group. Redpine Signals, Inc. Proprietary and Confidential Page 21...
By entering hciconfig, the below information is printed on the console: hci0: Type: BR/EDR Bus: SDIO BD Address: 00:23:A7:00:05:68 ACL MTU: 1021:8 SCO MTU: 30:8 UP RUNNING PSCAN RX bytes:478 acl:0 sco:0 events:20 errors:0 TX bytes:331 acl:0 sco:0 commands:19 errors:0 Redpine Signals, Inc. Proprietary and Confidential Page 22...
Page 23
After the device is up, we can pair with other devices or from other devices using Bluetooth Manager application. Files can also be sent and received using Bluetooth Manager. Instead of Bluetooth Manager, the device can be configured using hcitool or hciconfig. Redpine Signals, Inc. Proprietary and Confidential Page 23...
8 Installation and usage of Bluetooth manager The required RPM can be downloaded and installed from the link: ftp://rpmfind.net/linux/fedora/linux/updates/17/i386/blueman-1.23- 5.fc17.i686.rpm Here are few images of Bluetooth Manager: Figure 4: Bluetooth Manager basic window Redpine Signals, Inc. Proprietary and Confidential Page 24...
Page 25
Figure 5: Select the appropriate bluetooth interface Figure 6: Click on Search to inquire Redpine Signals, Inc. Proprietary and Confidential Page 25...
Page 26
Figure 7: Select particular device, right click and select Pair to pair with that device Figure 8: Select particular device, right click and select Send a file to send file to that device Redpine Signals, Inc. Proprietary and Confidential Page 26...
If the driver is loaded properly, the above command displays a network adapter with name “hciX”. For example: By entering hciconfig, the below information is printed on the console: hci0: Type: BR/EDR Bus: SDIO BD Address: 00:23:A7:00:05:68 ACL MTU:1021:2048SCOMTU:8:2483 UP RUNNING PSCAN Redpine Signals, Inc. Proprietary and Confidential Page 27...
-i hci0 lecc C0:FF:EE:C0:FF:EE 9.6 Slave Mode Connected State: 1. Our device should be in advertising state hciconfig -a <hciX> leadv Ex: hciconfig -a hci0 leadv 2. Then initiate connection from 3 party Redpine Signals, Inc. Proprietary and Confidential Page 28...
After exchanging the simple descriptors, it will send the toggle command to the light continuously. 2. Host API folder structure The folder structure for host API along with sample applications has been given bellow. This folder structure is available in /host/zigbee/utils Redpine Signals, Inc. Proprietary and Confidential Page 30...
“/ref_apps/src” The callback functions that are available in the app_callbacks.c are given bellow. 1) AppScanCompleteHandler() 2) AppEnergyScanResultHandler() 3) AppNetworkFoundHandler() 4) AppZigBeeStackStatusHandler() 5) AppIncomingManyToOneRouteRequestHandler() 6) AppHandleDataIndication() 7) AppHandleDataConfirmation() 8) AppChildJoinHandler() Redpine Signals, Inc. Proprietary and Confidential Page 31...
4) To build Home automation switch app use the following command 5) #make switch 6) Check for the binary “switch” after building completes 7) run the switch app by giving following command 8) #./switch Redpine Signals, Inc. Proprietary and Confidential Page 32...
User can use bt_remove.sh script present in host/release folder to remove BT modules alone without removing Common HAL and WLAN modules. Note: Please note that for both BT Classic and BLE, same scripts(bt_insert.sh and bt_remove.sh) are used. Redpine Signals, Inc. Proprietary and Confidential Page 33...
User can disable the driver debug prints appearing on the console using following command. To use this command make sure that the driver modules are inserted in to the kernel. $ echo 0x0 > /proc/onebox-mobile/debug_zone/ Redpine Signals, Inc. Proprietary and Confidential Page 34...
Go to /home/rsi/release #cd /home/rsi/release # sh dhcp_server.sh <interface-name> Eg: sh dhcp_server.sh wifi0 In case of IMX53 platform use the below command to start dhcp server. $ dhcpd wifi0 start. Redpine Signals, Inc. Proprietary and Confidential Page 35...
7) Issue the following command after make is completed make install 8) Copy the iperf executable to the /usr/sbin or /sbin folder in the root file system cd /work/iperf-2.0.1 "cp bin/iperf /usr/sbin/" or "cp iperf /sbin/" Redpine Signals, Inc. Proprietary and Confidential Page 36...
If Bluetooth is being used, then ensure that the bluetooth modules are compiled in the kernel. If the bluetooth modules are not present, then follow the steps below in order to enable bluetooth support in the kernel: Redpine Signals, Inc. Proprietary and Confidential Page 37...
Page 38
Run the ‘make install’ command. This ensures that the customized kernel • is installed and the boot loader is updated appropriately. Run the ‘reboot’ command and select the kernel 3.13. Upon successful • booting, the kernel is ready for use. Redpine Signals, Inc. Proprietary and Confidential Page 38...
= init_module(module, size, args); free(module); return ret; static int rmmod(const char *modname) int ret = -1; int maxtry = 10; while (maxtry-- > 0) { ret = delete_module(modname, O_NONBLOCK | O_EXCL); Redpine Signals, Inc. Proprietary and Confidential Page 39...
Page 40
HCIUARTSETPROTO ioctl */ for (attempt = 1000; attempt > 0; attempt--) { hci_sock = create_hci_sock(); if (hci_sock < 0) goto out; if (!ioctl(hci_sock, HCIDEVUP, HCI_DEV_ID)) { Redpine Signals, Inc. Proprietary and Confidential Page 40...
Page 41
= create_hci_sock(); if (hci_sock < 0) goto out; ioctl(hci_sock, HCIDEVDOWN, HCI_DEV_ID); LOGI("Stopping hciattach deamon"); if (property_set("ctl.stop", "hciattach") < 0) { LOGE("Error stopping hciattach"); goto out; if (set_bluetooth_power(0) < 0) { Redpine Signals, Inc. Proprietary and Confidential Page 41...
Page 42
(hci_sock >= 0) close(hci_sock); return ret; Before enabling BT, First insert common_driver ko’s then enable Bluetooth. We have to specify the final modules(ko’s) path (<Driverpath>/release/)in src/system/bluetooth/bluedroid/bluetooth.c properly Redpine Signals, Inc. Proprietary and Confidential Page 42...
Need help?
Do you have a question about the RS9113 and is the answer not in the manual?
Questions and answers