Serialio WiSNAP User Manual

802.11 b/g wireless lan module
Table of Contents

Advertisement

Quick Links

W
S
I
NAP  
802.11   B /G   W ireless   L AN   M odule  
User Manual and Command Reference
1 Overview ........................................................................................................................... 4
2 Hardware Interface ............................................................................................................. 5
2.1 Power ......................................................................................................................... 5
2.1.1 WiSnap M1 SuRFBoard ........................................................................................5
2.1.2 WiSnap AAA Dongle ............................................................................................5
2.2 Reset .......................................................................................................................... 6
2.3 UART .......................................................................................................................... 6
2.4.1 WiSnap M1 SuRFBoard ........................................................................................6
2.4.2 WiSnap AAA Dongle ............................................................................................7
2.5 WiSnap M1 External Antenna..........................................................................................7
2.6 Additional WiSnap AAA Dongle Notes ..............................................................................7
2.6.1 Power Switch and Sleep........................................................................................7
2.6.2 Dipswitches ........................................................................................................8
2.6.3 Serial Connector Specification ...............................................................................8
2.6.4 Null-modem and Flow Control Jumpers ..................................................................9
3 Configuration ................................................................................................................... 10
3.1 Entering Command Mode ............................................................................................. 10
3.2 Common Configurations .............................................................................................. 11
4 WiSnap Command Reference .............................................................................................. 14
4.1 Command Syntax ....................................................................................................... 14
4.2 Command Organization ............................................................................................... 14
............................................................................................................. 15
5.1 AD-HOC Parameters ................................................................................................... 15
W
-­-F
I
I
Version 2.21
April 11th, 2011
......................................................................................................... 6
Page
WiSnap User Manual 2.21 04112011-JF
/S
ERIAL  
1
66
of
A
DAPTER
 

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WiSNAP and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Serialio WiSNAP

  • Page 1: Table Of Contents

    ......................6 2.4.1 WiSnap M1 SuRFBoard ..................6 2.4.2 WiSnap AAA Dongle ....................7 2.5 WiSnap M1 External Antenna..................7 2.6 Additional WiSnap AAA Dongle Notes ................7 2.6.1 Power Switch and Sleep..................7 2.6.2 Dipswitches ......................8 2.6.3 Serial Connector Specification ................8 2.6.4 Null-modem and Flow Control Jumpers ..............9 3 Configuration ........................
  • Page 2 WiSnap User Manual 2.21 04112011-JF 5.2 BROADCAST Parameters ..................... 15 5.3 COMM Parameters ..................... 15 5.4 DNS Parameters ......................16 5.5 FTP Parameters ......................17 5.6 IP Parameters ......................17 5.7 OPTIONAL Parameters ....................19 5.8 SYSTEM Parameters ....................20 5.9 TIME Server Parameters ....................
  • Page 3 WiSnap User Manual 2.21 04112011-JF 17.1 Restoring Default configuration settings..............58 18 Boot-up Timing Values.....................59 19 Supported Access Points....................60 20 Release Notes ......................... 61 20.1 Known problems ...................... 61 20.2 Current Firmware features and fixes ................61 Page...
  • Page 4: Overview

    One of the main applications for this device is the iPhone, since it requires buying additional authorization hardware to use Bluetooth SPP, the WiSnap in ad-hoc mode is a simple and cost effective way to connect to iPhone apps. The WiSnap Serial Adapter is more than a cable replacement solution.
  • Page 5: Hardware Interface

    The failure mode is a short across GND and VCC. 2.1.2 WiSnap AAA Dongle The WiSnap AAA Dongle is powered by two AAA batteries, an external AC to 5VDC power cable, or 5VDC (only) on pin 9 of the DB9 connector. Rechargeable NiMH batteries will be trickle charged when used with an external 5VDC (only) power source.
  • Page 6: Reset

    NiMh batteries the voltage will remain relatively unchanged just until they go dead. Reset Note: The following only applies to the WiSnap M1 module. Reset is active LOW and is optional/does not need to be connected. The reset pin is 3.3V tolerant and has an internal pull up of 100K to the VBATT.
  • Page 7: Wisnap Aaa Dongle

    The red button on the top of the WiSnap AAA Dongle is a soft ON/OFF switch. To turn ON the WiSnap AAA Dongle, press down the red button for 1 second, and then release it. You will see the green, yellow, red and blue LEDs flash in succession. After a moment the blue and yellow LEDs will go OFF, leaving the red and green LED flashing.
  • Page 8: Dipswitches

    To restore factory defaults, power on the device with this switch ON, and then toggle the switch five (5) times. If there is a config file named "user" on the WiSnap AAA Dongle file system, it is read in as the factory defaults instead of using the hardcoded defaults. If no "user" config file is present, the hardcoded factory defaults are used.
  • Page 9: Null-Modem And Flow Control Jumpers

    WiSnap User Manual 2.21 04112011-JF 2.6.4 Null-modem and Flow Control Jumpers The WiSnap AAA Dongle serial interface can be configured to enable flow control and null modem signalling. The jumper block is accessed by removing the battery cover from the WiSnap AAA Dongle.
  • Page 10: Configuration

    IMPORTANT NOTE: Do NOT upgrade the firmware with a WiSnap AAA dongle. Only the WiSnap M1 module is supported by this firmware. The auto join feature can be disabled by setting the set wlan join 0. This will prevent the WiSnap module to attempt to associate to a network that does not exist.
  • Page 11: Common Configurations

    To enable ad-hoc mode via hardware, set PIO9 high (3.3V) at power up. On the WiSnap M1, PIO9 is on the J1 jumper block, and dipswitch 1 on the WiSnap AAA. When the module powers up with PIO9...
  • Page 12 SSID, passkey and channel. Channel =0 (the default) will force auto-scanning. Setting the channel will reduce the time it takes the WiSnap to find and associate. Step 2: Set up the IP address and port number of the remote server, so the WiSnap can connect when it wakes up. set ip host 10.20.20.75...
  • Page 13 WiSnap User Manual 2.21 04112011-JF set ip address 10.20.20.63 // Set the IP address set ip localport 5030 // Set the local port to listen on set ip netmask 255.255.255.0 // Set the IP netmask set ip gateway 10.20.20.1 // Sets the network gateway...
  • Page 14: Wisnap Command Reference

    WiSnap User Manual 2.21 04112011-JF 4 WiSnap Command Reference Command Syntax Commands begin with a keyword, and have optional additional parameters, generally space delimited. Commands and options are case sensitive. Hex input data can be upper or lower case. String text data, such as SSID is also case sensitive.
  • Page 15: Set Commands

    WiSnap User Manual 2.21 04112011-JF 5 SET Commands These commands begin with “set”. There are 6 major categories. AD-HOC - controls the ad-hoc parameters BROADCAST - controls the broadcast hello/heartbeat UDP message COMM - communication and data transfer, timers, matching characters...
  • Page 16: Dns Parameters

    WiSnap User Manual 2.21 04112011-JF set comm open <string> sets the string that is sent to the local UART when the TCP port is opened. If no string is desired, use 0 as the <string> parameter. Max string length is 32 characters. Default is *OPEN* set comm remote <string>...
  • Page 17: Ftp Parameters

    FTP server. IP Parameters set ip address <addr> sets the IP address of the WiSnap module. If DHCP is turned on, the IP address is assigned and overwritten during association with the access point.
  • Page 18 <addr> sets the remote host IP address. This command is used for making connections from the WiSnap module to a TCP/IP server at the IP address <addr>. set ip localport <num> sets the local port number to listen for incoming connections.
  • Page 19: Optional Parameters

    The replacement character is used when entering SSID and pass phrases that include space. This is used by the WiSnap command parser only. Each occurrence of the replacement character is changed into a space. The default is “$”...
  • Page 20: System Parameters

    WiSnap User Manual 2.21 04112011-JF 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.
  • Page 21: Uart Parameters

    UART baud rate. Valid settings are {2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}. Example : “set u b 9600” sets the baud rate to 9600 baud. NOTE: the RS-232 interface on the WiSnap does not work below 2400 or above 230400 baud. set UART instant <rate>...
  • Page 22: Wlan Parameters

    Sets the authentication mode. Not needed unless using auto join mode 2. i.e. set wlan join 2 Note: During association the WiSnap module interrogates the Access Point and automatically selects the authentication mode. The current release of WiSnap firmware supports these security modes: •...
  • Page 23 Wi-Fi standards. set wlan linkmon <value> sets the link monitor timeout threshold. If set to 1 or more, WiSnap will scan once per second for the AP it is associated with. The value is the threshold of failed scans before the WiSnap declares “AP is...
  • Page 24 WiSnap User Manual 2.21 04112011-JF set wlan rate <value> sets the wireless data rate. Lowering the rate increases the effective range of the WiSnap module. The value entered is mapped according to the following table: Value Wireless Data Rate 1 Mbit/sec 2 Mbit/sec 5.5 Mbit/sec...
  • Page 25: Get Commands

    WiSnap User Manual 2.21 04112011-JF 6 GET Commands These commands begin with “get”. They display the current values. get ad-hoc display all ad-hoc settings. get broadcast will display the broadcast UPD address, port and interval get everything displays all configuration settings, useful for debug.
  • Page 26: Status Commands

    In some cases, for example IP addresses, the current values are received from the network, and may not match the stored values. show bat Displays current battery voltage, (only valid for SerialIO.com battery powered products like the WiSnapAAA) show connection...
  • Page 27: Action Commands

    WiSnap User Manual 2.21 04112011-JF ACTION Commands enter command mode Characters are PASSED until this exact sequence is seen. If any bytes are seen before these chars, or after these chars, in a 250ms window, command mode will not be entered and these bytes will be passed on to other side.
  • Page 28 WiSnap User Manual 2.21 04112011-JF scan <time> <P> Performs an active probe scan of access points on all 13 channels. Returns MAC address, signal strength, SSID name, security mode. Default scan time is 200ms / channel = about 3 seconds.
  • Page 29: File Io Commands

    WiSnap User Manual 2.21 04112011-JF FILE IO Commands del <name> <num> Deletes a file. Optional <num> will override the name and use the sector number shown in the “ls” command. load <name> Reads in a new config file. Displays the files in the system save Saves the configuration to “config”...
  • Page 30: Advanced Features And Settings

    When the module wakes up from sleep, it takes a certain amount of time (in milliseconds) to initialize the internal hardware. During this time, any data that is sent to the WiSnap module over the UART will not be processed. You can monitor certain signals that indicate that the module is ready to accept data.
  • Page 31: System Timers And Auto Connect Timers

    0. The sleep timer is disabled if the module has an IP connection, or the module is in COMMAND mode. The sleep timer (which is the time the WiSnap is awake) is a 32 bit number of seconds so it can be as high as 1.19 million hours.
  • Page 32: Udp Sleep And Connection Timers

    WiSnap User Manual 2.21 04112011-JF set wlan ssid my_net set wlan passphrase my_pass set sys sleep 30 set sys wake 90 save reboot The above diagram shows the transitions between the Sleep state and Awake state based on the sleep and wake timers.
  • Page 33: Tcp Connection Timers

    WiSnap User Manual 2.21 04112011-JF 10.1.2 TCP Connection Timers Opening a TCP Connection In TCP-Client mode, the auto-conn timer controls the establishment of a socket connection. When set, the device automatically and periodically attempts to establish a connection each time the timer expires.
  • Page 34: Wake On Uart

    SENSE pins to the RX data or CTS pin. (Using the appropriate divider resistors mentioned above) The WiSnap SuRFBoard has a built in resistor divider connecting SENSE 0 and SENSE 1 to RXD and CTS respectively. This allows wake on RX and CTS using a 3.3V signal.
  • Page 35: Setting Gpio Direction, Alternate Functions And Disabling Leds

    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.
  • Page 36: Setting The Alternate Gpio Functions

    Default Function NOTE: The Blue LED is connected to GPIO7 on the WiSnap AAA. The Blue LED is not connected to GPIO7 on the WiSnap SuRFBoard (M1). It is not possible to power off the Blue LED on the SuRFBoard.
  • Page 37: Controlling Connections With Gpio

    The TCP/IP connection status can be monitored by reading GPIO-6, high = connected, low = not connected. Here is how to set the WiSnap module to connect using GPIO-5 and GPIO-6 <2.20> set ip host <addr> // set the IP address of the remote host <2.20>...
  • Page 38: Using The Real Time Clock Function

    <2.20> show t Time=08:51:31 UpTime=15 s NOTE: the WiSnap module must by successfully associated with a network for the module to contact the sNTP server. Alternatively, the module can be configured to get the time whenever it powers up by setting the time enable to 1.
  • Page 39: Time Stamping Packets

    WiSnap User Manual 2.21 04112011-JF Powerup=1792 s RTC=7753271426558 ms timera=66885 10.8 Time Stamping Packets This feature can be used to automatically append 8 bytes to a TCP or UDP packet. set ip flags 0x87 (enables timestamp and keeps other default settings ) TIME STAMP (MSB to LSB ) User’s TCP or UDP packet Data...
  • Page 40: Sending Data Using Udp

    UDP packet into the module. This host IP address is stored in the RAM which will not survive a sleep or power cycle. This feature allows the WiSnap module to echo back to any client that sends a UDP packet. To use this feature, the host IP addresses and set the ip flags.
  • Page 41: Udp Retry

    For example, the IP address and port number of the WiSnap are both part of the packet, and thus the WiSnap can be connected to and configured remotely with this information.
  • Page 42 WiSnap User Manual 2.21 04112011-JF NOTE: To add sensor data to the UDP broadcast message, the sensors have to be enabled using the sensor mask. set q sensor 0xff enables all sensors. Page...
  • Page 43: Joining Networks And Making Connections

    12.1 Associate with a network access point From within the terminal window, put the WiSnap module into command mode by typing $$$ in the terminal window. You should get CMD back confirming you are in command mode.
  • Page 44: Making Connections

    Microsoft command window. With the WiSnap module in command mode, type open <addr> <port>. The server will report the connection is open and you can type characters into the UART window and see them on the server window or vice versa.
  • Page 45: Controlling Connections Using Pio5 And Pio6

    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>...
  • Page 46: Using Html Client Feature

    13.1 Built-in HTML Client Modes WiSnap can be setup to automatically post data to and get data from a web server without any external HOST CPU. The advanced web features are enabled using the “set option format <mask>” command. This is a bit mapped register. The functions of the bits are described in the table below: set option format <value>...
  • Page 47: Automatically Periodically Connect To Web Server

    Automatically connect to web server on UART data WiSnap supports a mode in which it can connect to the web server when it receives UART data. In this mode, connection to the web server will be triggered on UART data.
  • Page 48: Auto Posting Sensor Data

    GET /userprog.php?DATA=01AB03FF0506 \n\n 13.5 Auto posting sensor data: WiSnap module can send the value of the GPIO and sensor pins: The data will come as 18 bytes of ASCII HEX: <2 bytes GPIO><channel 0 thru 7 sensor data> set ip proto 18 // turn on HTTP mode=0x10 + TCP mode = set dns name www.webserver.com...
  • Page 49 Example#2: Posting UART data to web server The WiSnap module is capable of auto posting serial UART data in ASCII or Binary format. In this example we will configure the WiSnap module such that when the serial UART data comes in, the WiSnap will connect and automatically send data to the web server in the following format: GET /mike.php?ID=<user serial data>...
  • Page 50 WiSnap User Manual 2.21 04112011-JF With the above settings enabled, the WiSnap module will connect out to the web server every time it receives data on the RX line. Serial data is sent to the host web server according to the flush timer and the flush size.
  • Page 51: Firmware Upgrade Over Ftp

    14 Firmware Upgrade over FTP The WiSnap module has a file system for storing firmware, web pages and config files. Use the ls command to view files. File size is displayed in sectors and the active boot image is identified in the final message.
  • Page 52 5.5 for more details on the FTP commands. To upload your file use following command: ftp get <string> Retrieves remote file with name <string> IMPORTANT NOTE: Do NOT upgrade the firmware with a WiSnap AAA dongle. Only the WiSnap M1 module is supported by this firmware. Page...
  • Page 53: Ad-Hoc Networking Mode

    Turn off DHCP and set the IP address and netmask so other devices know where to connect to the ad-hoc WiSnap GSX. Since auto IP fixes the first two bytes of the IP address you want to use the netmask of 255.255.0.0 so that other device connecting to the module can be reached. Alternatively you can set the netmask to a smaller subnet if the other device’s IP addresses are begin statically to...
  • Page 54 If you leave DHCP service enabled the WiSnap device will get an IP address using auto IP when associating with the ad-hoc network. By definition auto IP fixes the first two bytes of subnet to 169.254.xxx.xxx.
  • Page 55: Analog Sensor Capability

    WiSnap User Manual 2.21 04112011-JF 16 Analog Sensor Capability The WiSnap M1 has 8 analog sensor inputs that can be driven between 0 to 1.2VDC. The analog inputs are sampled and the digital value read by using the show q <channel> command.
  • Page 56: Using The Built-In Sensor Power

    For example, to sample all sensors inputs, use the set q sensor 0xff command. 16.2 Using the Built-In Sensor Power WiSnap modules contain an onboard Sensor power pin, which is controlled by the command below: set q e <value> The values used for setting the power are described in the table below:...
  • Page 57: Default Configuration Settings

    WiSnap User Manual 2.21 04112011-JF 17 Default Configuration Settings AD-HOC PARAMETERS Beacon 100 (milliseconds) Probe 60 (seconds to look for beacons before declaring ad-hoc is lost) BROADCAST PARAMETERS IP address 255.255.255.255 Port 55555 Interval 7 (seconds) COMM PARAMETERS Close string...
  • Page 58: Restoring Default Configuration Settings

    WiSnap User Manual 2.21 04112011-JF Auto connect IOfunc 0 (no alternate functions) IOmask 0x21F0 Print level 1 (prints enabled) TIME SERVER PARAMETERS Enable 0 (disabled) Server address 129.6.15.28 (fixed to port 123 - SNTP protocol) Zone 7 (pacific USA time)
  • Page 59: Boot-Up Timing Values

    WiSnap User Manual 2.21 04112011-JF 18 Boot-up Timing Values Function Description Time (in ms) Power up Powerup Time from Reset HIGH or power good to boot code loaded. Initialization Initialize ECOS Ready Load configuration and Initialize application Total time to READY...
  • Page 60: Supported Access Points

    WiSnap User Manual 2.21 04112011-JF 19 Supported Access Points Access points that are set to MIXED mode (WPA1 and WPA2) may cause problems during association because some of these incorrectly report their security mode. We also currently do not support WPA2-Enterprise (radius server authentication, EAP-TLS) The WiFly GSX should work with any standard Access Point.
  • Page 61: Release Notes

    WiSnap User Manual 2.21 04112011-JF 20 Release Notes 20.1 Known problems The UART does not support odd or even parity, only no parity is supported. • Flow control: RTS may fail to de-assert quickly enough for some high speed CPUs to •...
  • Page 62 The *CLOS* response will now appear when the connection is terminated by the WiSnap. NOTE: This may require the use of the set comm idle xx setting to monitor the TCP connection, and force a TCP disconnect when no data is flowing due to lost association.
  • Page 63 Upon waking from sleep, as long as the DHCP lease time is valid and the WiSnap is associated to the same AP, DNS caching does not survive a power cycle or usage of the hardware reset pin.
  • Page 64 For more information on using this command see the “set optional” section command UDP broadcast packet – By default the WiSnap module now sends out a UDP broadcast to 255.255.255.255 on port 55555 at a programmable interval. The broadcast address, port and interval are set using the set broadcast commands.
  • Page 65 • Sensor pins for reading analog signals are not supported • Wake on UART RXD or CTS is not working on current revision REV2 of the WiSnap SuRFBoard. • The fast- autosleep timer for UDP mode is not implemented. •...
  • Page 66 The Bluetooth trademark and logo are registered trademarks and are owned by the Bluetooth SIG, Inc. All other trademarks are property of their respective owners. SerialIO.com reserves the right to make corrections, modifications, and other changes to its products, documentation and services at any time. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.

This manual is also suitable for:

Wisnap wi-fi/serial adapter

Table of Contents