manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets

The EtherSmart Wildcard User Guide

Table of Contents


Internet Protocol Support

Summary of EtherSmart Capabilities


Connecting To the Wildcard Bus

Selecting the Wildcard Address

Terminology Overview

Browser Notes

The EtherSmart Software Driver Routines

EtherSmart Driver Data Structures

The Demo Program

EtherSmart Initialization, Configuration and Diagnostics

Initialization Functions

Configuring the XPort Device

Assigning an IP Address

Reporting Routines

Using "Ping" for Diagnostics

Initializing Multiple EtherSmart Wildcards

Code Downloads and Interactive Communications via Ethernet

Serial Tunneling

A Serial Tunneling Example

Serial Tunneling Buffer Management Functions

Serial Tunneling Data Transmission and Reception Functions

Serial Tunneling Connection Functions

Serial Tunneling Inter-Task Service Management Functions

Sending Email

Introduction to the Dynamic Webserver

Using the Dynamic Webserver

HTTP Buffer Management

HTTP Header Generation

HTTP Data Transfer Functions

Web Form Processing

An Example of a Dynamic Web Page with a Remote Image Reference

Serving Out a Stand-Alone Image

Implementing a "Remote Front Panel" Using the Webserver

Appendix A: Installing the Software

Generating the EtherSmart Kernel Extension Library

Creating Web Page and Image Resources with the Image Converter

Loading the Software onto the Controller

Using the EtherSmart Driver with C

Using the Driver Code with Forth

Appendix B: C Demo Program

Appendix C: C Remote Front Panel Demo Program

Appendix D: Forth Demo Program

Appendix E: Forth Remote Front Panel Demo Program

Appendix F: Browser Configuration

Using Opera Is Highly Recommended

Reconfiguring the Internet Explorer Browser

Firefox and Mozilla

Appendix G: Hardware Schematic (pdf)

<< Previous | Next>>

Browser Notes

You’ll use a web browser running on your PC to interact with the web server running on the EtherSmart Wildcard.  Popular browsers include Microsoft Internet Explorer, Netscape based browsers such as Firefox and Mozilla, and other high quality free browsers such as Opera.  All of these browsers work with the web demonstration program that comes with the EtherSmart Wildcard (see the demonstration program source code listings at the end of this document).

Additional considerations can limit the performance of some of these browsers if your application needs to serve out more complex web pages that require more than one TCP/IP connection per web page.  This can occur, for example, when mixed text and image data originating from the XPort are served out in a single web page.

The Lantronix XPort hardware on the EtherSmart Wildcard supports only one active connection at a time.  However, the HTTP/1.1 standard (and consequently all browsers in their default configuration) expect the webserver to be able to host two simultaneous connections.  A default-configured browser will try to open a second connection when two or more content types (for example, HTML text and a JPEG image) are present in a single web page.  The second connection will typically be refused by the XPort hardware, causing an incomplete page load.  The solution is to configure the browser to expect only one connection from the webserver. 

Appendix F explains how to reconfigure Internet Explorer to work with any web page that the EtherSmart can serve out.  For the best solution, though, consider downloading the free Opera browser and using it for all your interactions with the EtherSmart Wildcard.

Using Opera Is Highly Recommended

To be able to browse mixed text and graphics pages from the EtherSmart Wildcard without modifying your default browser, go to and download the latest version of the Opera browser for Windows desktop machines.  It's free, the download file is compact, and the install takes only a few seconds.

Simply go to and select "Download Opera", then double-click on the resulting file to install the browser on your desktop.  It is very easy to configure Opera for the EtherSmart webserver. Once Opera is installed, simply go to its Tools menu, and select:

Preferences->Advanced->Network->Max Connections Per Server

and enter 1 in the box.  Now you’re ready to use Opera with the EtherSmart Wildcard dynamic webserver. The webserver is described in more detail in a later section.

Using the Free Putty Ethernet Terminal for Testing and Development

During program development and testing of the EtherSmart Wildcard, it is very useful to be able to interact with the Wildcard using an Ethernet terminal program.  A popular option is the "Putty" program, a simple and small freeware program that can be downloaded from the web.

To obtain the free Putty Ethernet terminal program, type


into your search engine (such as Google) and download the executable program from one of the listed sites.  It is a simple yet generally useful program.

When you double-click on the Putty desktop icon, a configuration screen appears with a box for the "Host Name or IP address" and another box for the port number.  For example, if your EtherSmart Wildcard has an IP address of and uses the standard local port value of 80, simply type these values into the appropriate boxes. 

A set of radio buttons on the Putty configuration screen allows you to select one of four protocols: "Raw", "Telnet", "Rlogin", and "SSH".  The "Raw" mode is a straightforward implementation of a TCP/IP connection, and is recommended for the Tunnel_Test function in the demo program as described in the section below titled "Serial Tunneling". This test shows how to programmatically control transmission and reception of data over an Ethernet link.

"Telnet" is very similar to raw mode, but sends a line of configuration bytes at the start of the session that passes through the XPort device to the controller.  For this reason, the Raw mode is superior to Telnet for use with the EtherSmart Wildcard.  The Telnet configuration bytes have the most significant bit set, and can be filtered out by an application program by passing the appropriate flags to routines such as Ether_Add_Chars, Ether_Add_Line, Ether_Get_Chars, Ether_Get_Line, or by using Ether_ASCII_Key or E_ASCII_Key. These functions are discussed in the "Serial Tunneling" section below.

The revectored serial via Ethernet test is best conducted using Putty’s "Rlogin" mode.  The Rlogin protocol mimics the echo and carriage return handling of the standard QEDTerm serial terminal, and so is perfect for performing code downloads and interactive testing with Ethernet replacing the serial port. This capability is described in the "Code Downloads and Interactive Communications via Ethernet" section below.

<< Previous | Next>>

Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation