WiSnap User Manual 4.41 05282015-ML
Page 19
-
set sys output 0x0100 0x0100 -
Drives GPIO8 high
-
set sys output 0x0000 0x0100 -
Drives GPIO8 low
set sys sleep
<secs>
-
sets the sleep timer, where <
value
> is a decimal number. The sleep timer is the time (in seconds) after
which the module goes to sleep. This timer is disabled during an open TCP connection. When the TCP connection is closed, the
module counts down and puts the module to sleep after <
value
> seconds. Setting the value to 0 disables the sleep timer, and
the module will not go to sleep based on this counter. 0 disables.
NOTE:
If not using Sensor pins to wake the module, be sure to set the wake timer before issuing the sleep timer or the
module will not wake up.
See section 10.1 for more details on using system timers
set sys trigger
<flag>| <mask>
-
sets the sensor input(s) to wake on (0-3). With this parameter setting, the module wakes from
sleep state using the sensor input 0, 1, 2, and 3, where <
flag
> is a decimal number referring to a bit-mapped register as shown
in the table below and <
mask
> is a hex number. You use either <
flag
> or <
mask
> with this parameter setting. This command
sets the sensor input(s) to wake on (0 to 3). Setting <
flag
> to 0 disables wake on sensor inputs. Bit-mapped value.
Bit Position
Description
0
Trigger sensor input 0
1
Trigger sensor input 1
2
Trigger sensor input 2
3
Trigger sensor input 3
4
Enable WPS function
5
Enable sleep on GPIO8
The following table describes how you can wake the module using sensor input.
Wake on Sensor Input
Value
Command
0
1
set sys trigger 1
1
2
set sys trigger 2
2
4
set sys trigger 4
3
8
set sys trigger 8
NOTE:
Setting the system trigger value to
0x10
enables WPS functionality. WPS is disabled by default.
Setting the trigger value to 0x20 (i.e., using
<mask>
) puts the module to sleep when GPIO8 is pulled high. To enable this
feature, use the set
sys trigger 0x20
command
.
This command makes GPIO8 an interrupt pin and puts the module to sleep as
soon as it is pulled high, regardless of the module’s state; the module goes to sleep even if it is associating with a network or
has an open, active TCP connection.
This command is useful for when the module is failing to associate with network because it is out of range (or for any other
reason), or if the module must be put to sleep quickly.
NOTE:
GPIO8 must be low on power up and stay low until you want to put the module to sleep.
set sys wake
<secs>
-
sets the auto wake timer. 0 disables. See section 10.1 for more details on using system timers.
set q power
<value>
-
register automatically turns on the sensor power, where <value> is shown in the table below. This
parameter sets an 8-bit register with two 4-bit nibbles. If the top nibble is set, power is applied upon power up and removed
upon power down or sleep. If the bottom nibble is set, power is applied when a sampling event occurs such as:
UDP broadcast
Automatic web posting of sensor data
Power is removed immediately after sampling is complete