WiSnap User Manual 4.41 05282015-ML
Page 18
Bit
Function
0
Automatically send HTML data header based on broadcast
interval
1
Send users BINARY data (converted to ASCII hex)
2
Sample the TPIO and AtoD pins format to ASCII hex
3
Appends
&id
= <the value of the deviceid string set with “set opt
device
<string>
”>
4
Appends
&rtc
= <real time clock value in message as 32 bit HEX
value in format aabbccddeeff>
set opt deviceid
<string>
-
Configurable Device ID - can be used for storing serial numbers, product name or other device
information. This information is sent as part of the broadcast hello packet that is sent as a UDP. The current value can be
shown with the
get option
or
show deviceid
commands. Max string size is 32 bytes. The default is “WiSnap<DEVICEID>M1”.
set opt password
<string>
-
TCP connection password. Provides minimal authentication by requiring any remote device that
connects to send and match a challenge
<string>
. When set, all newly opened connections must first send the exact characters
that match the stored password otherwise the WiSnap module will close the connection. When the password is set, the
WiSnap module sends the string “PASS?” to the remote host. All characters in the string must be sent in one TCP packet. Max
string size is 32 bytes. To disable the password feature use string=0 which is the default.
5.8 SYSTEM Parameters
set sys autoconn
<secs>
-
TCP mode: sets the auto connect timer. This command causes the module periodically connect to
the host. The timer
<secs>
determines how often to connect to the stored remote host. If set to 1, the module will only make
one attempt to auto connect upon power up. If set to 2 or greater, auto connect will re-open the connection after the
connection is closed. Default=0 disables.
set sys autosleep
<num>
-
sets the auto-sleep timer. 0 disables. If the protocol is set to UDP ONLY, this timer is used as a
quick sleep function. Device will sleep
<num>
ms after transmission of the first UDP packet.
set sys iofunc
<value>
-
sets the IO port alternate functions. Bit-mapped value. For more details see section 10.5
set sys mask
<mask>
-
sets the IO port direction mask. Bit-mapped value. For more information see section 10.5
set sys printlvl
<value>
-
sets the debug print messages printed by the WiSnap module on the UART, where
<value>
is one of
the values shown on the table below. Default is 1.
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.
set sys output
<value> <mask>
-
sets output PIO pins to HIGH or LOW. Bit-mapped value. Optional mask only sets a subset of
pins.
Example: To toggle GPIO8, use the following commands:
-
set sys mask 0x21f0 -
Set GPIO8 as output