Difference between revisions of "XPicoWiFi/DeveloperGuide"
(14 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
The software splits the network applications from the applications that run on the serial port, so that they don't depend on each other. For example, the SNTP client can run regardless of what runs on the serial port, so that many different information consumers on the device (web server, serial port, etc) know what the internet time is. | The software splits the network applications from the applications that run on the serial port, so that they don't depend on each other. For example, the SNTP client can run regardless of what runs on the serial port, so that many different information consumers on the device (web server, serial port, etc) know what the internet time is. | ||
+ | |||
+ | == Configuration Manager == | ||
+ | |||
+ | === Overview === | ||
+ | The xPico Wi-Fi includes a fully-featured Configuration Manager which saves configuration to Flash. This means that once the device is configured, there is no init process needed each time it boots, as it loads configuration from flash each time. There are different ways to change configuration when needed: | ||
+ | |||
+ | === Accessing configuration === | ||
+ | ==== Web browser ==== | ||
+ | The xPico Wi-Fi has a built-in web server that by default serves the configuration manager GUI. The user can log in with their browser and change configuration. This can be accessed either from the SoftAP interface or the Infrastructure interface. | ||
+ | |||
+ | ==== Serial Port ==== | ||
+ | From the Command Line Interface (CLI), you can either send XML, or traverse the menus of the CLI. The menu structure and definition is starting on page 106 of the [http://www.lantronix.com/pdf/xPico-Wi-Fi_UG.pdf User Guide]. | ||
+ | |||
+ | There are different ways to enter the command line, depending on how the serial port is configured: | ||
+ | * From Modem Emulation: while in command mode, send ATD0\r to enter the CLI | ||
+ | * From Mux: while not sending/receiving data, send C\r to enter the CLI | ||
+ | |||
+ | Another option is to have a serial port always configured to be Command Line to provide out of band management of the module. | ||
+ | |||
+ | See the [[XPicoWiFi/CommandLineStatusExample|Command Line Status example]] to see how to use the CLI to access the XML Status Register (XSR) from the xPico Wi-Fi to get various system status. | ||
+ | |||
+ | ==== WebAPI ==== | ||
+ | From the network using WebAPI: With a simple HTTP request, you can change configuration by sending XML-formatted changes. See Chapter 5 of the [http://www.lantronix.com/pdf/xPico-Wi-Fi_UG.pdf User Guide]. | ||
+ | |||
+ | The WebAPI has HTTP functions to import or export configuration, as well as to export current status of the device. | ||
+ | |||
+ | === XML === | ||
+ | You can use XML to import or export configuration from the Configuration Manager, which makes it easy to replicate the configuration of one device to the next. See Chapter 3 of the [http://www.lantronix.com/pdf/xPico-Wi-Fi_UG.pdf User Guide] for more details on the XML format. | ||
== Connecting xPico Wi-Fi to a microcontroller == | == Connecting xPico Wi-Fi to a microcontroller == | ||
Line 18: | Line 46: | ||
==== Hardware ==== | ==== Hardware ==== | ||
Both UART interfaces (referred as Line 1 and Line 2) can have baud rates up to 921kbps, and only require the TX and RX pins connected to a microcontroller to work. In addition, Line 1 can also use RTS and CTS lines for hardware flow control. Both lines can use XON/XOFF software flow control. | Both UART interfaces (referred as Line 1 and Line 2) can have baud rates up to 921kbps, and only require the TX and RX pins connected to a microcontroller to work. In addition, Line 1 can also use RTS and CTS lines for hardware flow control. Both lines can use XON/XOFF software flow control. | ||
+ | |||
+ | ==== Configuration ==== | ||
+ | See the [[XPicoWiFi/SerialPortSetup|Serial Port configuration page]] for details on how the UART can be configured. | ||
=== SPI interface === | === SPI interface === | ||
Line 23: | Line 54: | ||
=== USB interface === | === USB interface === | ||
− | The USB interface is a full speed (12 mbps) Device interface. | + | The USB interface is a full speed (12 mbps) Device interface. Please contact your Lantronix Field Applications Engineer for Alpha firmware to enable this functionality. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Please | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | See the [[XPicoWiFi/Usb|USB Guide]]. | |
− | |||
− | + | == Manufacturing your product with xPico Wi-Fi == | |
+ | === Hardware Integration === | ||
− | + | If you will be using the surface mount version of the xPico Wi-Fi, please follow the instructions in the [http://www.lantronix.com/pdf/xPico-Wi-Fi-SMT_IG.pdf SMT Integration Guide]. Otherwise, if you will be using the connector version, please follow the instructions in the [http://www.lantronix.com/pdf/xPico_IG.pdf xPico Integration Guide] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | === Configuration === |
− | |||
− | + | Your product will probably have settings on the xPico Wi-Fi that are different from the factory defaults. At a minimum, you will want to change some configuration parameter. If using the built-in Web Server for custom web pages, you will also want to upload the HTML pages to the xPico Wi-Fi's filesystem. | |
− | + | There are multiple ways that this can be achieved. If you have an attached microcontroller, the MCU can configure the xPico Wi-Fi at run-time via the serial port. However, if you want to simplify your MCU's code to just handle data communication and not have to do the one-time configuration of the xPico Wi-Fi, you can configure it at manufacturing. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Please see the [[XPicoWiFi/ManufacturingConfiguration|Configuring in Manufacturing]] page for more details on how you can do that. |
Latest revision as of 12:36, 5 May 2015
Contents
Overview
The xPico Wi-Fi is a fully integrated Wi-Fi module with TCP/IP stack and Lantronix SmartSuite applications that make deployment of secure, reliable products much easier.
At the heart of the Lantronix SmartSuite is a fully-featured Configuration Manager which saves all module configuration to Flash. This means that once the module is configured, there is no initialization process that is needed to run externally as the module loads the configuration from flash each time it boots.
The software splits the network applications from the applications that run on the serial port, so that they don't depend on each other. For example, the SNTP client can run regardless of what runs on the serial port, so that many different information consumers on the device (web server, serial port, etc) know what the internet time is.
Configuration Manager
Overview
The xPico Wi-Fi includes a fully-featured Configuration Manager which saves configuration to Flash. This means that once the device is configured, there is no init process needed each time it boots, as it loads configuration from flash each time. There are different ways to change configuration when needed:
Accessing configuration
Web browser
The xPico Wi-Fi has a built-in web server that by default serves the configuration manager GUI. The user can log in with their browser and change configuration. This can be accessed either from the SoftAP interface or the Infrastructure interface.
Serial Port
From the Command Line Interface (CLI), you can either send XML, or traverse the menus of the CLI. The menu structure and definition is starting on page 106 of the User Guide.
There are different ways to enter the command line, depending on how the serial port is configured:
- From Modem Emulation: while in command mode, send ATD0\r to enter the CLI
- From Mux: while not sending/receiving data, send C\r to enter the CLI
Another option is to have a serial port always configured to be Command Line to provide out of band management of the module.
See the Command Line Status example to see how to use the CLI to access the XML Status Register (XSR) from the xPico Wi-Fi to get various system status.
WebAPI
From the network using WebAPI: With a simple HTTP request, you can change configuration by sending XML-formatted changes. See Chapter 5 of the User Guide.
The WebAPI has HTTP functions to import or export configuration, as well as to export current status of the device.
XML
You can use XML to import or export configuration from the Configuration Manager, which makes it easy to replicate the configuration of one device to the next. See Chapter 3 of the User Guide for more details on the XML format.
Connecting xPico Wi-Fi to a microcontroller
The xPico Wi-Fi has four serial interfaces that you can use to connect to your microcontroller:
- 2 UART interfaces
- 1 SPI Master interface
- 1 USB Device full speed interface
The UART interface is the simplest to implement, as it requires no driver or special protocol.
UART interfaces
Hardware
Both UART interfaces (referred as Line 1 and Line 2) can have baud rates up to 921kbps, and only require the TX and RX pins connected to a microcontroller to work. In addition, Line 1 can also use RTS and CTS lines for hardware flow control. Both lines can use XON/XOFF software flow control.
Configuration
See the Serial Port configuration page for details on how the UART can be configured.
SPI interface
The SPI interface is a Master interface, which can be controlled with the Lantronix SmartSuite Monitor application.
USB interface
The USB interface is a full speed (12 mbps) Device interface. Please contact your Lantronix Field Applications Engineer for Alpha firmware to enable this functionality.
See the USB Guide.
Manufacturing your product with xPico Wi-Fi
Hardware Integration
If you will be using the surface mount version of the xPico Wi-Fi, please follow the instructions in the SMT Integration Guide. Otherwise, if you will be using the connector version, please follow the instructions in the xPico Integration Guide
Configuration
Your product will probably have settings on the xPico Wi-Fi that are different from the factory defaults. At a minimum, you will want to change some configuration parameter. If using the built-in Web Server for custom web pages, you will also want to upload the HTML pages to the xPico Wi-Fi's filesystem.
There are multiple ways that this can be achieved. If you have an attached microcontroller, the MCU can configure the xPico Wi-Fi at run-time via the serial port. However, if you want to simplify your MCU's code to just handle data communication and not have to do the one-time configuration of the xPico Wi-Fi, you can configure it at manufacturing.
Please see the Configuring in Manufacturing page for more details on how you can do that.