Bluegiga APX4 User manual

APX4 DEVELOPMENT KIT
GETTING STARTED
Thursday, 29 November 2012
Version 1.5

Copyright © 2001 - 2012 Bluegiga Technologies
Bluegiga Technologies reserves the right to alter the hardware, software, and/or specifications detailed herein at
any time without notice, and does not make any commitment to update the information contained herein.
Bluegiga Technologies assumes no responsibility for any errors which may appear in this manual. Bluegiga
Technologies' products are not authorized for use as critical components in life support devices or systems.
Bluegiga Access Server, Access Point, APx4, AX4, BSM, iWRAP, BGScript and WRAP THOR are trademarks
of Bluegiga Technologies.
The trademark and logo are registered trademarks and are owned by the Bluetooth SIG, Inc.Bluetooth
ARM and ARM9 are trademarks of ARM Ltd.
Linux is a trademark of Linus Torvalds.
All other trademarks listed herein belong to their respective owners.

TABLE OF CONTENTS
1. Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 What is Bluegiga APx4? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 APx4 Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 APx4 Software Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3. Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1 How to get started? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Preparations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.1 Accessing the APx4 via RS232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.2 Accessing the APx4 Linux console via SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.3 Accessing the APx4 with a web browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.4 Accessing the APx4 through Wi-Fi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4. Supported features of APX4 Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1 Supported features of APX4 Development Kit under Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5. Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.1 Figuring out IP address from Linux command line using command.ifconfig . . . . . . . . . . . . . . . . 13
5.2 Checking device information with command.bgtinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3 Scanning for low energy devicesBluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.4 Scanning for classic devicesBluetooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.5 Checking Wi-Fi interface status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.6 Enabling Wi-Fi interface and performing Access Point scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.7 Installing Python on APx4 using OPKG packet manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6. Contact information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Copyright © 2001-2012 Bluegiga Technologies Page 4 of 16
1 Version history
Version Comments
0.9 Version history added. Version number changed.
1.0 Improved getting started instructions.
1.1 Added Tips and Tricks section
1.2 Added more examples
1.3 Added Wi-Fi usage examples
1.4 Added OPKG example
1.5 Updated to have "Where to start?" section

Copyright © 2001-2012 Bluegiga Technologies Page 5 of 16
2 Introduction
This document is a getting started guide for Bluegiga APx4 development kit. The guide instructs you how to set
up the APx4 development kit, power it up and access the Linux operating system on the APx4 wireless
System-on-Module.
2.1 What is Bluegiga APx4?
The Bluegiga APx4 is a small form factor, low power system-on-module that includes the latest wireless
connectivity standards: 802.11 b/g/n and 4.0. APx4 is based on Freescale's i.MX28 processor familyBluetooth
and runs an embedded Linux operating system based on the Yocto Project . In addition to integrating the
TM
454MHz ARM9 processor, the wireless connectivity technologies, Linux operating system the APx4 also
includes with several built in applications, such as the 802.11 and 4.0 stacks, ContinuaBluetooth
v.1.5 compliant IEEE manager and many more. This combination provides an ideal platform for designing
multi-radio wireless gateways that enables fast time-to-market and minimum R&D risks.
The Bluegiga APx4 software can be easily extended or tailored customizing the Linux operating system with
applications. The motherboards for the APx4 can be easily extended to include almost anything from 3G
modems to Ethernet and audio interfaces to and touch screen displays.
The Bluegiga APx4 is an ideal product for applications requiring wireless or wired connectivity technologies and
the processing power of the ARM9 processor, such as health and fitness gateways, building and home
automation gateways, M2M, point-of-sale and industrial connectivity.
2.1.1 Key Features
APx4 is a computing platform:
450MHz ARM9 core (Freescale i.MX28)
64MB RAM and 128MB Flash
Real Time Clock
SO-DIMM form factor
A connectivity platform:
Bluetooth 4.0 dual-mode radio
2.4GHz 802.11 b/g/n radio with Wi-Fi Access Point mode
10/100 Ethernet
With many extension options:
Up to 24bit display with resistive touch screen800 x 480,
MMC/SDIO, USB and USB OTG, multiple SPI, UART and I²C, PWM, GPIO and AIO interfaces
I²S
Linux operating system:
Based on the Yocto ProjectTM
Thousands of open source software packets available
Qualifications:
Bluetooth, CE, FCC and IC*
*Ready before mass production

