XPicoWiFi/SerialPortSetup

From Lantronix Wiki!
Revision as of 15:22, 18 May 2015 by Ltrxmg42 (talk | contribs) (→‎Serial port communication/protocol)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Serial port communication/protocol

As part of the Lantronix SmartSuite of serial port applications, the xPico Wi-Fi offers multiple applications that can run on the serial ports.

  • Tunnel
  • Modem Emulation (AT Commands)
  • Monitor (scripting engine)
  • Mux (serial API)
  • Command Line Interface
  • Web to Serial (WebAPI direct to device)

You can choose a combination of these applications to run on each Line. Which application runs will depend on your microcontroller and the application.

Please see the xPico Wi-Fi User Guide for details on how all of these applications work. The sections below will give you an overview of each application and how they could be used in your application.

Tunnel

Configure all the connection details before deploying your device.

TunnelBlock.jpg

  • Setup the server to send data to or listen for incoming connections
  • Data is transparently tunneled to/from the serial port to the TCP port at the other end
  • Configurable for:
    • Start/End characters
    • Automatically reconnect
    • Timeout disconnect
    • Packing/flushing
  • xPico Wi-Fi manages all networking


Modem Emulation (AT Commands)

Control the network connection at run-time.

ATBlock.png

  • Easy to use, familiar AT commands
  • Device controls where the connection is made
  • xPico Wi-Fi manages all networking
  • Can also listen for connections with ATA command


Monitor

Connect directly to sensors, display on local web server

Monitorblock.png

  • xPico Wi-Fi will query sensors
    • Periodically (poll)
    • On request by Web Browser (control)
  • Programmable filtering and parsing of returned data
  • Filtered data stored in on-module RAM
  • Can access data via Javascript/AJAX from browser

See the Monitor development page for more details and examples on how to use Monitor.

Mux

Manage multiple connections from one serial port

MuxBlock.png

  • xPico Wi-Fi still manages all networking, including web server, TCP sockets, etc.
  • Microcontroller can switch, with a simple API:
    • Sending/receiving data to server
    • Listening on a TCP port
    • Get data to/from the webserver at a specific URL
  • Up to 4 concurrent connections
  • Data is streamed directly to/from network connection to serial port, no limits because of RAM space

See the Mux development page for more details and examples on how to use the Mux application.

Web to Serial

Send data directly from a webpage to the serial port.

WebAPItoDevice.png

  • Use AJAX to create rich, dynamic web pages that can directly access the serial ports or the CPs of the xPico Wi-Fi
  • Use the Lantronix Javascript library to simplify your development
  • No development needed for xPico Wi-Fi or the attached device, just write HTML and Javascript

See the WebAPI to device page for more details and examples.