Difference between revisions of "XPicoWiFi/Monitor"

From Lantronix Wiki!
Jump to navigation Jump to search
Line 36: Line 36:
  
 
The data is shown highlighted by row sent by the scale. Each row ends in a [0x0d] which is the newline character. Note that the xPico Wi-Fi represents non-printable characters by their hex value, and inside brackets.
 
The data is shown highlighted by row sent by the scale. Each row ends in a [0x0d] which is the newline character. Note that the xPico Wi-Fi represents non-printable characters by their hex value, and inside brackets.
 +
 +
If our scale needed initialization data to be sent, here's where we would enter. But it's a babbler, so nothing is needed to get it to talk. Click Next> to move to the next page.
 +
<br clear=all>
 +
[[File:xpwMonitorSetupExplorer.jpg|300px|left]]

Revision as of 21:06, 9 March 2015

Overview

The Monitor feature can be used to query and capture desired information during an xPico Wi-Fi serial port to serial device connection. Through the Monitor feature in Web Manager, you may configure the monitoring of a connected serial device through a sequence of five pages via Explorer, or go to a specific Configuration page to make specific changes. The device monitoring status can be viewed through the Status page.

The documentation for Monitor can be found in the User Guide on Chapter 16. There is an extensive example there on how to communicate with a device that has a command line.

Example: The babbling device

A babbling device is one that sends data periodically over the serial port, regardless of whether another device is attached or not. Usually it is delimited by a newline or a carriage return to indicate new data. This kind of device is stateless, and usually we only care about the last value, rather than all the values in between.

An example is a scale like the Homedics 349klx or certain pulse oximeter devices.

Setting up Monitor

Serial Port setup

XpwMonitorLine1.jpg

On the configuration for Line 1, set the Baud Rate to 2400 baud and the Protocol to Monitor. Don't forget to click the Submit button to save the configuration!

Monitor

XpwMonitorStartExplorer.jpg

To setup how Monitor will parse the data from the scale, we will use Explorer which makes it very easy to configure Monitor correctly.

Click on Monitor, then Explorer. With the scale on so that it is sending data, click Refresh to the see the data that is being sent by the scale.

The data shows up in the data display, which shows as:

[0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d] [0x02][0x80][0xd7][0xe4]000.0[0x0d]

The data is shown highlighted by row sent by the scale. Each row ends in a [0x0d] which is the newline character. Note that the xPico Wi-Fi represents non-printable characters by their hex value, and inside brackets.

If our scale needed initialization data to be sent, here's where we would enter. But it's a babbler, so nothing is needed to get it to talk. Click Next> to move to the next page.

XpwMonitorSetupExplorer.jpg