i.MX 6SoloLite Multi-Purpose Wi-Fi Card Configuration and ...€¦ · Multi-Purpose Wi-Fi Card...

24
© 2013 RadiumBoards All Rights Reserved V1.0 i.MX 6SoloLite Multi-Purpose Wi-Fi Card Configuration and User Guide

Transcript of i.MX 6SoloLite Multi-Purpose Wi-Fi Card Configuration and ...€¦ · Multi-Purpose Wi-Fi Card...

© 2013 RadiumBoards All Rights Reserved

V1.0

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide

© 2013 RadiumBoards Page 2 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Copyright Notice This document is copyright of RadiumBoards, All Rights Reserved. No part of this document, in whole or in part, may be used, reproduced, stored in a retrieval system or transmitted, in any form, or by any means, electronic or otherwise, including photocopying, reprinting, or recording, for any purpose, without the express written permission of RadiumBoards.

Legal Disclaimer The information contained in this document is subject to change without notice. The information in this document is provided for informational purposes only. RadiumBoards specifically disclaims all warranties, express or limited, including, but not limited, to the implied warranties of merchantability and fitness for a particular purpose, except as provided for in a separate software license agreement.

RadiumBoards RadiumBoards is a unique website providing complete board and software solutions addressing a broad range of markets including Security and Surveillance, Networking, Wireless, Video, Audio, Automotive, Mobile Device and IoT (Internet of Things). OEMs and Systems Integrators can shop for complete assemblies, with firmware, BSP and applications ready to integrate into your own enclosures. ODMs can shop for reference designs complete with full BSP (Board Support Package) and application support. Radium Boards can also provide any level of customization to the hardware or software required by the ODM to help differentiate in their markets. Electronics hardware and software hobbyists, experimenters, educators and makers now have access to complete high performance platforms for application in an infinite range of projects.

Correspondence Corporate Office B-22, Infocity Sector-34, Gurgaon-122001, Haryana, India Tel No: +91 124 4284250 US Office 2025 Gateway Place, Suite 465 San Jose, California 95110 E-MAIL [email protected] WEBSITE www.radiumboards.com

VVDN Technologies VVDN Technologies Pvt Ltd. is a sibling company of RadiumBoards and is responsible for the design and development of all products sold through the RadiumBoards brand. Founded in 2007, VVDN is a technology innovation and development company providing a broad spectrum of services and technology expertise to our core domains. VVDN provides “Concept to Customer” services at any point in the development cycle, as well as full turnkey solutions. WEBSITE www.vvdntech.com

© 2013 RadiumBoards Page 3 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Contents

i.MX 6SoloLite Wi-Fi Card Overview ............................................................................................... 4

Chipset Overview ............................................................................................................................... 4

Technical Specification ...................................................................................................................... 4

Software: ...................................................................................................................................... 4

Operating Voltage: ..................................................................................................................... 4

System Requirements ....................................................................................................................... 4

Hardware Description ........................................................................................................................ 5

Application Processor- i.MX 6SoloLite .................................................................................... 5

DDR3 Memory Interface............................................................................................................ 5

Serial Interface ............................................................................................................................ 5

UART Interface ........................................................................................................................... 5

Wi-Fi Interface ............................................................................................................................. 6

Downloading the LINUX SDK ........................................................................................................... 6

Building the LINUX SDK ................................................................................................................... 6

Setting Toolchain: ....................................................................................................................... 6

Building Uboot: ........................................................................................................................... 7

Building LTIB: .............................................................................................................................. 7

7.3.1 ......................................................................................................... 10

Building Wireless Driver .......................................................................................................... 21

Adding Necessary binary and Scripts ................................................................................... 21

Flashing Image Using MFG Tool ................................................................................................... 22

Board Setup ...................................................................................................................................... 22

Calibrating Wireless Module: .................................................................................................. 23

Testing Wireless ....................................................................................................................... 24

© 2013 RadiumBoards Page 4 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

1 i.MX 6SoloLite Wi-Fi Card Overview

Based on the Freescale i.MX_6SoloLite Applications Processor the i.MX 6SoloLite Multi-Purpose Wi-Fi Card is designed for low power, small form factor wireless connectivity. Equipped with more than just Wi-Fi capabilities, this intelligent controller platform provides high performance processing capabilities and is optimized for lowest power consumption. With the on board Wi-Fi module having Client and Access Point capabilities as well as peer to peer communication, the Multipurpose Wi-Fi Card also has provision for internet connectivity.

