Download Print this page

ATC -2000WF Quick Start Manual page 11

Wi-fi to rs-232/422/485

Advertisement

comm parameters to optimize the performance. If data
has a termination char, this can be used.
Also, if data has a particular frame size, this can be
used.
set comm match <value>
sets the value of the packet terminator.
set comm size <value>
sets the number of bytes to receive before forwarding
0-1 forwards immediately. maximum value = 1460
bytes.
The comm size is automatically set whenever the
baudrate is set, but can be modified.
Even at higher baudrates (115K and higher ) it is
possible to operate without flow control if packets
are uniform and a protocol is used to ensure that data
is delivered on the remote side before the
next packet is sent.
However, given the uncertainty of packet delays in a
TCP/IP network and the affects of interference
and retries inherent in wireless networks, flow control is
usually required to guarantee no data is
lost.
By default flow control is disabled. To enable hardware
flow control, use set uart flow 1.
8.3 Using the Real Time Clock Function
The real time clock in the module keeps track of the
number of seconds since the module was powered on
and the actual time when synchronized with the sNTP
time server. By default the module keeps track of up
time but does not synchronize with the time server
since this requires being associated with a network that
can access the sNTP server.
The default sNTP server is at
ADDR=129.6.15.28:123
ZONE=7 (GMT -7)
Use the show time command to see the current time
and uptime
<2.10> show t
Time=08:43:10
UpTime=10 s
Time can be set by using the time command
<2.10> show t
Time NOT SET
UpTime=8 s
<2.10> time
<2.10> show t
Time=08:51:31
UpTime=15 s
NOTE: the WiFly module must by successfully
associated with a network for the module to contact
the sNTP server.
Alternatively, the module can be configured to get the
time whenever it powers up by setting the time enable
to 1. Any value greater than 1 gets time continuously
every <value> minutes.
To configure the Wifly module to get time upon power
up
<2.10> set time enable 1
AOK
<2.10> get time
ENA=1
ADDR=129.6.15.28:123
ZONE=7
To view a complete listing of the time variable use the
command
<2.10> show t t
Time=09:02:10
UpTime=653 s
Powerup=1792 s
RTC=7753271426558 ms
timera=66885
8.4 Using the UDP Broadcast function
The WiFly module can be setup to automatically
generate UDP broadcast packets. This is useful for a
number of reasons:- Some Access Points will
disconnect devices that sit idle and don't send any
packets after a time. Using the UDP broadcast informs
the AP that WiFly is alive and wants to stay
associated. This feature can be used by application
programs to auto-discover and auto configure the
WiFly module. If an application is listening for the UDP
broadcast, a number of useful parameters are present
in the package that can be used for auto-discovery. For
example, the IP address and port number of the WiFly
are both part of the packet, and thus the Wifly
can be connected to and configured remotely with this
information.
- The MAC address of the associated AP, channel, and
RSSI value are available in this packet,
thus enabling a simple location and tracking based
function.
By default the Wifly module now sends out a UDP
broadcast to 255.255.255.255 on port 55555 at a
programmable interval. The broadcast address, port
and interval are set using the "set broadcast"
commands.

Advertisement

loading
Need help?

Need help?

Do you have a question about the ATC-2000WF and is the answer not in the manual?