WiSnap User Manual 2.21 04112011-JF
Page
45
of
66
UART data TRIGGER mode.
(version 2.19) This mode will automatically make a TCP/HTTP
connection upon incoming UART data.
set UART mode 2
12.4
Controlling Connections using PIO5 and PIO6
PIO5 can be used to control the TCP connection. Once configured with the set system IO command
the module will attempt to make a connection to the stored IP and PORT address when set high and
will disconnect when set low.
set sys io 0x20
(configures PIO5 to connect/disconnect )
You can monitor the connection status by reading PIO6. High indicates an open connection, low
indicates no connection. Use the command set system IO to enable PIO6.
set sys io 0x40
(configures PIO6 to represent the connection status )
12.5
Using DNS settings
WiSnap contains a built in DNS client. If the IP address of the host is not specified (i.e it is set to
0.0.0.0), the DNS protocol will be used. WiSnap will automatically attempt to resolve the host
address
stored with the command:
set dns name <string>
sets the name of the host for TCP/IP connections.
Once the address is resolved an automatic connection will be made.
To manually lookup the IP address of a host, use this command:
Lookup <string>
string is the hostname.
12.6
Utilizing the Backup IP address/connect function
WiSnap contains a feature for auto-retry and redundancy. If the first IP host address connection
fails, the backup IP will be used (if set). If this fails (or is not set) then the first DNS name will be
used. If this fails (or is not set) then the Backup DNS name will be used.
To set the backup IP address, use:
set ip backup <address>
To set the backup DNS name, use:
set dns backup <string>