Copyright © 2001-2012 Bluegiga Technologies Page 6 of 16
2.2 APx4 Development Kit
The APx4 development kit is a ready-to-use development platform the the the Bluegiga APx4
wireless System-on-Module. The development kit consists of a single APx4 module, a mother board and
the necessary accessories and documentation.
APx4 Development kit consists of the following items:
1 x Bluegiga APx4 module
1 x Bluegiga APx4 mother board
1 x 12V power supply
1 x RS232 cable
1 x Ethernet cable
1 x Micro USB cable
Getting started documentation
2.3 APx4 Software Development Kit
APx4 Software Development Kit (SDK) is a software development platform that provides tools, methods and
documentation allowing you to write applications for the Linux operating system running in the APx4. The APx4
SDK is based on the tools and methods developed and maintained by the Yocto Project.
*APx4 Development kit consists of the following items which are downloadable from
http://techforum.bluegiga.com
Development environment for compiling applications
Example applications
SDK documentation
API documentation
The getting started guide for the Bluegiga APx4 SDK is a separate document from this document.

Copyright © 2001-2012 Bluegiga Technologies Page 7 of 16
3 Getting started
3.1 How to get started?

Copyright © 2001-2012 Bluegiga Technologies Page 8 of 16
1.
2.
a.
b.
3.
3.2 Preparations
Make sure the power supply is not connected to the APx4 mother board
Connect the APx4 to the motherboard by inserting the APx4 module into the SODIMM socket in 30-45
degrees angle and by pushing the APx4 module into the socket.
Push the module into the socket as far as it goes, otherwise the finger contacts may not connect
properly.
Press the module down so that the metal clips on the receptacle engage and make a clear click.
Ensure that a jumper is connected to the header as shown in the image below. See theCURR. MEAS.
yellow rectangle. For ordinary operation this is the only jumper needed.
There are three ways of accessing the APx4:
Serial port
SSH
Ethernet interface and browser
Wi-Fi interface and browser
Figure : APx4 development kit1

Copyright © 2001-2012 Bluegiga Technologies Page 9 of 16
1.
2.
1.
2.
3.2.1 Accessing the APx4 via RS232
Connect the RS232 cable to the motherboard's DEBUG PORT
Open a terminal software and use the following settings:
Property name Value
Baud rate 115200 bps
Data bits 8
Parity none
Stop bits 1
Flow control none
Power on the APx4 motherboard
From terminal software make sure you see the APx4 boot log
U-Boot 2011.12 (Nov 26 2012 - 10:34:49)
DRAM: 64 MiB
WARNING: Caches not enabled
NAND: 128 MiB
MMC: MXS MMC: 0
In: serial
Out: serial
Err: serial
Net: FEC
Hit any key to stop autoboot: 0
.
.
.
UBIFS: reserved for root: 0 bytes (0 KiB)
Loading file 'boot/uImage' to addr 0x41000000 with size 1400792
(0x00155fd8)...
Done
## Booting kernel from Legacy Image at 41000000 ...
Image Name: Linux-3.2.12
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1400728 Bytes = 1.3 MiB
Load Address: 40008000
Entry Point: 40008000
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 3.2.12 (jenkins@green) (gcc version 4.6.4 20120303 (prerelease)
(GCC) ) #1 Mon Nov 26 09:37:59 EET 2012

