Application Note
How to use IOBOX-WLAN with aFOX3-3G/4G series device

Part Number APP-0013
Revision A October 2019

Intellectual Property© 2019 Lantronix, Inc. All rights reserved. No part of the contents of this publication may
be transmitted or reproduced in any form or by any means without the written permission of
Lantronix.
Lantronix is a registered trademark of Lantronix, Inc. in the United States and othercountries.
Patented: www.lantronix.com/legal/patents/; additional patents pending.
All trademarks and trade names are the property of their respective holders.

Contacts
Lantronix, Inc.
7535 Irvine Center Drive, Suite 100
Irvine, CA 92618, USA
Toll Free: 800-526-8766
Phone:
949-453-3990
Fax:
949-453-3995
Technical Support
Online: www.lantronix.com/support
Sales Offices
For a current list of our domestic and international sales offices, go to the Lantronix website at www.lantronix.com/about/contact

Disclaimer
All information contained herein is provided “AS IS.” Lantronix undertakes no obligation to
update the information in this publication. Lantronix does not make, and specificallydisclaims, all warranties of any kind (express, implied or otherwise) regarding title, noninfringement, fitness, quality, accuracy, completeness, usefulness, suitability or
performance of the information provided herein. Lantronix shall have no liability whatsoever
to any user for any damages, losses and causes of action (whether in contract or in tort orotherwise) in connection with the user’s access or usage of any of the information orcontent contained herein. The information and specifications contained in this document
are subject to change without notice.

How to use IOBOX-WLAN with a FOX3-3G/4G series device

2Revision History
Date

Rev.

Comments

March 2017

1.0.0

Initial version

August 2017

1.0.1

Added event SYS.WLAN.eConnecting. Document throughout
updated.

October 2019

A

Initial Lantronix document. Added Lantronix document part number,logo, contact information, and links.

For the latest revision of this product document, please check our online documentation atwww.lantronix.com/support/documentation.

How to use IOBOX-WLAN with a FOX3-3G/4G series device

3Table of Contents

1. Introduction ....................................................................................... 5
1.1
1.2
1.3

What is a Wireless Local Area Network (WLAN)? .................................................... 5
General about IOBOX-WLAN .................................................................................... 5
Hardware Requirements .......................................................................................... 5

2. Sending data over WLAN .................................................................... 6
2.1
2.2
2.3
2.4

Device configuration ................................................................................................ 6
WLAN configuration settings in AVL firmware 3.0.0 ................................................ 7
WLAN PFAL commands in AVL firmware 3.0.0 ........................................................ 8
WLAN events & states in AVL firmware 3.0.0 .......................................................... 8

3. Documentation .................................................................................. 9
3.1

Additional documentation & software tools ........................................................... 9

How to use IOBOX-WLAN with a FOX3-3G/4G series device41. INTRODUCTION
This guide provides a quick overview on how to configure your FOX3-3G/4G series devices in combination
with the accessory box IOBOX-WLAN, connect the IOBOX-WLAN to your AP (access point) and send dataover WLAN to your platform server.

1.1 What is a Wireless Local Area Network (WLAN)?
A wireless local area network (WLAN) is a wireless distribution method for two or more devices that use
high-frequency radio waves and often include an access point to the Internet. A WLAN allows users tomove around the coverage area, often a home or small office, while maintaining a network connection.
There are two categories of WLAN: access points (APs) and clients. APs transmit and receive radio
frequency signals with devices able to receive transmitted signals; they normally function as routers. Clients
may include a variety of devices such as desktop computers, workstations, laptop computers, IP phones
and other cell phones and Smartphones. The IOBOX-WLAN is a WLAN client device.

