The 1.5 firmware release for the xPico Wi-Fi includes several new features, especially around the area of how to use the USB port that is native to the xPico Wi-Fi. In addition, since Lantronix has now created more network services and applications than what can fit in the flash of the xPico Wi-Fi, we have created a Windows application called "Packager" that lets you choose which modules to build into a firmware image, without having to install the full SDK to create your own firmware.
When you double click on the xPicoWifi_188.8.131.52R9_Package.exe, you will open a self-contained graphical application to build a custom firmware image.
For example, this picture shows building an image with AES encryption, the Discovery protocol, NTP, Tunnel, User_Data, the Mux, and Usb_Acm. Note that everything there but the Usb_Acm come in the standard image. That's because the standard image has Bridge and Usb_Rndis by default, which means the USB port is a network protocol.
With the image built per this picture, the USB port of the xPico Wi-Fi will appear as a third serial port.
New USB features
USB to SoftAP
With 1.4 firmware, we introduced the ability to use the xPico Wi-Fi as a network adapter over USB using RNDIS. See the USB to Wi-Fi guide. This allows you to bridge from a USB host with a network stack to the infrastructure network that the xPico Wi-Fi is connected to via the client interface. The SoftAP interface of the xPico Wi-Fi still remains for another device to connect locally and configure the xPico Wi-Fi.
With 1.5 firmware, the functionality is expanded to let you choose to bridge to either the client interface (wlan0) or the SoftAP interface (ap0). See this screenshot that shows how to configure the Bridge to use either interface (or disable it).
Another option that is new to 1.5 is to use the USB port on the xPico Wi-Fi as an additional serial port. This requires that you create a firmware image that includes the Usb_Acm module using either the SDK or the Packager.
When you build this module to the firmware, it will add a third Line, called Line CDC_ACM to the xPico Wi-Fi. Connecting the xPico Wi-Fi's USB port to a USB Host will enumerate as a USB CDC ACM which emulates a serial port. For example, in Windows, it will add a COM port with the built in driver. Most Linux distributions will also include drivers to be able to use it.
As you can see from the picture on the left, you can configure the Line CDC_ACM to use any of the protocols that you can use with one of the UART lines.
Filesystem to serial
Requires firmware 184.108.40.206A15 or later!
This feature creates a filesystem node for the serial ports available on the device. For example on standard firmware, that means there's nodes at:
If you built in CDC_ACM support into the firmware, then you would also have:
So how is this useful? Set the Protocol for the Line to None, and then you can use any of the existing methods for reading/writing to the filesystem to instead read/write to the serial ports.
For example, if in Command Line Interface, you can write to another serial port like this:
- file system
- upload /dev/line_1
Then send whatever data you want to output to Line 1.
Or read from line 1:
- file system
- cat /dev/line_1
Using WebDAV to serial
The xPico Wi-Fi supports WebDAV commands via the Filesystem WebAPI. That means that you can write files to the filesystem by doing an HTTP PUT to /fs/ and then the subdirectory.
So if you want to send a file to the serial port from the network:
curl -u admin:PASSWORD -T example.txt http://192.168.0.1/fs/dev/line_1
Or maybe you want to upload a file very fast from a custom webpage:
User level access controls
Requires firmware 220.127.116.11A23 or later!
This feature allows you to have different access rights for different areas of the web server. For example, you might have an administrator who can change configuration, while you have a user that can view other files.
There are 4 levels of privileges for web pages: Admin, Tech, User, or None.
Setting privilege levels
You can configure a URI to a specific privilege level in the HTTP Server tab, under Security options. Here you can add multiple URIs, each with a different Authorization Type:
- Digest to use the MD5 hashed authentication with a session nonce
- Basic to use the Base64 encoded password
- None to require no authentication
A common use case is to have the configuration web pages secured with the Admin role (which is the default for any URI not specified, including /) and your custom pages not secured. In that case, you would select None for your pages.
Here you can also configure which User Level has access to your URI: Admin, Tech, User, or None. In the case of None, no user has access to that URI.
By default, the xPico Wi-Fi only has one user: the username is admin, and the privileges are Admin. This user has access to all the pages on the web server unless you have changed the privileges.
In the User configuration group, you can add other users with different privileges. Once you add a user, click on the name to change the password and the Privilege of that user.