11: Monitor
xPico® Wi-Fi® Embedded Device Server User Guide
60
Example: Data Capture on a Serial Device
Connect the xPico Wi-Fi serial port to a serial device, then query and capture desired information
periodically, presenting this information on a Web page.
Sample Configuration
Connect to the Command Line Interface (CLI) on the EDS2100. The CLI has menu levels, so
we will send commands to exit through multiple levels, knowing that an exit at the top level will
just return us to the top level. Then we can enter the "enable" command level.
Use a null modem cable to connect xPico Wi-Fi unit Line 1 to a Lantronix EDS2100 Line 1.
Set both devices to 115200 bits per second, no parity, 8 data bits, 1 stop bit, hardware flow
control.
Set the first three message Commands to send "exit[0x0d]", the fourth "enable[0x0d]"
Initialization
Upon xPico Wi-Fi power-up, the state of the external serial device is not known. Monitor will send
one or more messages to bring the serial device into a known state.
STEP 1 - STRATEGY
Explore your serial device and determine your
strategy for bringing it to the desired starting state.
STEP 2 - CONNECTION
Connect your serial device to your xPico Wi-Fi unit.
STEP 3 - LINE SETTINGS
Set serial line speed, flow control, and character
options on both devices so they are compatible. On
xPico Wi-Fi unit, select "Monitor" under Line Protocol.
STEP 4 - MONITOR INITIALIZATION
Use Monitor Explorer or directly configure settings in
Monitor Initialization Configuration. In
Figure 11-7
Monitor Initialization
the example configuration is typed
into the Monitor Explorer web page.
Note:
Non-printable characters are placed in the
Command within square brackets. The "Enter" key on
your PC is an ASCII Carriage Return, code 0x0d.
Note:
After each message Command is sent, the Monitor may wait for a response. You
may set the Timeout for each message. If the Timeout is too short, your device may
become out of sync with Monitor. So make your timeout comfortably high, and then if
applicable define an End Character or Length so it will move on without waiting further.
Figure 11-7 Monitor Initialization