RN-131G
rn-131-um.pdf 5/14/2009
www.rovingnetworks.com
Phone 408-395-6539
- 15 -
8.5
Uart Receiver, RTS/CTS Hardware Flow Control
The UART receive buffer is approx. 1024 bytes, and at lower baudrates (9600, 19200) the
system can process data into the device without need for flow control.
If constant streaming of data into RX on the device is required, care should be taken to set the
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 = 255 bytes.
The
comm size
is automatically set whenever the baudrate is set, but should be modified if
needed.
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 loss
and retries inherent in wireless networks, flow control is usually required to guarantee no data
is lost.
GPIO 12 and 13 implement UART hardware flow control if enabled.
By default flow control is disabled. To enable hardware flow contol, use
set uart flow 1.
8.6
Setting PIO directions, Disabling LED drivers
The table below shows the usage of the PIO pins and their default values:
Use the command: s
et sys mask <hex val>
to enable or disable certain pins as outputs.
For example,
set sys mask 0
will default all pins to INPUT.
PIO
State
DESCRIPTION
9
input
Used for factory reset
8
output
Spare GPIO
7
output
Spare GPIO, BLUE LED on WiFly Serial Adapter
6
output
RED LED- (Associated, internet OK/ TCP conn )
5
output
YELLOW LED – (wifi RX or RSSI )
4
output
GREEN LED - (system status /ASSOC-AUTH)
13
output
UART RTS – goes HIGH on POWERUP, LOW once system is READY.
If HW Flow control enabled, toggles HIGH to indicate RX buffer full.
12
input
UART CTS – throttles transmitter if HW flow control enabled.
LOW enables transmitter, HIGH will disable.
1
input
UART RX
0
output
UART TX