1.2 General about IOBOX-WLAN
IOBOX-WLAN is a WLAN high-quality accessory with a 2.4GHz ISM band for the FOX3-3G/4G Series thatconnects to a WLAN access point after applying relevant WLAN settings into the FOX3-3G/4G Series anddelivers the real-time data from the FOX3-3G/4G Series device via WLAN to your remote server. The
IOBOX-WLAN works independently from the cellular network on the FOX3-3G/4G Series. The AVL firmware
offers, by means of the PFAL commands, the possibility to configure the WLAN as the primarycommunication interface and cellular as an automated fallback if there is no WLAN connection available.
In addition to the WLAN functionality, the IOBOX-WLAN offers the same functions of the IOBOX-CAN suchas several programmable inputs and outputs for almost every application within the automobile industry, asecond CAN interface and a D8 interface for reading the live data from a digital tachograph (VDO andStoneridge). For more details about the CAN-Bus and D8, refer to the chapter 3.1. The IOBOX-WLAN device
contains a 16pin I/O connector, a FAKRA connector for connection to an external WLAN antenna (FAL-ANT15) and a mini-USB connector used for direct connection to the FOX3-3G/4G Series. For more details about
IOs and connection to FOX3-3G/4G refer to the chapter 3.1 “FOX3_3G_4G_HardwareManual.pdf”

1.3 Hardware Requirements
•
•
•
•
•
•

WLAN access point (e.g. WLAN router at your home or facility)
IOBOX-WLAN device
FAL-ANT-15 – WLAN external antennaFOX3-3G/4G series with firmware 3.0.0 or higher
CA68 - Installation and power supply cable for FOX3 series device
CA38 - Connection cable for using I/Os of IOBOX-WLAN (if required)Fig. 1: Requirements for using IOBOX-WLAN with FOX3-3G/-4G

How to use IOBOX-WLAN with a FOX3-3G/4G series device52. SENDING DATA OVER WLAN
2.1 Device configuration
To send data over WLAN to your remote server with IOBOX-WLAN and FOX3-3G/4G devices, you have tofirst configure your FOX3-3G/4G device by sending/storing the following PFAL script into the FOX3-3G/4G
device using the Workbench software.
The Workbench software can be downloaded from the Lantronix website (see chapter 3.1). After you haveinstalled it on your PC, load the PFAL script below into your FOX3-3G/4G device and restart it. Moreinformation on how to download the Workbench software, install it and load the PFAL script can be foundin the hardware manual of the device you are using (see chapter 3.1).
To be able to setup the WLAN parameters in the FOX3 device while no IOBOX-WLAN is connected, you have to use
the $PFAL,CNF.Write instead of $PFAL,CNF.Set. You can setup up to 5 WLAN networks, however it is notmandatory. If you only have one WLAN network, use index 0. To use WLAN connectivity, set your settings and loadthem into FOX3-3G/4G.
$PFAL,CNF.Write,WLAN.NET0.IP=<remote server ip in format xxx.xxx.xxx.xxx >$PFAL,CNF.Write,WLAN.NET0.PORT=<server port in format yyyy>$PFAL,CNF.Write,WLAN.NET0.PSK=<Password>$PFAL,CNF.Write,WLAN.NET0.SECURITY=<WLAN security WPA|WPA2|WPA2mixed|WEP|NONE>$PFAL,CNF.Write,WLAN.NET0.SSID=<NameOfNetwork>$PFAL,CNF.Write,WLAN.RSSIMIN=20$PFAL,CNF.Set,DEVICE.WLAN.STARTUP=on,60000,60000

To use GPRS/TCP connectivity as fallback communication, set your settings and load them into FOX3-3G/4G$PFAL,CNF.Set,TCP.CLIENT.CONNECT=1,<remote server ip in format xxx.xxx.xxx.xxx>,<server port in format yyyy>$PFAL,CNF.Set,PPP.PASSWORD=<enter PPP password>$PFAL,CNF.Set,PPP.USERNAME=<enter PPP username>$PFAL,CNF.Set,GPRS.APN=<enter your operator's APN>$PFAL,CNF.Set,GPRS.AUTOSTART=0

