Roving Networks Wifly RN-111B User Guide Version 1.23
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 16 -
pullup to 1.2VDC may need be used if the circuit has an impedance (due to leakage current)
of less than 5Mohms ( 500mv / 100nA ). SENS1-4 pins that are not used should be left
unconnected.
5.2. Wake on UART
When the module is in Sleep mode, the UART itself is disabled. However, wake on UART
can be accomplished by connecting the SENS1 pin to the RX data pin.
To enable or disable this function, use: set sys trig 1.
It should be noted that the first byte sent into the module will likely be lost, so the designer
should take care to send a preamble byte to wake up the module before sending valid data
bytes.
5.3. 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 2 and 3 implement UART hardware flow control if enabled.
By default flow control is disabled. To enable hardware flow contol, use
set uart flow 1.
5.4. 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.
Roving Networks Wifly RN-111B User Guide Version 1.23
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 17 -
For example, set sys mask 0 will default all pins to INPUT.
Note that PIO 7, and 8 are used internally by the module and cannot be changed.
Setting or clearing bits in these locations will be ignored.
5.5. Alternate IO functions
There are a number of alternate IO functions that can be enabled. These functions override
the default IO function given in section 4.4, and described in the LED table of section 2.3.
If no bits are set for a particular PIO pin, that pin is available to be used as general purpose
input or output, based on the IOMASK setting.
set sys iofunc <value> sets numerous alternate functions. Bit-mapped value.
Bit Function
0 PIO4 - Output. HIGH once associated/authenticated and have IP address.
1 PIO5 - Input. Set HIGH to trigger TCP connection, LOW to disconnect.
2 PIO6 - Output. HIGH when connected over TCP, LOW when disconnected.
5.6. 4.6 Setting Print levels
There are a number of print functions that can be enabled to assist in debugging the operation
and status of the module. The following command is used to control these printouts.
set sys printlvl <value> sets additional print functions. Bit-mapped value.
Bit Function
1 Print startup messages showing progress of association, dhcp, etc.
Once the configuration has been checked, this can then be turned off so that these messages
do not interfere with the datastream.
PIO
State DESCRIPTION
9 input Used for factory reset
8,7 NA Not available
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)
3 output UART RTS – goes HIGH on POWERUP, LOW once system is READY.
If HW Flow control enabled, toggles HIGH to indicate RX buffer full.
2 input UART CTS – throttles transmitter if HW flow control enabled.
LOW enables transmitter, HIGH will disable.
1 input UART RX
0 output UART TX
Roving Networks Wifly RN-111B User Guide Version 1.23
www.rovingnetworks.com
support@rovingnetworks.com
Phone 408-395-6539
- 18 -
6. Making an Outbound Connection
Setup steps:
set the remote IP address with set ip host 10 10 10 20 for example. default remote
port is 2000, set the port with set ip remote 4000 if you need to change it.
Open the Connection: choose one of three ways.
A: go into command mode using $$$ and then send the OPEN command.
You can simply connect in-line with OPEN 10 10 10 20 2000 for example.
B: set PIO5 to control the TCP connection ( use set sys io 1 to configure it )
Then setting PIO5 will connect, low will disconnect.
C: Auto connect after timer by using the command set sys auto 5 for example.
This will automatically connect 5 seconds after powerup.
Monitoring Connect Status: if needed, connection status can be monitored by
A: reading PIO6. use the command set sys io 2 to enable this mode.
B: Setup a string to be sent upon connect and disconnect:
example
set comm open %OPEN sends %OPEN out of the UART when the port is opened
set comm close %CLOSE sends %CLOSE out of the UART when the port is closed
set comm remote $HELLO sends $HELLO to the remote host upon port opened.

RN-111B-R

Mfr. #:
Manufacturer:
Microchip Technology
Description:
WiFi Modules (802.11) WiFly 802.11b WLAN with RP-SMA Jack
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet