Laird WB45NBT User manual

Reference Guide
Laird WB45NBT
Version 1.5
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852-2923-0610
www.lairdtech.com/wireless
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
2
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
REVISION HISTORY
Version
Revision Date
Change Description
Approved By
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 Error! Reference source not found.
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

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
3
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
CONTENTS
Revision History ...................................................................................................................................................... 2
Contents.................................................................................................................................................................. 3
Introduction to the Laird WB45NBT Device ......................................................................................................... 4
Product Description ............................................................................................................................................... 4
Software ................................................................................................................................................................. 5
WB45NBT Usage.................................................................................................................................................................. 5
Configuring IP Based Connectivity ....................................................................................................................... 5
Choosing an Interface to the WB......................................................................................................................................... 6
Configuring the WB to Use Layer 2 Bridging or Layer 3 NAT............................................................................................... 6
Choosing Layer 2 Bridge or Layer 3 NAT –Use Cases.......................................................................................................... 6
WB Configurations –Use Case Examples ............................................................................................................................ 8
Activating the New WB Configuration............................................................................................................................... 12
Set Up –USB Ethernet on a Host PC ................................................................................................................... 12
On Windows 7/10.............................................................................................................................................................. 12
On Ubuntu 14.04 ............................................................................................................................................................... 13
Setting Up a PPP Link Over RS232 ...................................................................................................................... 13
On Windows 7/10.............................................................................................................................................................. 13
On Ubuntu 14.04 ............................................................................................................................................................... 14
Building the WB from Source.............................................................................................................................. 14
Updating the WB50NBT Software ...................................................................................................................... 15
Flash Programming Using fw_update................................................................................................................................ 15
Troubleshooting U-Boot .................................................................................................................................................... 19
Flash Programming Using the Atmel SAM-BA Utility ........................................................................................................ 20
Binary Image Description................................................................................................................................................... 20
Preparing the Laird WB45NBT for Programming .............................................................................................................. 20
Installing the Atmel AT91 Driver........................................................................................................................................ 20
Software Requirements..................................................................................................................................................... 21
USB SAM-BA Flash Programming ...................................................................................................................................... 22
Debugging............................................................................................................................................................ 25
Application Debugging....................................................................................................................................................... 25
Connecting a Device or File to a Socket............................................................................................................................. 25
Setting Up Stand-alone FTP, TFTP, and SSH servers .......................................................................................................... 26
Breakout Board Schematic and BOM ................................................................................................................. 26
Developing and Integrating Using the Development Kit ................................................................................. 26
Software Tools and Techniques......................................................................................................................................... 26
Finding Version Information.............................................................................................................................................. 27
Hardware Use Notes ............................................................................................................................................ 27
GPIOs ................................................................................................................................................................................. 27
Analog to Digital Converter ............................................................................................................................................... 29
References ............................................................................................................................................................ 30
More information and Support .......................................................................................................................... 30

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
4
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
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
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.

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
5
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
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
bootstrap.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
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.
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 or Windows host 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.
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
Commented [Sd1]: As the serial instructions we give are PPP, we
should make this say "Serial-PPP (IP over RS-232)". It is possible to
do a straight RS-232 to WiFi bridging, but we don't explain that
here.
Commented [EB2R1]: corrected

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
6
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
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.
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.
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.
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.
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 and USB Ethernet to Wi-Fi. In the Layer 2 Bridge configuration, it
appears to the host device that it is connected to a physical network.
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.
Choosing Layer 2 Bridge or Layer 3 NAT –Use Cases
Use Case 1
A single host device with a DHCP client for Wi-Fi on the host device’s Ethernet or USB interface 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 or USB 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.

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
7
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
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
Use Case 2
A single host device with a static IP for Wi-Fi on the host device’s Ethernet or USB interface 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 or USB 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
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
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
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

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
8
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
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
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
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.
Use Case 1 Example
A single host device with a DHCP client for Wi-Fi on the host device’s Ethernet or USB interface 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

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
9
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
# 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
Use Case 2 Example
A single host device with a static IP for Wi-Fi on the host device’s Ethernet or USB interface 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
Use Case 3 Example
A single host device with DHCP running on the WB’s Wi-Fi interface
Enable the Ethernet interface and configure a non-routable IP configuration:
# sdc_cli iface set auto eth0 on
# sdc_cli iface set method eth0 static
# sdc_cli iface set address eth0 169.254.0.1
# sdc_cli iface set netmask eth0 255.255.255.0
# sdc_cli iface set broadcast eth0 169.254.0.255
Enable the Wi-Fi interface with DHCP client support:
# sdc_cli iface set auto wlan0 on
# sdc_cli iface set method wlan0 dhcp

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
10
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
Enable NAT between Ethernet and Wi-Fi by editing /etc/network/inferfaces. The stanza starting with auto eth0 should
have an uncommented out post-cfg-do and pre-dcfg-do sections like the following:
## Wired
auto eth0
iface eth0 inet static
…
…
post-cfg-do /etc/network/wifi-nat.conf
pre-dcfg-do /etc/network/wifi-nat.conf
Use Case 4 Example
A single host device with a static IP on the WB’s Wi-Fi interface
Enable the Ethernet interface and configure a non-routable IP configuration:
# sdc_cli iface set auto eth0 on
# sdc_cli iface set method eth0 static
# sdc_cli iface set address eth0 169.254.0.1
# sdc_cli iface set netmask eth0 255.255.255.0
# sdc_cli iface set broadcast eth0 169.254.0.255
Enable the Wi-Fi interface with static IP support:
# sdc_cli iface set auto wlan0 on
# sdc_cli iface set method wlan0 static
# sdc_cli iface set address eth0 x.x.x.x
# sdc_cli iface set netmask eth0 x.x.x.x
# sdc_cli iface set broadcast eth0 x.x.x.x
# sdc_cli iface set nameserver eth0 x.x.x.x
Enable NAT between Ethernet and Wi-Fi by editing /etc/network/inferfaces. The stanza starting with auto eth0 should
have an uncommented out post-cfg-do and pre-dcfg-do sections like the following:
## Wired
auto eth0
iface eth0 inet static
…
…
post-cfg-do /etc/network/wifi-nat.conf
pre-dcfg-do /etc/network/wifi-nat.conf
Use Case 5 Example
Multiple host devices connected via Ethernet with DHCP running on the WB’s Wi-Fi interface
Enable the Ethernet interface and configure a non-routable IP configuration:

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
11
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
# sdc_cli iface set auto eth0 on
# sdc_cli iface set method eth0 static
# sdc_cli iface set address eth0 169.254.0.1
# sdc_cli iface set netmask eth0 255.255.255.0
# sdc_cli iface set broadcast eth0 169.254.0.255
Enable the Wi-Fi interface with DHCP client support:
# sdc_cli iface set auto wlan0 on
# sdc_cli iface set method wlan0 dhcp
Enable NAT between Ethernet and Wi-Fi by editing /etc/network/inferfaces. The stanza starting with auto eth0 should
have an uncommented out post-cfg-do and pre-dcfg-do sections like the following:
## Wired
auto eth0
iface eth0 inet static
…
…
post-cfg-do /etc/network/wifi-nat.conf
pre-dcfg-do /etc/network/wifi-nat.conf
Use Case 6 Example
Multiple host devices connected via Ethernet with a static IP on the WB’s Wi-Fi interface
Enable the Ethernet interface and configure a non-routable IP configuration:
# sdc_cli iface set auto eth0 on
# sdc_cli iface set method eth0 static
# sdc_cli iface set address eth0 169.254.0.1
# sdc_cli iface set netmask eth0 255.255.255.0
# sdc_cli iface set broadcast eth0 169.254.0.255
Enable the Wi-Fi interface with static IP support:
# sdc_cli iface set auto wlan0 on
# sdc_cli iface set method wlan0 static
# sdc_cli iface set address eth0 x.x.x.x
# sdc_cli iface set netmask eth0 x.x.x.x
# sdc_cli iface set broadcast eth0 x.x.x.x
# sdc_cli iface set nameserver eth0 x.x.x.x
Enable NAT between Ethernet and Wi-Fi by editing /etc/network/inferfaces. The stanza starting with auto eth0 should
have an uncommented out post-cfg-do and pre-dcfg-do sections like the following:
## Wired
auto eth0
iface eth0 inet static
…
…
post-cfg-do /etc/network/wifi-nat.conf

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
12
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
pre-dcfg-do /etc/network/wifi-nat.conf
Use Case 7 Example
Multiple host devices connected via Ethernet with DHCP running or a static IP on each host device interface
to the WB
Laird recommends to 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.
Activating the New WB Configuration
To activate the new configuration, two method can be used:
Activate via a reboot
# reboot
Activate without a reboot
# ifrc restart
SET UP –USB ETHERNET ON A HOST PC
From either a Windows host PC or a PC running Ubuntu 14.04, you must configure the usb-ethernet host device settings.
Note: The IP address of the USB Ethernet connection is 192.168.3.1. When configuring the host interface the IP
address assigned to the host must be on the same subnet.
On Windows 7/10
Once the USB cable is plugged in, the Windows 7 or 10 OS should recognize and install the USB Ethernet driver. Ensure
the USB Ethernet interface is used for bridging the Wi-Fi on the WB50 to the host by removing any connected Ethernet
cables and disabling any Wi-Fi interfaces on the host PC. Network interfaces can be disabled through from the Start menu:
Control Panel > Network and Internet > Network Connections.
Configure the address information on the USB Ethernet device to be compatible with the WB50:
1. From the Start menu, select Control Panel > Network and Internet > Network Connections.
2. Right-click the interface with the label that includes USB Ethernet/RNDIS Gadget and select Properties.
3. In the scrollable list of items, select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
4. Select Use the following IP address:
5. Change the address settings to match the following:
IP address: 192.168.3.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.3.1
Use the following DNS server address:
Preferred DNS server 8.8.8.8
6. Click OK and Close.
7. To disable and re-enable the USB Ethernet interface, right-click and select Disable then right-click and
select Enable.

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
13
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
On Ubuntu 14.04
Once the USB cable is plugged in, the Linux OS should recognize and load the USB Ethernet driver. Ensure that the USB
Ethernet interface is being used for bridging the Wi-Fi on the WB50 to the host by removing any Ethernet cables and
disabling any Wi-Fi interfaces on your host PC. To do this, left-click the network icon in the upper right corner on the task
bar and un-check Enable Wi-Fi.
To set the IP address on the USB Ethernet device to be compatible with the WB50, follow these steps:
1. Left-click the Network Manager icon on the task bar and select Edit connections.
2. From the Ethernet list, select the Wired connection interface.
3. Click Edit..
4. In the Editing Wired connection window, select the IPv4 Settings tab.
5. From the Method list, select Manual.
6. Click Add.
7. Change the address settings to the following:
Address: 192.168.3.2
Netmask: 255.255.255.0
Gateway: 192.168.3.1
DNS servers: 8.8.8.8
8. Click Save and Close.
If your WB was set up with a profile and connected to a local AP, you should now be connected to the network via the Wi-
Fi. Verify by opening your browser and navigating to a resource on the network or, if the network has access to the
Internet, navigate to our website: http://www.lairdtech.com/
SETTING UP A PPP LINK OVER RS232
The WB50NBT may be configured as a Wi-Fi peripheral using a PPP (point-to-point) link over RS232. The USB to RS232
cable is required for this example. On the WB, use the sdc_cli to create and activate a wireless profile. Once a Wi-Fi
connection has been established, attach the DB9 connector of the cable to the BB40 (use the port on the BB40 labeled
UART0 which is /dev/ttyS2)and the USB connector to the host.
See the examples for use cases 3 and 4; substitute ppp0 to configure the WB for PPP over RS232.
Next, you must set up your host machine.
On Windows 7/10
1. At the Start menu, type Phone and Modem.
2. Click Phone and Modem when the link is found.
3. From the Modems tab, click Add.
4. Select Don’t detect… I will select it from a list and click Next.
5. Choose Standard Modem Types > Communications between two computers and click Next.
6. Select the serial port.
7. Click Next.
8. Navigate to Control Panel > Network and Internet > Network and Sharing Center > Set up a new
connection.
9. Choose Setup a dial up connection and click Next.
10. Enter any random phone number to continue. If you prefer, change the connection name.
11. Click Connect. When it fails, click Connect anyway.
12. Navigate to Control Panel > Network and Internet > Network and Sharing Center > Change adapter
setting.
13. Right-click the new adapter and select Properties.
Commented [AD3]: This didn't work for me on ubuntu 15.10. I
think that the USB driver didn't load correctly on the Linux host.
Don't know enough about linux to check that. On Windows 7 it
recognised the driver immediately and loaded.
Commented [Sd4R3]: This works as expected on Ubuntu 14.04.
Likely it probably loaded the driver for you on 15.10, but the
directions for bringing up the interface have changed. I don't use
that version so I can't check.
Commented [Sd5]: I question this. A lot of other stuff needs to be
done right in order for this to work, and odds are the linux box
probably already has other working interfaces, so this isn't really a
valid test.
At a minimum:
1. The WB in question needs to be in bridge mode (per the
configuration we see here)
2. The WB needs to have a profile set and connected to the WiFI
3. And the WB would need access to the internet over the WiFi.
None of the above is a given.
Commented [EB6R5]: added verbiage
Commented [Sd7]: Note that I changed this to BB. The WB
doesn't have a DB9 connector. Also, I called out the BB40's marking
specifically, we'll need to change this for the BB50 as it gets
corrected there.

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
14
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
14. From the Networking tab, de-select Internet Protocol Version 6.
15. Select Internet Protocol Version 4 and click Properties.
16. Enter the following:
IP address: 192.168.0.2
DNS server address: 8.8.8.8
17. From the General tab, click Configure.
18. Change the maximum speed to 230400.
19. Right-click the adapter and select Connect.
Note: If the maximum speed doesn’t persist, you may also have to change the speed (to 230400) in the following
locations:
–Device Manager > Modems > Maxim Port Speed
–From the Network icon on the taskbar, right-click the modem connection and select
Properties > Speed.
After a reboot the correct value should persist.
On Ubuntu 14.04
# /usr/sbin/pppd 192.168.0.2:192.168.0.1 /dev/ttyUSB1 230400
Note: Your USB interface may be different.
BUILDING THE WB FROM SOURCE
The WB50NBT utilizes Buildroot to build the entire system. Laird's WB50NBT source release package provides everything
necessary to build and customize a WB image for your application and hardware system. WB source releases are
distributed on GitHub.
Please go to GitHub for both the source release and the instructions for working with it: https://github.com/LairdCP/wb-
manifests
Requirements:
Linux system capable of building Buildroot
Internet access
Recommended:
Ubuntu 14.04 LTS
Details on the system requirements for using Buildroot can be obtained from the Buildroot User Manual.
(http://buildroot.uclibc.org/downloads/manual/manual.html#requirement)
Complete information on Buildroot is also available with the Buildroot User Manual.
(http://buildroot.uclibc.org/downloads/manual/manual.html)
Commented [EB8]: I use Ubuntu 14.4 LTS. I'm wondering if we
should be recommending 12.0 LTS. After all, it is 4 years old now.
Commented [AD9R8]: I would agree. 12.0 does seem old. I'm
using Ubuntu 15.10 on the box I have.
Commented [Sd10R8]: Actually, the GA5 won't build on 12 IIRC.
12 was our old system, not the new one. 14.04 LTS is our standard
and should stay that way for now.

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
15
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
UPDATING THE WB50NBT SOFTWARE
There are various methods of updating the software on the WB. Once you’ve completed a build with the buildroot
framework or have downloaded the binary image files, there are three options for programming them onto the
WB50NBT:
Linux: Use the fw_update utility on the WB.
UBoot: Flash the images from the u-boot environment shell.
SAM-BA: Use the external sam-ba utility if there is no image present on the WB or the system has
become corrupted.
Flash Programming Using fw_update
The fw_update program is run via the Linux shell in either of two ways:
Automatic –During bootup, if using a DHCP server that also sends a Bootfile-Name option along with the
IP address. The option value is set to the URL of the images server.
Manual –The fw_update program can be invoked manually over the WB's Linux command line interface
(CLI).
In all cases, fw_update requires an fw.txt file to describe the image files available via locally-attached media (such as a
USB flash drive or SD card); or via remote network server (anonymous https, http, and ftp are supported). The program
has built-in help and examples which can be viewed with:
# fw_update –h
# fw_update --usage
# fw_update --usage fw.txt
The fw_update program can be invoked from the CLI. You can obtain access to the CLI either through the console serial
port or over a network connection, via Ethernet or a USB Ethernet gadget, with the use of SSH. By default, an SSH server is
enabled on the WB50NBT. The username is root and the password is summit. It’s important that the password is changed
to something different in the filesystem of the end product.
For example: If updating from a USB flash drive:
Load the image components and the fw.txt file onto a USB or mmc/SD drive. Insert the drive into the appropriate port on
the BB50 breakout board. The media drive is auto-mounted to the directory /media/usb0.
# fw_update /media/usb0/fw.txt
The path of the image files on the USB drive can be specified on the fw_update command line; a path with spaces is not
supported. For example:
# fw_update /media/usb0/directory_path/fw.txt
... when the files are stored on the USB drive in /directory_path/.
fw_update via Network
fw_update can also be used over a wireless connection if the image files are placed on a web or ftp server. For example:
# fw_update http://<url of server>/<path>/fw.txt
Remote Update Requirements
To use the Remote Update capability of the WB45NBT, three pieces of hardware must to be in place:
Wi-Fi Access Point
Windows or Linux server running DHCP and either HTTP or FTP
Commented [EB11]: We should indicate a security
section/document or indicate the command to change the
password. - possibly how to change it in the buildroot packaging so
that the password change is in the image

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
16
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
WB45NBT unit to be updated
Wi-Fi Access Point
If this is the first time the WB45NBT module is updated, then the AP must be configured for open access. This
ensures that the WB45NBT can obtain a wireless network connection without having to be pre-programmed with a
specific SSID and password. Make sure that there are no other APs around that the WB45NBT may inadvertently
attach to during this update procedure.
Subsequent updates can be scheduled with a prescribed, secured AP but the corresponding profile must first be
created in the unit using the CLI.
Windows or Linux Server
The server must offer DHCP and either HTTP or FTP file services.
The DHCP server must be configured to send an additional parameter called a DHCP Option. The DHCP Option
specifies a Bootfile-Name (DHCP option #67). The Bootfile-Name is a URL of a text file that further describes the
images to be updated (the 'Bootfile'). More information on the bootfile can be found later in this document.
The update program uses the
wget
utility to fetch the remote updates from the file server over the network. It
supports both HTTP and FTP protocols.
Laird WB45NBT
The WB45NBT must be connected to a power source and have a Wi-Fi antenna connected to it.
Bootfile Description
The bootfile (called fw.txt) is a list of all images that are to be updated on the WB45NBT. It resides on the file server
and is pointed to by the Bootfile-Name option in the DHCP Server’s configuration.
The format of the bootfile is as follows:
06c73bb2c38f6bd0ecde4b2308595adc at91bs.bin 11444
c55870dce9de3347950987b135a9fcd3 u-boot.bin 359032
5f7f5ebb4717250cdf565e20049debbe kernel.bin 2091686
479d3828243c3712efd9a14ecfefb96e rootfs.bin 23592960
It is not required to list all four images in this file. If only a subset of these images is required to be upgraded, then
only list those particular image files. Each line has three elements:
MD5SUM of image file
Name of the image file
Length of the image file in bytes
Remote Update Methodology
The remote update can be performed automatically using DHCP or manually, using the fw_update program on the
WB45NBT. Both methods are described in the following sections.
Automatic Remote Update
This section describes the default behavior of the WB45NBT firmware supplied by Laird.
After associating with an AP, the WB45NBT sends out a DHCP request. The DHCP server must respond with an IP
address and a Bootfile-Name. The WB45NBT detects if it has received this optional DHCP information. If it does, it
proceeds with the fw_update program using the information in the bootfile to update its flash memory. If the

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
17
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
MD5SUM of the components listed in the bootfile match what is already on the device, then nothing is updated and
the WB45NBT continues to run normally.
After all the updates are complete, the bootloader is made aware of the new kernel and/or filesystem and loads
these new images on the next reboot. The WB45NBT reboots into the newly updated system automatically after the
update process is complete.
Manual Remote Update
The fw_update program can be invoked from the CLI. Access to the CLI can be obtained either through the serial
port or over a network connection through the use of SSH. By default, an SSH server is enabled on the WB45NBT.
The username is
root
and the password is
summit
. It is important that the password is changed to something
different in the filesystem of the end product.
When manually starting the fw_update program, the URL for the
fw.txt
file must be supplied as an argument to the
fw_update program. For example:
fw_update http://192.168.1.10/wb45n/fw.txt
Note: WB45NBT requires a valid IP address before it can fetch the image files from the network. If the
WB45NBT is configured as a bridge (which may not have an IP address), then it must be configured with
a valid IP address on its network interface before running the fw_update program. This can be done by
stopping the bridging (/etc/network/bridge.sh stop) and then using udhcpc -i wlan0 or the ifrc utility to
configure the IP address settings of the wireless interface.
After the update program has completed its process, the bootloader becomes aware of the new kernel and/or
filesystem. The new images are loaded on the next reboot. Issue the reboot command to reboot the WB45NBT.
When invoked manually, the fw_update program does not automatically reboot the WB45NBT after it has
completed updating the device.
Limitations
These methods of updating are destructive to existing data on the device because existing data in the flash memory
of the WB45NBT is overwritten by the new image.
There cannot be a second DHCP server which could respond to the DHCP request sent out by the WB45NBT. This
would create a situation where an intended update may not take place.
Currently, boot failures are not automatically handled by the default software.
Flash Programming Using U-boot shell
If the WB45NBT module already has both the bootstrap and U-Boot programmed into it, then U-Boot may be used
to load binary images as an alternative to SAM-BA. To use U-Boot to program flash memory, an Ethernet
connection must be available and the binary images must be available over the network from a TFTP server.
U-Boot supports the Ethernet interface (not the wireless interface) for downloading images. For this reason, it is
necessary to have the WB45NBT plugged into the breakout board, so that the RJ45 Ethernet connection is available.
This method of programming also requires that a TFTP server exists on the local network, and that it has the binary
images that are required for the programming procedure.
To get into the command prompt of U-Boot, connect a serial line from the Debug UART to a PC running a terminal
program, such as Tera Term. Tera Term may be obtained from: http://ttssh2.sourceforge.jp/

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
18
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
The serial interface should be configured for 115200 baud, no parity, 8 data bits, 1 stop bit (N81), and no
handshaking. When the WB45NBT is powered up, the serial terminal displays some bootloader messages. At this
point, press Enter several times; the following command prompt will appear:
U-Boot>
Note: If U-Boot does not see any key press, then it automatically boots the operating system after a one
second delay.
At this point, U-Boot may be used to update itself, the bootstrap loader, the Linux kernel, or the file system. Any
one of these items may be updated, and they do not all necessarily need to be updated at the same time. However,
because of compatibility, it is good to ensure that the Linux kernel and the file system are intended to work together
(from a relatively similar release, if not the same release version).
The process of updating a flash image using U-Boot is comprised of downloading the image to be programmed into
local SDRAM of the WB45NBT, erasing the flash at the target memory location, and then copying the contents of
SDRAM to flash memory.
Preparing for using network and tftp:
set autoload no
dhcp
set serverip <ip-address-of-tftp-server>
To update the bootstrap loader, follow these commands:
tftp at91bs.bin
protect off all
nand erase 0x00000000 0x00020000
nand write 0x22000000 0x0 ${filesize}
To update U-Boot, follow these commands:
tftp u-boot.bin
nand erase 0x20000 0x80000
nand write 0x22000000 0x20000 ${filesize}
To update the Linux kernel, follow these commands:
tftp kernel.bin
nand erase 0x000e0000 0x00280000
nand write 0x22000000 0x000e0000 ${filesize}
To update the file system, follow these commands:

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
19
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
tftp rootfs.ubi
nand erase 0x005e0000 0x02600000
nand write.trimffs 0x22000000 0x005e0000 ${filesize}
To reset the system from the U-Boot prompt, type
reset
and press Enter.
Troubleshooting U-Boot
If it is not known whether or not a WB45NBT module has a boot loader programmed into it, the presence of a boot
loader can be determined by examining the serial data from the Debug UART at power-on. This serial interface runs
at 115200 baud, no parity, 8 data bits, 1 stop bit, and no hardware handshaking. The boot loader displays text that
is similar to the following:
# RomBOOT
ba_offset = 0xb ...
Loading 1-Wire info...
Enumerate all roms:
Done, 0x0 1-wire chips found!
sn: 0x0; rev: 0x0
AT91Bootstrap 3.4.4-laird2 ( Mon Jul 29 17:36:14 PDT 2013 )
Downloading image...
Nand: ONFI not supported
NAND device: NAND 128MiB 1,8V 8-bit, Manufacturer ID: 0x0 Chip ID: 0xa1
Nand: Copy 0x80000 bytes from 0x20000 to 0x23f00000
Done!
U-Boot 2013.01-laird2-00003-gba48fda (Jul 29 2013 - 17:36:18)
CPU: AT91SAM9G25
Crystal frequency: 12 MHz
CPU clock : 400 MHz
Master clock : 133.333 MHz
DRAM: 64 MiB
WARNING: Caches not enabled
NAND: 128 MiB
MMC: mci: 0
In: serial
Out: serial
Err: serial
Net: macb0
Hit any key to stop autoboot: 0
If only
RomBOOT
displays, then the boot loader is not installed (flash is empty or the bootstrap loader is corrupt). If
nothing displays, check the serial connection and verify that the WB45NBT is properly powered.

Laird WB45NBT
Reference Guide
Embedded Wireless Solutions Support Center:
http://ews-support.lairdtech.com
www.lairdtech.com/wi-fi
20
© Copyright 2016 Laird. All Rights Reserved
Americas: +1-800-492-2320
Europe: +44-1628-858-940
Hong Kong: +852 2923 0600
Flash Programming Using the Atmel SAM-BA Utility
This section describes the process of programming the OS images into a WB45NBT module. SAM-BA (Smart ARM
Microcontroller Boot Assistant) is a programming utility provided by Atmel. This utility can program flash memory
that is attached to an AT91 microcontroller through either a serial port or through a USB port. It is highly
recommended to avoid the serial port method because it is too slow for transferring large OS images.
Binary Image Description
The following are the four binary images that are programmed into the WB45NBT module:
at91bs.bin --- Bootstrap loader
u-boot.bin --- U-Boot boot loader
kernel.bin --- Linux kernel
rootfs.bin --- File system image
These images are programmed into four specific locations in the 128 MB flash memory of the WB45NBT module.
Table 1 describes the locations for each binary image within flash memory. Pre-compiled binary images are available
for download from Laird.
Preparing the Laird WB45NBT for Programming
If the flash memory has been previously programmed, then it is necessary to temporarily disable the flash memory
by shorting out the chip-select to the flash memory chip. This can be done by shorting TP23 and TP24 (Figure 1)
using a pair of tweezers before power is applied and until two or three seconds after power up.
Figure 1: TP23 and TP24
By disabling the flash in this way, the AT91 processor executes its own internal ROM Boot Loader during the
application of power. The ROM Boot Loader must be running in order to attach to the WB45NBT using SAM-BA.
Roughly three seconds after power is applied, the short across R16 may be removed.
Installing the Atmel AT91 Driver
If this is the first time you are programming the board you will need to install the AT91 USB CDC driver for SAM-BA
to communicate with it.
To install the driver, follow these steps:
1. Prepare the board for programming by shorting R16 on power up. See: Preparing the Laird WB45NBT for
Programming section.
Other manuals for WB45NBT
2
Table of contents
Other Laird Wireless Module manuals

Laird
Laird BL652 User manual

Laird
Laird RM024 User manual

Laird
Laird LT2510 User manual

Laird
Laird CL4490 User manual

Laird
Laird BL654 User manual

Laird
Laird BT830-SA Quick setup guide

Laird
Laird WB50NBT User manual

Laird
Laird RM024 User manual

Laird
Laird RM024 Quick setup guide

Laird
Laird WB50NBT User manual