Laird WB45NBT Reference Manual

A
Reference Guide
WB45NBT
Version 1.10
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
2
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
REVISION HISTORY
Version
Date
Notes
Approver
1.0
20 August 2013
Initial Version
Andrew Chen
1.1
22 August 2013
Minor revisions and formatting edits
Andrew Chen
1.2
28 July 2014
Minor edits for Rev 2 board
Andrew Chen
1.3
6 July 2015
Added Note regarding No Serial Output
Andrew Chen
1.4
6 August 2015
Added BT/BLE
Andrew Chen
1.5
27 April 2016
Removed references to connecting to an open AP by default in the Automatic Remote Update section.
Mark Calhoun
1.6
07 July 2016
Changed bootstrap.bin references to at91bs.bin Updated to new template
Doug Smith
1.7
10 April 2017
Added WB Security section
Andrew Dobbing
1.8
1 May 2017
OS Support. Removed SAM-BA section and directed to app note at lairdtech.com
Jay White
1.9
7 June 2017
Updates to clarify lack of USB to Wi-Fi layer 2 bridging support
Dan Kephart
1.10
17 Nov 2017
Updated DCAS authentication information
Andrew Dobbing
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
3
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
CONTENTS
1 Introduction to the Laird WB45NBT Device ...................................................................................................... 4
2 Product Description ........................................................................................................................................... 4
3 Software ............................................................................................................................................................ 4
3.1 WB45NBT Usage ........................................................................................................................................ 5
4 Configuring IP Based Connectivity ..................................................................................................................... 5
4.1 Choosing an Interface to the WB .............................................................................................................. 5
4.2 Configuring the WB to Use Layer 2 Bridging or Layer 3 NAT ..................................................................... 6
4.3 Choosing Layer 2 Bridge or Layer 3 NAT – Use Cases ................................................................................ 6
4.4 WB Configurations – Use Case Examples .................................................................................................. 8
4.5 Activating the New WB Configuration ..................................................................................................... 12
5 Set Up – USB Ethernet on a Host PC................................................................................................................ 12
6 Setting Up a PPP Link Over RS232 ................................................................................................................... 13
7 Building the WB from Source .......................................................................................................................... 13
8 Updating the WB50NBT Software ................................................................................................................... 14
8.1 Flash Programming Using fw_update ..................................................................................................... 14
8.2 Troubleshooting U-Boot .......................................................................................................................... 18
8.3 Flash Programming Using the Atmel SAM-BA Utility .............................................................................. 19
9 Debugging ........................................................................................................................................................ 19
9.1 Application Debugging ............................................................................................................................ 19
9.2 Connecting a Device or File to a Socket .................................................................................................. 19
9.3 Setting Up Stand-alone FTP, TFTP, and SSH servers ................................................................................ 20
10 Breakout Board Schematic and BOM .......................................................................................................... 20
11 Developing and Integrating Using the Development Kit ............................................................................. 20
11.1 Software Tools and Techniques ............................................................................................................... 20
11.2 Finding Version Information .................................................................................................................... 21
12 Hardware Use Notes .................................................................................................................................... 21
12.1 GPIOs ....................................................................................................................................................... 21
12.2 Analog to Digital Converter ..................................................................................................................... 23
13 WB Security ................................................................................................................................................. 24
13.1 Solutions to Enhance Security ................................................................................................................. 24
13.2 Best Practices for Improving Wireless Network Security ........................................................................ 25
13.3 WB inetd and WB init-scripts .................................................................................................................. 25
WB inetd .......................................................................................................................................................... 25
WB init-scripts ................................................................................................................................................. 26
14 References ................................................................................................................................................... 28
15 More Information and Support ................................................................................................................... 28
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
4
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
1 INTRODUCTION TO THE LAIRD WB45NBT DEVICE
The Laird WB45NBT wireless bridge module is a wireless communications subsystem that may be integrated into a variety of host devices via a number of available electronic and logical interfaces.
Interfaces
Features
Specifications
Fast Ethernet Serial UART USB SPI I2C 80 pin board with mating
options
Mounting holes
ARM9 processor (396 MHz) 64 MB of LPDDR (Lower Power
DDR) memory
128 MB of NAND flash storage
Length: 40 mm Width: 40 mm Height: 3.8 mm
2 PRODUCT DESCRIPTION
The Laird WB45NBT provides complete enterprise-class Wi-Fi connectivity with an integrated TCP/IP stack, full support for IEEE 802.11a/b/g/n and Bluetooth 4.0 dual-mode air standards, and a fully integrated security supplicant providing
802.11i/WPA2 Enterprise authentication, data encryption, and BT protocol stacks.
The WB45NBT is a fully integrated module with RF shielding and two U.FL type antenna connectors. The Main antenna (for Wi-Fi) and the Auxiliary antenna (for Bluetooth) work separately to get the best coexistence performance. Although not currently supported, the third antenna connector multiplexes both the Wi-Fi and Bluetooth signals into a single RF port through the use of a T/R switch.
Note: For additional information on the hardware aspects of the WB45NBT, please refer to the Hardware
Integration Guide download on the WB45NBT Product Page.
3 SOFTWARE
The WB45NBT has 128 MB of NAND flash memory that is divided into partitions (see Table 1). It uses 4-bit ECC in a 64 bit OOB area in each sector.
Table 1: Flash memory partitions
Image
Partition
Start
End
Size
MTD
Type
at91bs.bin
at91bs
0x00000000
0x0001FFFF
128 KB
/dev/mtd0
Raw binary
u-boot.bin
u-boot
0x00020000
0x0009FFFF
512 KB
/dev/mtd1
Raw binary
-
u-boot-env
0x000A0000
0x000BFFFF
128 KB
/dev/mtd2
U-boot env
-
redund-env
0x000C0000
0x000DFFFF
128 KB
/dev/mtd3
U-boot backup env
kernel.bin
kernel-a
0x000E0000
0x0035FFFF
2.5 MB
/dev/mtd4
Kernel image
kernel.bin
kernel-b
0x00360000
0x005DFFFF
2.5 MB
/dev/mtd5
Kernel image
rootfs.ubi
rootfs-a
0x005E0000
0x02BDFFFF
38 MB
/dev/mtd6
UBI
rootfs.ubi
rootfs-b
0x02BE0000
0x051DFFFF
38 MB
/dev/mtd7
UBI
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
5
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
N/A
user
0x051E0000
0x07EFFFFF
46 MB
/dev/mtd8
Raw
N/A
logs
0x07F00000
0x07F7FFFF
512 KB
/dev/mtd9
Raw
There are four basic types of binary images that can be programmed into the flash memory:
Bootstrap loader U-boot boot loader Linux kernel Root filesystem
The flash partition layout allows for two kernel images (kernel-a and kernel-b), as well as two file system images (rootfs-a and rootfs-b). This allows an update to an alternate image without disturbing the currently running system. Additionally, if something goes awry with the newly updated image, the original image is still available. The update program is intelligent enough to program the correct partition (the one which is not currently being run).
The filesystem is stored using a format called Unsorted Block Images (UBI). This is a filesystem that lies on top of the Memory Technology Device (MTD) layer. The MTD layer handles bad block mapping. When a bad block is encountered, it is simply skipped and not used. As new bad blocks occur, they are marked as such and handled properly between the MTD and UBI file system. The UBIFS handles wear-leveling.
3.1 WB45NBT Usage
One of the main applications of the WB is to enable Wi-Fi on your host device using one of the available interfaces of the WB module. This section describes how to do this from a Linux environment.
The quickest way to start controlling the WB is through the built-in Linux command line interface (CLI). The WB's CLI can be accessed via the DEBUG UART (settings: 115200 8N1) or via Secure Shell (ssh). ssh logins can be accepted on Ethernet (IP address assigned via DHCP – see your local DHCP server for address) or via USB Ethernet at IP address 192.168.3.1 port 22.
Once CLI access is available, configuration files on the device can be examined or modified.
4 CONFIGURING IP BASED CONNECTIVITY
This section covers enabling your host device to communicate over Wi-Fi via the WB. The predominant use cases involve using the WB as Ethernet to Wi-Fi, USB to Wi-Fi, or Serial PPP (RS232) to Wi-Fi peripherals. These use
cases allow normal IP network connectivity via the WB’s Wi-Fi interface. We’ll explain these use cases in this guide, but they aren’t the only ones available; more complex configurations are also possible. Please contact
Laird support if you have a use case this is not covered in this document.
4.1 Choosing an Interface to the WB
The first consideration in configuring the Wi-Fi connectivity is what interface will be used between the host device and the WB. The most common three options are Ethernet, USB Ethernet, and Serial (RS232). Each of these cases has the host device sending and receiving IP packets and the WB forwarding packets to and from the Wi-Fi interface once connected.
Ethernet – Refers to the standard 802.3 Ethernet. USB connectivity – We recommend setting up the WB to enable USB CDC Ethernet (also known as USB
Gadget Ethernet). Then installing the proper drivers on the host device. This allows the WB to appear as a standard Ethernet network device.
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
6
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
Serial (RS232) – We recommend setting up PPP over serial on the WB and the host device and enabling IP
over PPP. Optionally, the host device can send raw byte data to a UART on the WB and the WB can forward that data bi-directionally to a TCP socket via the built in socat program.
4.2 Configuring the WB to Use Layer 2 Bridging or Layer 3 NAT
The second consideration in configuring Wi-Fi connectivity is whether to configure the WB to act as a Layer 2 Bridge or a Layer NAT device.
4.2.1 Layer 2 Bridge
When configured as a Layer 2 bridge, the WB acts as a transparent bridge for Layer 2 packets carrying an IP­based packet from the host device. The WB expects the host to do all Layer 3 IP configuration such as static addressing or DHCP for the Wi-Fi network. This mode applies to Ethernet to Wi-Fi. In the Layer 2 Bridge configuration, it appears to the host device that it is connected to a physical network.
4.2.2 Layer 3 NAT
When configured to do Layer 3 NAT, the WB is configured to run a DHCP client or have a static IP address on the WB’s Wi-Fi interface. In this configuration, a static non-routable IP address is assigned on the host device’s communication interface and the corresponding interface on the WB. Port NAT and IP masquerading would then enable seamless communication from the host interface to the Wi-Fi network. This mode applies to Ethernet to Wi-Fi, USB Ethernet to Wi-Fi, and Serial PPP to Wi-Fi. Seven common use cases are detailed that describe the WB configured as a bridge or NAT device.
Note: Please contact Laird support if you have a use case not covered here in this document.
4.3 Choosing Layer 2 Bridge or Layer 3 NAT – Use Cases
4.3.1 Use Case 1
A single host device with a DHCP client for Wi-Fi on the host device’s Ethernet to the WB.
This is often used when the WB if functioning as an Ethernet to Wi-Fi dongle on an existing product where the Ethernet is set up to use DHCP.
Solution: Bridging
The WB acts as a transparent bridge between the Ethernet and Wi-Fi.
Caveats:
It should send a ping packet or other IP packet from the host device’s interface to the WB once a new IP
address has been assigned to register the host device with the WB’s bridge code. Otherwise, the bridge
may not forward incoming Wi-Fi packets to the host device.
In addition, this configuration is not able to renew DHCP on a roam without software using SDK Events to alert the host device to trigger DHCP on a roam. This is only an issue for networks configured with multiple subnets on the same SSID (determine if your customers do this).
See Single Host Device with DHCP running on the WB for NAT Configuration to solve this issue.
Use Case 1 Example
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
7
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
4.3.2 Use Case 2
A single host device with a static IP for Wi-Fi on the host device’s Ethernet to the WB
The IP address that is used on the Wi-Fi network is statically assigned by the host device. This is often the case when using the WB as an Ethernet to Wi-Fi dongle on an existing product where the Ethernet was set up to use static IP addresses.
Solution: Bridging
The WB acts as a transparent bridge between the Ethernet and Wi-Fi.
Caveats:
It should send a ping packet or other IP packet from the host device’s interface to the WB using static IP address to register host device with WB’s bridge code. Otherwise the bridge may not forward incoming Wi-Fi packets to the host device.
Use Case 2 Example
4.3.3 Use Case 3
A single host device with DHCP running on the WB’s Wi-Fi interface
A single device is connected to the Ethernet, USB Ethernet, or PPP serial; a DHCP client is running on the WB to handle the Wi-Fi DHCP assignment.
Solution: NAT
The WB does IP NAT and port masquerading to forward traffic from the Wi-Fi to host device. Host device interface to the WB along with the corresponding WB interface should be assigned a non-routable
169.254.x.x IP address. The WB does a DHCP request on roam to support networks configured with multiple subnets on the same SSID (determine if your customers do this).
Use Case 3 Example
4.3.4 Use Case 4
A single host device with a static IP on the WB’s Wi-Fi interface
Solution: NAT
The WB does IP NAT and port masquerading to forward traffic from Wi-Fi to the host device. The host device interfaces to the WB, along with the corresponding WB interface, should be assigned a non­routable 169.254.x.x IP address.
Use Case 4 Example
4.3.5 Use Case 5
Multiple host devices connected via Ethernet with DHCP running on the WB’s Wi-Fi interface
Solution: NAT
The WB does IP NAT and port masquerading to forward traffic from the Wi-Fi to each host device. Host device interfaces to the WB along with the corresponding WB interface should be assigned non-routable
169.254.x.x IP addresses. The WB does a DHCP request on roam to support networks configured with multiple subnets on the same SSID (determine if your customers do this).
Use Case 5 Example
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
8
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
4.3.6 Use Case 6
Multiple host devices connected via Ethernet with a static IP on the WB’s Wi-Fi interface
Solution: NAT
The WB does IP NAT and port masquerading to forward traffic from Wi-Fi to each host device. Host device interfaces to the WB, along with the corresponding WB interface, should be assigned non-routable
169.254.x.x IP addresses. The WB does a DHCP request on roam to support networks configured with multiple subnets on the same SSID (determine if your customers do this).
Use Case 6 Example
4.3.7 Use Case 7
Multiple host devices connected via Ethernet with DHCP running or a static IP on each host device interface to the WB
Solution: Use NAT instead
We recommend that you use a NAT-based configuration instead. The WB does not currently support this use case in the standard release. If this use case is required, please contact Laird with complete details of the use case for potential customized options.
Use Case 7 Example
4.4 WB Configurations – Use Case Examples
Each example configuration uses a combination of the sdc_cli command line utility, the ifrc command line utility, and editing the /etc/network/interfaces file. These can be done once console access has been established with the WB as described in the WB45NBT Quick Start Guide (available from the Documentation tab of the Laird
WB45NBT product page). These configurations are only examples for the WB’s configuration. Example host test
device configurations are described in the following section to complete early testing.
Note: Editing of the /etc/network/interfaces file should be done with vi. To learn how to use vi as an
editor, there are many online tutorials.
To begin editing, execute the following:
# vi /etc/network/interfaces
Note: The following examples describe how to enable Ethernet to Wi-Fi connectivity. In these cases, the
Ethernet interface is referred to as eth0. To enable USB Ethernet to Wi-Fi, substitute eth0 with usb0 and for PPP Serial to Wi-Fi substitute eth0 with ppp0. The Wi-Fi interface is wlan0 in the examples.
4.4.1 Use Case 1 Example
A single host device with a DHCP client for Wi-Fi on the host device’s Ethernet to the WB.
Enable the Ethernet interface and make sure it doesn’t use an IP configuration:
# sdc_cli iface set auto eth0 on
# sdc_cli iface set method eth0 manual
WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
9
© Copyright 2017 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
Enable the Wi-Fi interface and make sure it doesn’t use an IP configuration:
# sdc_cli iface set auto wlan0 on # sdc_cli iface set method wlan0 manual
Enable bridging between Ethernet and Wi-Fi:
# sdc_cli iface set auto br0 on # sdc_cli iface set method br0 manual # sdc_cli iface set bridge_ports br0 eth0 wlan0
Optional: If IP communication between the WB and host device for configuration or otherwise is desired, then
additional IP configuration should be enabled on the bridge interface (br0):
# sdc_cli iface set method br0 static # sdc_cli iface set address br0 169.254.0.1 # sdc_cli iface set netmask br0 255.255.255.0 # sdc_cli iface set broadcast br0 169.254.0.255
4.4.2 Use Case 2 Example
A single host device with a static IP for Wi-Fi on the host device’s Ethernet to the WB
Enable the Ethernet interface and make sure it doesn’t use an IP configuration:
# sdc_cli iface set auto eth0 on # sdc_cli iface set method eth0 manual
Enable the Wi-Fi interface and make sure it doesn’t use an IP configuration:
# sdc_cli iface set auto wlan0 on # sdc_cli iface set method wlan0 manual
Enable bridging between Ethernet and Wi-Fi:
# sdc_cli iface set auto br0 on # sdc_cli iface set method br0 manual # sdc_cli iface set bridge_ports br0 eth0 wlan0
Optional: If IP communication between the WB and host device for configuration or otherwise is desired, then
additional IP configuration should be enabled on the bridge interface (br0):
# sdc_cli iface set method br0 static # sdc_cli iface set address br0 169.254.0.1 # sdc_cli iface set netmask br0 255.255.255.0 # sdc_cli iface set broadcast br0 169.254.0.255
4.4.3 Use Case 3 Example
A single host device with DHCP running on the WB’s Wi-Fi interface
Loading...
+ 19 hidden pages