To switch between WLAN and mobile network and send data to your remote server, load the alarms below into
FOX3-3G/4G and restart your device with $PFAL,Sys.Device.Reset.
If you use the alarms below, your FOX3-3G/4G behaves after restart as follows:
It will use first GPRS connection and disconnect automatically from GPRS services once there is WLAN network
available. If the device is out of WLAN coverage, it will use automatically GPRS connection. The data is then send if
you turn ON (+12V) and OFF (GND) the ignition line (PIN 3 on the main port).
$PFAL,CNF.Set,AL0=Sys.Device.eStart:GSM.GPRS.Connect$PFAL,CNF.Set,AL1=SYS.WLAN.TCP.eConnected:GSM.GPRS.Disconnect&Sys.Trigger0=high$PFAL,CNF.Set,AL2=IO.e8=edges&Sys.Trigger.s0=high:WLAN.Send,8,"Data over WLAN, IGN=&(IO8)"$PFAL,CNF.Set,AL3=SYS.WLAN.TCP.eDisconnected?SYS.WLAN.eDisconnected:Sys.Trigger0=low&GSM.GPRS.Connect$PFAL,CNF.Set,AL4= IO.e8=edges&TCP.Client.sConnected:TCP.Client.Send,8,"Data over TCP, IGN=&(IO8)"

How to use IOBOX-WLAN with a FOX3-3G/4G series device

62.2 WLAN configuration settings in AVL firmware 3.0.0
The following configuration parameters are implemented for the IOBOX-WLAN. For saving the WLAN
configuration settings, use the command below and write directly after the comma “,” without spaces theconfiguration parameter you want to set:
Command

Description$PFAL,CNF.Write,

Set the configuration setting with this command, if the IOBOX-WLAN is connected or not to theFOX3-3G/4G. E.g: $PFAL,CNF.Write,WLAN.CLIENT.LOGIN=1$PFAL,CNF.Set,

Set the configuration setting with this command, if the OBOX-WLAN is already connected to theFOX3-3G/4G only. E.g: $PFAL,CNF.Set,WLAN.CLIENT.LOGIN=1

The table below shows the configuration parameters implemented for the IOBOX-WLAN.
Configuration Settings

Description

DEVICE.WLAN.STARTUP= <state>,<auto_reconnect>,<tcp_timeout>

If set to on, the module is running and ready toscan for networks. If set to off, the module will
shut down after initialization.
<state> = On, Off<auto_reconnect> = off=0| on in ms [≥ 60000)<tcp_timeout> in ms [≥ 60000)

The following parameters are used to initialize a "known networks list". All of the five parameters must be set for a specificindex. If one of the parameters is missing, the configuration for this network will be initialized as invalid. If an entry is changed atruntime the internal list is updated. If all entries for one network get valid, the network will be used at a network scan. Max. 5
networks can be configured (ids range from 0 to 4).
WLAN.CLIENT.LOGIN=<mode>

Enables/disables sending of ServerLogin if theconnection to the TCP server is established.
<mode> can be set to:
0 = Disables login
1 = Enables login

WLAN.NET<id>.SSID=<ssid>

Sets the <SSID> of the access points to which the
IOBOX-WLAN can be connected (max. 32
characters)

WLAN.NET<id>.PSK=<psk>

Sets the password of the Hotspot to connect(max. 63 characters)

WLAN.NET<id>.SECURITY=<WPA|WPA2|WPA2mixed|WEP|NONE>

Sets the encryption method of data transmission
between IOBOX-WLAN and Hotspot.

WLAN.NET<id>.IP=<ip>

Sets the IP address (in dotted-four-byte format)of the remote server to connect to afterconnecting to the WLAN network.

WLAN.NET<id>.PORT=<port>

Sets the TCP port of the remote server toconnect to after connecting to the WLAN
network.

WLAN.RSSIMIN=<level>

Scans for networks with RSSI (Received Signal
Strength Indicator) levels greater than the user
defined value <level>.

How to use IOBOX-WLAN with a FOX3-3G/4G series device

72.3 WLAN PFAL commands in AVL firmware 3.0.0
The table below shows the PFAL commands implemented for the IOBOX-WLAN.
Commands

