WiSnap User Manual 4.41 05282015-ML
Page 32
equivalent of the ASCII character. Setting the match character to 0 disables matching. Each time the match character
is seen an IP packet will be sent. For example,
set comm match 0xd
forwards once a 0xd hex character is seen.
set comm size
<value>
-
This command sets the flush size in bytes, where
<value>
is a decimal number from 0 to
1,420 (at 9600 baudrate). When this configuration option is set, the module sends an IP packet each time
<value>
bytes are received. It is recommended that you set this value as large as possible to maximize TCP/IP performance.
This sets the flush size, the size is the number of bytes received before forwarding. Maximum value = 1460 bytes
which is the size of a single Ethernet frame.
NOTE:
To optimize the link, this value is set automatically when the baud rate is set. It is assumed that higher
baud rates equate to more data, hence the flush size is increased.
set comm time
<value>
-
This command sets the flush timer, where
<value>
is a decimal number representing
milliseconds. When this configuration option is set, the module sends and IP packet if no additional bytes are received
for
<value>
ms. Setting this value to 0 disables forwarding based on the flush timer. This is used to make sure that any
partial data sitting the RX buffer if no additional data is seen for “value” milliseconds. For example
set comm time
1000
would wait for 1 second after no data was sent.
If the module will be sending more than a few hundred thousand bytes in a single transaction, you should enable hardware
flow control. Your hardware must actively monitor the CTS pin. Flow control is not enabled by default; you set it with the
set
uart flow 1
command.
It is possible to operate higher baud rates (greater than 115K) without flow control if packets are uniform and an application
protocol is used to ensure that each packet 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 effects of interference and retries inherent in
wireless networks, flow control is usually required whenever large, contiguous quantities of data are being written to the UART
to guarantee no data is lost.
10.5 Setting GPIO direction, Alternate Functions and Disabling LEDs
The direction of the GPIO can be controlled with the GPIO mask using the
set sys mask
<value>
command to set the GPIO pin
direction. Value is entered as a hex number. If you need to set only one bit in the mask you need to read, mask and set the
value. Otherwise you will over write any previous GPIO settings.
The hex value represents a bit mask that controls each pin where 1 = output and 0 = input. For example,
set sys mask 0x0
sets
all pins to input.
To set only GPIO 6 and 7, for example, you would enter
set sys mask 0xc0.
The default mask for WiSnap = 0x20f0, which has GPIO 13, 8, 7,6,5,4 as Outputs. GPIO 0-3 are used internally on the module.
GPIO 4, 5, 6 are LEDs. GPIO 9 is reserved as the ARM factory reset/ad-hoc mode, (read at power up) and otherwise general
purpose input detect pin. GPIO 10, 11 are the UART RX, TX pins and TX does not need to be masked as an output. GPIO12 is
CTS (input) if used. GPIO13 is RTS (output) if used.
The LEDs on the WiSnap SuRFBoard (M1) are connected to GPIO 4, 5 and 6. To disable the LEDs, enter
set sys mask 0x20d0.
NOTE:
The Yellow, Red and Green LEDs can be turned off. The Blue LED on the Surf board is the power LED and cannot
be turned OFF.
The
get sys
command will show the setting of the GPIO mask.
<2.20>
get sys
SleepTmr=0
WakeTmr=0