Copyright © 2001-2012 Bluegiga Technologies Page 10 of 16
1.
2.
3.
4.
Accessing APx4 Linux console via RS232
Once the APx4 has booted a login will be prompted
The default user name is : root
The default password is : buffy
bgtinfo command prints the hardware and software version numbers
Enabling fforwarder:
Starting blueconnector:
Starting Lighttpd Web Server: unifi1: SDIO block size 64 requires 8 padding
chunks
unifi1: UniFi f/w protocol version 9.1 (driver 9.1)
unifi1: Firmware build 1089: 2010-10-05 14:50
cindr03_core_softmac_rom_sdio_gcc 1089 bfsw@eagle@630492
lighttpd.
Starting automatic package installer: bgtautoinstalld.
Starting finder:
Stopping Bootlog daemon: bootlogd.
_____ _ _
| ___ \| | (_)
| |_/ /| | _ _ ___ __ _ _ __ _ __ _
| ___ \| || | | | / _ \ / _` || | / _` | / _` |
| |_/ /| || |_| || __/| (_| || || (_| || (_| |
|____/ |_| \__,_| \___| \__, ||_| \__, | \__,_|
__/ | __/ |
|___/ |___/
Bluegiga Linux 5.0.0-beta9 apx4devkit ttyAMA0
apx4devkit login:
Avoid removing the APx4 module from the mother board when the power supply is connected in order not to damage the
APx4 module.

Copyright © 2001-2012 Bluegiga Technologies Page 11 of 16
1.
2.
3.
4.
1.
2.
3.
4.
1. a.
2.
3.
4. a.
b.
5. a.
6. a.
3.2.2 Accessing the APx4 Linux console via SSH
Prerequisites
On Windows : PuTTy or similar SSH software
On Linux: SSH client software
In order to connect the APx4 development kit via SSH:
Connect Ethernet cable to the APx4 development kit
Connect power supply to the APx4 development kit
Wait until APx4 has started
Open SSH connection using either PuTTy or SSH client to the IP address of APx4 development kit
Default user name it and default password is .root buffy
Example how to connect the APx4 development kit from Linux:
3.2.3 Accessing the APx4 with a web browser
In order to connect the APx4 development kit with a web browser:
Connect Ethernet cable to the APx4 development kit
Connect power supply to the APx4 development kit
Wait until APx4 has started
Open a web browser and type the IP address to the address field (eg. )http://192.168.1.10
get the IP address by using instructions in Tips and Tricks section
Default user name it and default password is .root buffy
3.2.4 Accessing the APx4 through Wi-Fi
Make sure Ethernet cable to the APx4 development kitis not connected
Having ethernet cable connected will disable the automatic Wi-Fi AP mode
Connect power supply to the APx4 development kit
Wait until APx4 has started
Search for Wi-Fi Access Points with your PC, tablet or smart phone
APx4 Development Kit should be visible with ESSID : APx4_sssss
sssss are the last five digits of the APx4's serial number
Connect to the Wi-Fi Access Point
Default WPA2 password is the APx4 modules serial number
Finally connect the APx4 via SSH or web browser as instructed in the previous chapters
The IP address of the APx4 will be by default 192.168.43.3 when it is Access Point mode

Copyright © 2001-2012 Bluegiga Technologies Page 12 of 16
4 Supported features of APX4 Development Kit
4.1 Supported features of APX4 Development Kit under Linux
Linux version 3.2.12 from Bluegiga BSP
Driver Supported Notes
Bluetooth Bluetooth 4.0 Smart Ready (dual mode)
Wi-Fi 802.11 b/g/n STA and AP modes supported
Ethernet 10/100
NAND
USB host
USB device
UART
I2C
SPI
RTC PCF8563
Display Upto 800x480 (WVGA)
Touch screen Built-in resistive touch
Power management
Audio / codec SGTL5000, recording not supported yet
CAN Not supported by current model of APX4
Symbol Meaning
Supported
Future option
Not supported

Copyright © 2001-2012 Bluegiga Technologies Page 13 of 16
5 Tips and Tricks
5.1 Figuring out IP address from Linux command line using ifconfig
command.
root@apx4devkit:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:80:01:67:04
inet addr:10.1.1.125 Bcast:10.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1968 errors:0 dropped:7 overruns:0 frame:0
TX packets:1020 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:218757 (213.6 KiB) TX bytes:1194666 (1.1 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1216 (1.1 KiB) TX bytes:1216 (1.1 KiB)
root@apx4devkit:~#
IP address of eth0 (Ethernet) interface is 10.1.1.125.
5.2 Checking device information with command.bgtinfo
root@apx4devkit:~# bgtinfo
This board was identified as Bluegiga APx4 (367CC-A).
Software version : 5.0.0-beta9
Product ID : 9
Hardware revision : 3
Hardware architecture : apx4
Hardware serial number : 1205310019
Ethernet MAC address : 00:07:80:01:66:eb
WLAN MAC address : 00:07:80:59:ef:74
Bluetooth address : 00:07:80:01:67:1d (Bluegiga APX4 #1205310019),
bt4.0/1d86
System clock : Wed Nov 28 09:16:07 2012
Updated software components:
root@apx4devkit:~#

Copyright © 2001-2012 Bluegiga Technologies Page 14 of 16
5.3 Scanning for low energy devicesBluetooth
root@apx4devkit:~# searchclient --le-only
| 1353378992 | 00:07:80:ff:f5:88 | "Bluegiga Find Me" | -66 |
| 1353378992 | 00:07:80:4e:71:38 | "Robustness test" | -72 |
| 1353378992 | 00:07:80:4a:aa:ee | "BLED112 dongle" | -79 |
root@apx4devkit:~#
Response syntax: | <timestamp> | <BD_ADDR> | <"device name"> | <rssi> |
5.4 Scanning for classic devicesBluetooth
root@apx4devkit:~# searchclient
| 1353379111 | 00:07:80:42:cd:4f | "enri_ap_ehealth" | -44 |
| 1353379111 | 70:f3:95:ce:54:9a | "SWLTMIKKOS" | -64 |
| 1353379111 | 00:07:80:01:67:12 | "Bluegiga APX4 #1205310008" | -85 |
| 1353379111 | 00:07:80:ff:f8:c4 | "WT32-A" | -87 |
root@apx4devkit:~#
Response syntax: | <timestamp> | <BD_ADDR> | <"device name"> | <rssi> |
5.5 Checking Wi-Fi interface status
root@apx4devkit:~# iwconfig
lo no wireless extensions.
wlan0 IEEE 802.11-bgn Access Point: Not-Associated Bit Rate=0 kb/s
RTS thr:off Fragment thr:off
Encryption key:off
Power Management period:500ms mode:All packets received
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
eth0 no wireless extensions.
root@apx4devkit:~#

Copyright © 2001-2012 Bluegiga Technologies Page 15 of 16
5.6 Enabling Wi-Fi interface and performing Access Point scan
root@apx4devkit:~# ifup wlan0
wlan0 enabled
Ethernet cable is connected. AP mode disabled.
run-parts: /etc/network/if-pre-up.d/unifi_ap_mode exited with code 1
root@apx4devkit:~# iwlist wlan0 scanning
wlan0 Scan completed :
Cell 01 - Address: 94:44:52:BC:00:B7
ESSID:"bgt"
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality=25/40 Signal level=-44 dBm Noise level=-69 dBm
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
root@apx4devkit:~#
ifup wlan0 enables Wi-Fi interface
performs an AP scaniwlist wlan0 scanning
5.7 Installing Python on APx4 using OPKG packet manager
Command needs to be ran once in order to download the list of available packages from the repositories.opkg update
root@apx4devkit:~# opkg install python
Installing python-core (2.7.2-r2.15) to root...
Downloading
http://update.bluegiga.com/feeds/5.0.0-beta9/ipk/armv5te/python-core_2.7.2-r2.15_armv5te.ipk.Installing
python-re (2.7.2-r2.15) to root...
Downloading
http://update.bluegiga.com/feeds/5.0.0-beta9/ipk/armv5te/python-re_2.7.2-r2.15_armv5te.ipk.Installing
python-core (2.7.2-r2.15) to root...
.
.
.
Configuring python-lang.
Configuring python-core.
Configuring libncursesw5.
Configuring python-readline.
root@apx4devkit:~#

Copyright © 2001-2012 Bluegiga Technologies Page 16 of 16
6 Contact information
Sales: [email protected]
http://techforum.bluegiga.com
Orders: [email protected]
WWW: http://www.bluegiga.com
http://www.bluegiga.hk
Head Office / Finland: Phone: +358-9-4355 060
Fax: +358-9-4355 0660
Sinikalliontie 5 A
02630 ESPOO
FINLAND
Head address / Finland: P.O. Box 120
02631 ESPOO
FINLAND
Sales Office / USA: Phone: +1 770 291 2181
Fax: +1 770 291 2183
Bluegiga Technologies, Inc.
3235 Satellite Boulevard, Building 400, Suite 300
Duluth, GA, 30096, USA
Sales Office / Hong-Kong: Phone: +852 3182 7321
Fax: +852 3972 5777
Bluegiga Technologies, Inc.
Unit 10-18, 32/F, Tower 1, Millennium City 1,
388 Kwun Tong Road, Kwun Tong, Kowloon,
Hong Kong
Table of contents
Other Bluegiga Microcontroller manuals
Popular Microcontroller manuals by other brands

Infineon
Infineon NGC1081 user manual

Silicon Laboratories
Silicon Laboratories CP250 Series user guide

NXP Semiconductors
NXP Semiconductors M53015EVB quick start guide

Infineon Technologies
Infineon Technologies XMC4000 Application Kit user guide

SunFounder
SunFounder Thales Kit manual

Texas Instruments
Texas Instruments PGA460-Q1 manual