The EtherSmart/WiFi Wildcard User Guide
.............................3
The EtherSmart/WiFi Glossary Describes the Driver Functions .............................................5
Internet Protocol Support.........................................................................................................6
Summary of EtherSmart/WiFi Capabilities ..............................................................................7
EtherSmart Wildcard Hardware .................................................................................7
WiFi Wildcard Hardware .............................................................................................8
Connecting To the Wildcard Bus ...........................................................................................10
Selecting the Wildcard Address.............................................................................................10
Terminology Overview..............................................................................................11
Ethernet, LANs, and IP Addresses........................................................................................11
TCP and Serial Tunneling......................................................................................................12
Outgoing Email ......................................................................................................................13
HTTP Web Service ................................................................................................................13
Function Naming Conventions ..............................................................................................14
Browser Notes...........................................................................................................15
Using Opera Is Highly Recommended ..................................................................................16
Using the Free Putty TCP/IP Terminal for Testing and Development...................................16
WiFi Access Point Configuration.............................................................................17
Verifying WiFi Wildcard Communications..............................................................................23
The EtherSmart/WiFi Software Driver Routines .....................................................26
EtherSmart/WiFi Driver Data Structures................................................................................26
The Demo Program Provides an Example of Use ................................................................30
Initialization, Configuration and Diagnostics..........................................................................31
WiFi Wildcard Configuration ..................................................................................................42
Code Downloads and Interactive Communications via TCP/IP ............................................52
Serial Tunneling.....................................................................................................................53
Sending Email........................................................................................................................65
Introduction to the Dynamic Webserver ................................................................................69
Using the Dynamic Webserver ..............................................................................................72
Implementing a Remote Front Panel Using the Webserver................................................92
Appendix A: Installing the Software......................................................................100
Generating the EtherSmart/WiFi Library .............................................................................100
Creating Web Page and Image Resources with the Image Converter................................101
Loading the Software onto the Controller ............................................................................102
Using the EtherSmart/WiFi Driver with C ............................................................................102
Using the Driver Code with Forth ........................................................................................103
Appendix B: C Demo Program...............................................................................105
Appendix C: C Remote Front Panel Demo Program............................................113
Appendix D: Forth Demo Program ........................................................................118
Appendix E: Forth Remote Front Panel Demo Program .....................................126
Appendix F: Browser Configuration......................................................................130
Using Opera Is Highly Recommended ................................................................................130
Ethernet
and
WiFi
iii
Reconfiguring the Internet Explorer Browser.......................................................................130
Firefox and Mozilla...............................................................................................................131
Appendix G: EtherSmart Hardware Schematics ..................................................132
Appendix H: WiFi Wildcard Hardware Schematics ..............................................133
1
Chapter 1
The EtherSmart/WiFi Wildcard User Guide
This document describes how to use the EtherSmart and WiFi Wildcards. The EtherSmart
Wildcard provides wired Ethernet connectivity, and the WiFi Wildcard provides wireless
802.11b/g connectivity. These two distinct Wildcards are implemented using similar
hardware, and a common software driver supports both.
The EtherSmart Wildcard implements a hardware/software Ethernet interface that provides
communications between your instrument and other computers or peripherals via a Local Area
Network (LAN) using the standard packet-based Ethernet signaling protocol. Simply plug an
Ethernet cable into the Wildcard via the standard RJ-45 Ethernet connection.
The WiFi Wildcard implements a wireless interface that enables communications between
your instrument and other computers or wireless access points via a Wireless Local Area
Network (WLAN) using the standard 802.11b/g packet-based protocol.
Built-in software lets you send emails from the instrument, serve out static and dynamic web
pages to your PC-based browser, and implement serial data exchanges with peripheral
devices (this is known as Serial Tunneling). These tiny 2 by 2.5 boards are members of
the Wildcard series that connects to Mosaic controllers.
This document describes the capabilities of the EtherSmart and WiFi Wildcards, tells how to
configure their hardware, presents a description of the unified driver software, describes a
demonstration program, and includes hardware schematics. A separate EtherSmart/WiFi
Glossary provides a detailed description of each device driver function
Ethernet and WiFi
The EtherSmart Wildcard and the WiFi Wildcard let you put your instrument online so it can
communicate with other computers on a Local Area Network (LAN) or Wireless Local Area
Network (WLAN). The 2 by 2.5 EtherSmart and WiFi products are members of the Wildcard
family that connects to Mosaic controllers. You can plug one or more EtherSmart or WiFi
Wildcards into any QCard, QScreen, QVGA Board, PDQ Board, PDQScreen, or Mosaic Handheld
system to deliver the benefits of Ethernet or WiFi connectivity to your application.
With the EtherSmart or WiFi Wildcard, your application program can send emails to alert other
computers on the network when significant events occur. You can browse into your instrument
2
The EtherSmart/WiFi Wildcard User Guide
using a web browser running on an online PC to monitor the status of your instrument. The
instrument can implement Serial Tunneling by initiating or accepting TCP/IP Ethernet
connections and exchanging binary and/or ASCII text data with other devices on the local area
network.
The EtherSmart Wildcard uses an Ethernet hardware implementation called the XPort made by
Lantronix (www.lantronix.com). Ethernet is a packet-based computer networking technology for
Local Area Networks (LANs). It defines wiring and signaling for the physical layer, and frame
formats and protocols. The wired version of Ethernet used by the EtherSmart Wildcard is known as
IEEE 802.3. The Lantronix XPort combines a processor, flash and RAM memory, Ethernet network
interface controller, and RJ45 jack into a single component. The Lantronix device can support one
Ethernet connection at a time. A UART (Universal Asynchronous Receiver/Transmitter) chip on the
EtherSmart board provides the interface between the parallel Wildcard bus and the Lantronix
devices serial data lines. Loss-less data integrity is ensured by the combination of built-in 64-byte
data buffers in the UART plus hardware handshaking between the UART and the Lantronix device.
The 3.3V supply that runs the Lantronix module can be shut down under program control while the
interface is not in use to conserve power.
WiFi is short for wireless fidelity; some readers will recognize this as a play on the HiFi
nickname that was originally given to high fidelity stereo audio systems. WiFi is a wireless
communications standard that allows the same type of packets sent via Ethernet to be sent
wirelessly. WiFi is a packet-based computer networking technology for Wireless Local Area
Networks (WLANs). It defines signaling for the physical layer, and frame formats and protocols.
The protocol used by th