2 Chipset Overview

Application Processor : i.MX_6SoloLite Processor, ARM Cortex A-9,1 GHz

Memory: 256MB DDR3 Memory

Data Storage: 16MB, Serial NOR Flash

USB Interface for firmware update

Murrata Wi-Fi Module, WL1273 Driver

3 Technical Specification

3.1 Software

IEEE 802.11a/b/g/n

Supports Dual Band Operation at 2.4GHz and 5GHz

Security- WEP,WPA,WPA2

DHCP Enabled

Telnet Support

TFTP through Wi-Fi

HTTP Server Enabled

3.2 Operating Voltage

DC: 3.3 – 4.0 Volts

4 System Requirements

The Wi-Fi card can be configured via a PC or Laptop. The minimum requirements are:

PC/Laptop with version UBUNTU-10.04 for building Linux source

PC/Laptop with Windows 7/XP

RS-232 Translator Level Board

UART-USB Console Cable

Serial Data Cable

© 2013 RadiumBoards Page 5 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

5 Hardware Description

The compute board has the following major different subsystems and interfaces:

Application Processor- i.MX 6SoloLite

DDR3 SDRAM

SPI Flash

Wi-Fi module- TI Murrata

5.1 Application Processor- i.MX 6SoloLite

i.MX6SL processor is a multimedia application processor with single ARM CortexTM-A9 core running up to 1GHz,2D graphics processor and integrated power management Freescale‟s Dynamic Voltage and Frequency Scaling (DVFS) provide significant power reduction, allowing the device to run at lower voltage and frequency with sufficient MIPS for tasks, such as audio decode. Following major interfaces/features of i.MX 6SoloLite are used in this design.

DDR3 Memory Interface

RS232 Debug Interface

SPI Flash Interface

I2C interface

SDIO Interface for Wi-Fi Module

5.2 DDR3 Memory Interface

DDR3 SDRAM is required for execution of code and buffer memory required for various internal operations. The i.MX6SL has dedicated DDR memory controller, which can support different DDR memories. Main features of the DDR controller are:

Supports LV-DDR3, DDR3 And LPDDR2 standards

x16, x32 data bus width support

support density from 256 MB to 8 GB

DDR3 clock rate of up to 400MHz

5.3 Serial Interface

Boot flash is required to store the boot code. In compute board design, i.MX6SL processor is interfaced to SPI Flash. SPI interface is used to interface Serial Flash Memory with i.MX 6SoloLite. The Enhanced Configurable SPI(ECSPI) interface is configured in master mode and the flash is connected to ECSPI interface as a slave. When using the SPI as boot device, the chip supports booting from both Serial EEPROM and Serial Flash devices. In compute board SPI Flash is used for booting purposes.

5.4 UART Interface

UART Interface is used for console and debugging purposes. i.MX6SL processor has 5

© 2013 RadiumBoards Page 6 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

UARTs. On compute board UART1 is used. For this 4 pin debug header is used. UART signals from processor will get terminated to debug header and an external RS232 transceiver board can be used to connect to PC.

5.5 Wi-Fi Interface

Wi-Fi interface is required for doing compute jobs on compute board. Compute board can accept commands for Wi-Fi interface. SDIO interface is used for connecting the Wi-Fi module on compute board. Wi-Fi module from Murata LBEH5Z9UWC-TEMP is used. It is based on TI‟s WL1273 chip set. It supports both 2.4GHz and 5GHz frequencies range. A diplexer is interfaced to Wi-Fi module for both frequencies simultaneously. The interface for wireless module is:

The Wi-Fi is interfaced over SDIO interface with i.MX6SL.

Features of Wi-Fi module:

Compliant with IEEE802.11a/b/g/n

Compliant with Bluetooth 4.0 up to HCI level

Texas Instruments WL1273L inside

Compliant with RoHS

6 Downloading the LINUX SDK

Linux SDK has to be downloaded from the folder Src-> IMX_VVDN.tar.gz provided in the DVD along with the product.

7 Building the LINUX SDK

The cloned SDK (IMX_VVDN) has the following contents:

Freescale Cross Compiler

U-Boot(u-boot-sololite)

LTIB Linux Source(contained in Kernel)

Compat Wireless Driver(compat_wl12xx)