Description

SYS.WLAN.Enable

Enables and boot WLAN module

SYS.WLAN.Disable

Disables and shutdown WLAN module

WLAN.Send,<protocol>,<text>

Sends data over WLAN to the connected server. If WLAN interface is disabled or it is
not connected to the network this command returns an error.

WLAN.Scan

Starts a scan for WLAN networks.
After the scan is finished, the WLAN module will be configured for the first networkthat matches a network in the "known networks list". After successful configuration
for a network, the module will try to connect automatically.
If the connection cannot be established (authentication failed or network is lost whileconnecting), the software will enter unconnected state and a new scan can be started.
This command returns an error if WLAN is disabled, already connected or the module
is not ready

Wlan.Client.Disconnect

Disconnects IOBOX-WLAN from remote server. The IOBOX-WLAN starts immediately
an auto reconnect.

Wlan.Disconnect

Disconnects IOBOX-WLAN from WLAN network; The IOBOX-WLAN starts to reconnect
after auto_reconnect timer runs out and if auto_reconnect >= 60000.

2.4 WLAN events & states in AVL firmware 3.0.0
The table below shows the events and states implemented for the IOBOX-WLAN.
WLAN Events/States

Description

SYS.WLAN.eConnecting

Occurs when the device starts a connection to an access point. This is done after theend of scan and a scanned SSID was found in WLAN configuration.

SYS.WLAN.eConnected[=<ssid>]

Occurs when a connection to an access point is established.
The SSID of the connected network is given as a parameter, but is optional in an
alarm configuration. If no SSID is given in an alarm configuration, the event will
trigger for all networks.

SYS.WLAN.eDisconnected

Occurs when a connection to an access point is lost. In the current implementation,
the module will not try to reconnect. To reconnect, the "WLAN.Scan" commandmust be executed.

SYS.WLAN.sConnected[=<ssid>]

It works the same as WLAN.eConnected, but it generates this state every second.

SYS.WLAN.TCP.eConnected

Occurs when the socket connection is established.

SYS.WLAN.TCP.eDisconnected

Occurs when the socket connection is closed.

SYS.WLAN.TCP.sConnected

The same as WLAN.TCP.eConnected, but it generates this state every second until
the TCP connection over WLAN is closed.

SYS.WLAN.eReceived[=<" text ">]The <text> parameter is optional. If not specified, this event occurs wheneversomething terminated with CRLF over WLAN is received.

How to use IOBOX-WLAN with a FOX3-3G/4G series device83. DOCUMENTATION
3.1 Additional documentation & software tools
If this application note does not cover all the information you need to setup, refer to the additional
documents listed below, which can be found on the Product Index or Application Notes pages.
Filename

Description

AVL_PFAL_Configuration_Command_Set.pdf

Lists and describes all PFAL commands supported by the AVL devices.

FOX3_3G_4G_HardwareManual.pdf

Contains instructions for safety and operation of the FOX3/-3G device.

AppNotes_AVL_Installation_Guide.pdf

Provides all the necessary information about installing the Lantronix
products properly and safely.

AppNote_IOBOX-CAN_D8_Interface_HowTo.pdf

Provides information on how to configure your FOX3 series devices incombination with the accessory box IOBOX-CAN/WLAN, connect the
IOBOX-CAN/WLAN to D8 connector of the digital tachograph, read realtime data from this interface and transfer them to your platform
server.

AppNotesForCANBusApplication.pdf

Provides information how to connect your device with CAN interface
directly to a CAN bus and read the data.

AppNote_CAN_FMS_CAN_OBDII_Howto.pdf

Describes how to get CAN-Bus information from a vehicle using
Lantronix AVL devices with CAN-Bus.

Workbench Software

Description

Lantronix Workbench

Lantronix Workbench configuration tool (Windows XP, Windows Vista,
Windows 7)

How to use IOBOX-WLAN with a FOX3-3G/4G series device

9