www.rovingnetworks.com
Version 1.0r 9/21/2012
22
RN -W IFLYCR -U M
set sys mask <
mask
>
This command sets the I/O port direction, where <
mask
> is a hex number referring to a bit-mapped register. For more
details see “Setting GPIO Direction, Alternate Functions & Disabling LEDs” on page 51.
NOTE:
To set the GPIO pins as inputs or outputs instantly, use the
set sys mask 0xABCD 1
command, which does
not require a reboot.
Default:
0x20F0 (for RN-131)
0x21F0 (for RN-171)
Example:
set sys mask 0x0
// Sets all pins as inputs
set sys printlvl <
value
>
This command controls the debug print messages printed by the WiFly module on the UART, where <
value
> is one of the
values shown in Table 7. Refer to “Setting Debug Print Levels” on page 56 for more information.
Table 7. Debug Print Message Settings
Value
Description
0
Quiet mode. Messages are not printed when the module wakes up or powers up.
1
Print all status messages.
2
Print only critical network access point connection level status, e.g.,
Associated!
or
Disconnect from
<
SSID
>.
4
Print the DHCP and IP address status information. After you have verified the module’s configuration, you can
turn off this option so that the messages do not interfere with the data.
0x4000
Change the scan format output to an MCU friendly format.
0x10
Enables the UART heartbeat message. See “UART Heartbeat Messages” on page 58 for more details.
Default:
0x1
Example:
set sys printlvl 2
// Sets the debug print messages to only critical network
// connection status
set sys output <
mask
> <
mask
>
This command sets the output GPIO pins high or low, where <
mask
> is a hex number referring to a bit-mapped
register. The optional <
mask
> sets a subset of the pins.
Default:
None
Example:
To toggle GPIO8, use the following commands:
set sys mask 0x21f0
// Set GPIO8 as output
set sys output 0x0100 0x0100
// Drives GPIO8 high
set sys output 0x0000 0x0100
// Drives GPIO8 low