MFG Tool For Flashing Image

ltib_build_support(contained in kernel)

Script for installing packages(install_packages.sh)

7.1 Setting Toolchain

Copy the tar of the Freescale cross compiler to opt directory on Ubuntu Machine using command:

cp Freescale_ToolChain.tar.bz2 /opt/

Extract the tool chain in the directory itself using command: sudo tar -xvjf Freescale_ToolChain.tar.bz2

© 2013 RadiumBoards Page 7 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

7.2 Building Uboot

Go to the u-boot-sololite directory: cd u-boot-sololite

Run build_uboot.sh script: ./build_uboot.sh

U-boot image (u-boot.bin) will be in the same directory, u-boot_sololite.

7.3 Building LTIB

Before Building LTIB, run the following script: sh install_packages.sh

Note: 1. LTIB requires few packages to be installed in the system. This scripts need to be

run mandatorily, if not, LTIB build will crash. 2. LTIB is executed as a regular user but requires root privileges during execution.

Run this command to edit the sudoers file: sudo visudo

Add the following line to the end of the sudoers file. <admin> ALL=NOPASSWD:/usr/bin/rpm,/opt/freescale/ltib/usr/bin/rpm

Caution: Replace the “<admin>” from the admin user name

Go to the LTIB Directory and build it by these following commands: cd <LTIB directory>. ./ltib -c

Select platform to Freescale iMX reference boards and exit, saving the

changes. At the next menu, select platform type as imx6s and package

profile. Exit and save the new configuration.

© 2013 RadiumBoards Page 8 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Select the option Uboot as “dont build any uboot”, as we are compiling uboot externally.

Select the linux version for the board, image will be created according to it. --- Choose your kernel kernel (linux 3.0.35-imx) --->

© 2013 RadiumBoards Page 9 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Required Platform Packages can be enabled by selecting the Platform Specific Package Selection from opened command window. --- Package Selection Package List --->

Packages that need to be selected: Bash Boa Busybox Dhcp Modify udev Rules

o Include i.MX rules Hostapd Iperf Modules dependency Skeleton base files Termcap Wireless Tools

For building the rootfs select the type of target Image generation. --- target Image generation

options ---> ext2.gz ramdisk

© 2013 RadiumBoards Page 10 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

[*]Create a ramdisk or initramfs image

Close the configuration screen saving the changes.

7.3.1 Kernel Configuration

For Configuring the kernel select the following when we run ./ltib -c [* ]Configure the kernel

And save the configuration, it will open the kernel configuration page.

© 2013 RadiumBoards Page 11 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Select Following Option for minimum support of WiFi:

General Setup

o [*]Initial RAM filesystem and RAM disk (initramfs.initrd) support o () initramfs sourcefile(s) o [*]Support Initial ramdisks compressed using gzip

© 2013 RadiumBoards Page 12 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

System type o Freescale MXC implementations

[ ] Internel LDO in MX6Q/DL bypass i.MX Bluetooth rfkill interface support

o [ ] clock debug information export to user space

© 2013 RadiumBoards Page 13 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

© 2013 RadiumBoards Page 14 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

CPU Power Management o CPU Frequency Scaling

< > „powersave‟ governor < > „userspace‟ governor for userspace frequency scaling

© 2013 RadiumBoards Page 15 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Power management options o [ ]Suspend to RAM and standby o [ ]Run-time PM core functionality

[*]Networking Support o Networking Options

<*>802.1d Ethernet Bridging [ ] IGMP/MLD snooping

o -*- Wireless <M> cfg80211 – wireless configuration API [*] nl80211 testmode command <M> Generic IEEE802.11 Networking Stack (Mac80211)

o <*>RF switch subsystem support [ ]RF switch input Support

© 2013 RadiumBoards Page 16 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

© 2013 RadiumBoards Page 17 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Device Drivers o o [*] Block Devices

<*> RAM block Device Support (16) Default number of RAM Disks (32768) Default RAM disk Size (kbytes)

o < >Serial ATA and Parallel ATA Drivers o [*] Network Device Support

< > Generic Media Independent Interface device support <*> PHY Device Support and infrastructure [ ] Ethernet (10 or 100Mbit) [*] Wireless LAN

< >Atheros wireless Cards

© 2013 RadiumBoards Page 18 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

<M> TI wl12xx driver support o <M> TI wl12xx support o [*] TI wl12xx 802.11 HT support o o <M> TI wl12xx SDIO support o <M> TI wl12xx SDIO Testing support

o < > Multimedia Support

© 2013 RadiumBoards Page 19 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

© 2013 RadiumBoards Page 20 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

© 2013 RadiumBoards Page 21 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

Library Routines o o {*} CRC7 functions

NOTE: When selecting certain option with * indicates it being inserted as a driver, and with M indicates it being inserted as kernel module file.

7.4 Building Wireless Driver

Compat_wl12xx is used as driver for the wireless. The driver has the script build_compat.sh to build it run:

cd <compat_wireless> sh build_compat.sh

This will generate several kernel module files(with extension “.ko”) that needs to be added to the kernel for wireless interface to come up on board.

7.5 Adding Necessary binary and Scripts

After building the ltib and wireless driver it is required to add the scripts and binary to root file system in ltib. And again compile ltib for final images. For that user needs to run the following command :

Go to “Kernel” directory in IMX_VVDN and run following script:

© 2013 RadiumBoards Page 22 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

sh build_script.sh

Go to ltib directory and build ltib again: cd <ltib directory> ./ltib -c

8 Flashing Image Using MFG Tool

Open the MFG Tool folder and copy the "uImage" created in ltib at rootfs/boot/uImage and "rootfs.ext2.gz.uboot" created in ltib directory itself, to the following path in MFG Tool:

Mfgtools-Rel-2.1.0_130506_MX6SL_UPDATER/Profiles/MX6SL Linux update/OS

firmware/files

NOTE: Old "uImage" and "rootfs.ext2.gz.uboot" can be renamed and saved for backup in MFG tool, or remove them. If any changes are done in uboot , then binary of uboot can also be copied to same path.

Connect the Board and laptop with UART-USB console cable and open Teraterm (Baud Rate=115200) or minicom (in Linux) for the Board-console.

Connect the Board with Serial Data cable for Flashing new FIRMWARE and put the jumper caps on jumper pins.

Power on the Board with 3.3 Volts Supply.

Now Run MfgTool2.exe to Flash U-Boot, uImage and filesystem from MFG Tool (along with jumpers)

9 Board Setup

Remove the jumpers and reboot i.e. power off and on the board.

A login prompt will appear after a while and give username as “root”

To bring the wireless interface up run following script: sh /board_mode.sh

NOTE: This script runs at the time of kernel up. But if some changes are made then it needs to be run again.

Check the mnt directory (cd /mnt) folder, in here there should be wl1271-nvs.bin, hostapd.conf and hostapd_1.conf.

And if, conf files are not present then copy them from following command cp /etc/hostapd.conf /mnt/

© 2013 RadiumBoards Page 23 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

cp /etc/hostapd_1.conf /mnt/ and power off and on the board.

There will be two wireless interfaces created on board i.e. wlan0 and wlan1

After Board initialization, on interface wlan0, AP (MASTER MODE) gets created with SSID its MAC address

Board can also connect to other available Wireless Routers through interface wlan1 (MANAGED MODE)

Run the following script on board as shown below to connect to any other router with internet access:

sh /board_client.sh <essid name> <encryption> <password> essid name : AP’s ssid from which board can connect encryption(on/off) : whether AP is in secured mode provide “on” if, AP is in unsecured mode provide “off” Password : Provide password of AP

After this configurations of the AP will be saved in ”/mnt/” directory.Then power off and on the board.

On every boot board will create AP on wlan0 interface and Client on wlan1 interface; client will be connected automatically to the other AP if configuration file is saved of that Wireless Router.

If board has to be connected with some other AP, run board_client.sh again providing required parameters, and again it will save the new Wireless Router configuration.

9.1 Calibrating Wireless Module:

Calibration is required in TI Wi-Fi module to create the firmware(nvs binary file) for wireless driver

Though, the board is already calibrated and the firmware file is present in mnt directory

If one wishes to re-calibrate the wireless module again , run the script as follows sh board_cal.sh

This will create new firmware.

© 2013 RadiumBoards Page 24 of 24 All Rights Reserved

i.MX 6SoloLite Multi-Purpose Wi-Fi Card

Configuration and User Guide V1.0

9.2 Testing Wireless

To check the available wireless interfaces use command : iwconfig

To see the IP address assigned to interfaces use command: ifconfig

To check the connectivity with any router use command: ping <ipaddr>