• No results found

Wifi Web Server Module w TF Socket User s Guide

N/A
N/A
Protected

Academic year: 2021

Share "Wifi Web Server Module w TF Socket User s Guide"

Copied!
22
0
0

Loading.... (view fulltext now)

Full text

(1)

Wifi Web Server Module

w TF Socket

User’s Guide

(2)

WIFI WEB SERVER MODULE

W TF SOCKET

USER’S GUIDE

Table of Contents

Chapter 1. Overview ...1

1.1 Overview ... 1

1.2 Features ... 2

1.3 Quick Start ... 2

1.3.1 Save All Files in a Micro SD Card ... 2

1.3.2 Connection... 3

1.3.3 Install CP2102 Driver ... 4

1.3.4 Browse Webpage ... 6

Chapter 2. Hardware Detail ...7

Chapter 3. Configuration...8

3.1 Infrastructure Mode ... 8

3.2 Adhoc Mode... 8

3.3 Hyper Terminal ... 8

Chapter 4. Function Demonstration ... 11

4.1 Webpage ...11

4.2 Status Monitoring...11

4.3 Leds Control ... 12

4.4 Example of Using Command ... 12

4.4.1 Configuration of AD-HOC Mode ... 12

4.4.2 View the Current Status... 12

4.4.3 Send Data to Webpage ... 13

Chapter 5. Mechanical Drawing...14

Chapter 6. Appendix ...15

6.1 WiFi Connection Failure ... 15

6.2 Command Set ... 15

6.2.1 Standalone Commands ... 15

6.2.2 puthttp Command ... 15

6.2.3 iwconfig Commands ... 15

6.2.4 ifconfig Commands ... 16

6.2.5 iwpriv Commands ... 17

Chapter 7. Contact Us ...19

(3)

NOTES:

Product Version : Ver 1.0

Document Version : Ver 1.0

(4)

WIFI WEB SERVER MODULE

W TF SOCKET

USER’S GUIDE

Chapter 1. Overview

1.1 Overview

Thanks for using this WiFi web server module by Sure Electronics. This is a demonstration board for evaluating Wi-Fi connectivity using PIC24FJ256GB106 and the MRF24WB0MB which is an agency certified IEEE 802.11 Wi-Fi radio transceiver module having an uFL connector for an external antenna, matching circuitry, and supports Wi-Fi with the free TCP/IP protocol stack. It can simply demonstrate to you the function of Web Server Module based on Microchip TCP/IP Stack v5.25. After configuration, you can browse the webpage of the demo board by entering the IP address. Of course, you can also directly enter http://SURESERVER/ in the browser. Two functions, Status Monitoring and Leds Control, are demonstrated on the page.

FIGURE 1-1 OVERVIEW

(5)

FIGURE 1-2 ACCESSORY

Note: All the diagrams in this manual are for reference only.

1.2 Features

y Powered by miniB USB cable y Saving webpages in a micro SD card y Support dynamic page display

y Wi-Fi wireless network, configurable via UART interface y Web-based status monitoring

y Web-based LEDs control

1.3 Quick Start

1.3.1 Save All Files in a Micro SD Card

As shown below, save all the files in WebPages.zip provided to the root directory of a micro SD card.

FIGURE 1-3 SAVE WEBPAGES

Root directory of a micro SD card

(6)

Overview

1.3.2 Connection

Follow the figure and steps below for connection.

FIGURE 1-4 CONNECTION SCHEMATIC

1. Connect the external antenna with the wifi module on the back of the wifi board 2. A converter module (DB-UC001-A) is introduced here to help the communication

between the wifi module and PC. Connect the wifi module and the converter board with three Dupont wires. Connect the converter board to PC with a USB Cable. The following is an up-close of the converter board and pin description of the wifi board.

FIGURE 1-5 UP-CLOSE OF CONVETER BOARD

(7)

TABLE 1-1 PIN DESCRIPTION OF THE WIFI BOARD Pin Number Name Description

1 GND Ground

2 RTS Request to send

3 +5V +5V supply

4 RXD Receive data

5 TXD Transmit data

6 CTS Clear to send

Pin connection between the converter board and wifi board is as follows:

GND (pin 1 of wifi module) <---> GND of the converter board RXD (pin 4 of wifi module) <---> TXD of the converter board TXD (pin 5 of wifi module) <---> RXD of the converter board

Note: Secure each connection by tightening the screws of the terminal block with a screw driver.

3. Insert the micro SD card into the socket and power the wifi board via USB mini B port.

1.3.3 Install CP2102 Driver

CP2102 driver helps establish the communication channel between the wifi board and PC with the help of the converter, so it must be installed first. It can be downloaded from http://www.sure-electronics.net/download/CP210x_VCP_Win2K_XP_S2K3.exe

The full name of CP2102 driver downloaded is “CP210x_VCP_Win2K_XP_S2K3.exe”.

Double-click it and the following will be displayed:

Click “Next >” to proceed.

(8)

Overview

Click “I accept the terms of the license agreement” and “Next >” to continue installation.

Click “Browse…” to specify the path that CP2102 driver is to be installed if necessary.

Otherwise, click “Next >” to proceed.

(9)

Click “Install” to start installation.

It may take a few seconds for installation to complete and the following will pop up after the installation:

Click “Finish” to complete the installation of CP2102 driver.

1.3.4 Browse Webpage

Enter http://sureserver/ or the current IP address in a browser and you can get more information. Google Chrome is recommended.

(10)

WIFI WEB SERVER MODULE

W TF SOCKET

USER’S GUIDE

Chapter 2. Hardware Detail

y PIC24FJ256GB106 IC

y MRF24WB0MB Wi-Fi radio transceiver module y TF socket

y Five LED indicators y USB miniB port y A thermistor y An external antenna

y UART interface – external serial port converter board required

(11)

W TF SOCKET

USER’S GUIDE

Chapter 3. Configuration

3.1 Infrastructure Mode

The default mode this wifi board works in is Infrastructure mode. Following is the configuration of wireless router when the wifi mode works in this mode. When the wifi board is reconfigured, the wireless router should be correspondingly configured.

TABLE 3-1 CONFIGURATION

Parameter Configuration

SSID MicrochipDemoAP Encryption Function Disabled

Channel 6

AP Mode Access Point

SSID Broadcast Enabled DHCP server Enabled 4X Mode(if there’s) Disabled

3.2 Adhoc Mode

When the wifi board works in Adhoc mode, IP address should be in the same network as the wifi board. Gateway and subnet mask of the wifi board must be the same with those of PC.

3.3 Hyper Terminal

1. Open Hyper Terminal. Create a new connection and name it.

FIGURE 3-1 NEW CONNECTION

(12)

Wifi Web Server Module w TF Socket

FIGURE 3-2 NEW NAME

2. Finish settings such as COM (COM11 is taken as an example here), baud rate and so on.

FIGURE 3-3 COM SELECTION

(13)

FIGURE 3-4 PORT SETTINGS

Power the Wi-Fi board and information of it will be displayed on Hyper Terminal. The default is Infrastructure mode. New IP address will be given. Here IP 192.168.2.106 is given as follows.

If the connection is wrong, please refer to Chapter 6 Appendix for details.

(14)

WIFI WEB SERVER MODULE

W TF SOCKET

USER’S GUIDE

Chapter 4. Function Demonstration

4.1 Webpage

You can browse the webpage of the demo board by entering the IP address in a browser in the Internet-linked device. You can also directly enter http://SURESERVER/ in the browser. Two functions, Status Monitoring and Leds Control, are demonstrated on the pages. The webpage is shown as follows:

FIGURE 4-1 WEBPAGE

4.2 Status Monitoring

There’re three real-time displays on the webpage:

y Real-time display of the current temperature (temperature of the board) y Real-time display of the current LED status (LED status can be changed under

Web-Based Control)

y Real-time display of the data from the serial port of the demo board (Baud rate:

(15)

4.3 Leds Control

As shown in figure 4-1, on-board LED indicators can be controlled via webpage.

4.4 Example of Using Command

4.4.1 Configuration of AD-HOC Mode

Enter command “iwconfig mode idle” and press “Enter” key, and then enter command

“iwconfig mode adhoc” and press “Enter” key. There will be a tip “Event: Connection Successful”, which means the current mode is AD-HOC mode.

4.4.2 View the Current Status

1. Enter command “ifconfig” and press “Enter” key.

Then you can use commands (refer to appendix) to close DHCP, modify IP address and finish other operations.

2. Enter command “iwconfig” and press “Enter” key.

(16)

Demonstration

Note: Command “iwconfig mode idle” should be entered first, and then the mode can be modified, including SSID, pwrsave, etc.

4.4.3 Send Data to Webpage

To send data to webpage, command “puthttp” is used. For example, enter command

“puthttp data from uart” and “data from uart” will be displayed on the webpage.

(17)

W TF SOCKET

USER’S GUIDE

Chapter 5. Mechanical Drawing

FIGURE 5-1 MECHANICAL DRAWING

(18)

WIFI WEB SERVER MODULE

W TF SOCKET

USER’S GUIDE

Chapter 6. Appendix

6.1 WiFi Connection Failure

When Wi-Fi connection failures, there will come up number as shown in the following table.

TABLE 6-1 COMMAND SET Number Description

2 JOIN FAILURE

3 AUTHENTICATION FAILURE 4 ASSOCIATION FAILURE

5 WEP HANDSHAKE FAILURE 6 PSK CALCULATION FAILURE 7 PSK HANDSHAKE FAILURE 8 ADHOC JOIN FAILURE

9 SECURITY MISMATCH FAILURE 10 NO SUITABLE AP FOUND FAILURE

11 RETRY FOREVER NOT SUPPORTED FAILUR

6.2 Command Set

There’re four command sets as follows:

TABLE 6-2 COMMAND SET

Name Description

Standalone Commands Standalone CLI commands for talking with the MRF24WB0M puthttp Commands Send data to the monitoring of web

iwconfig Commands Commands for controlling the wireless network interface ifconfig Commands Commands for controlling the network interface

iwpriv Commands Commands for controlling the wireless encryption settings 6.2.1 Standalone Commands

These CLI commands are not related to the wireless or networking interface directly.

TABLE 6-3 COMMANDS Name Description

help Lists all the available CLI commands for the MRF24WB0M getwfver Lists the WiFi firmware and host driver version numbers reset Issues a host reset

6.2.2 puthttp Command

This command takes the following structure and example above. Data ranges from 1 to 16 SCII characters.

(19)

TABLE 6-4 COMMANDS

Name Description

iwconfig ssid <name> Name ranges from 1 to 32 ASCII characters, spaces currently aren’t available in the SSID name.

iwconfig mode

<idle/managed/adhoc>

idle: forces the MRF24WB0M to disconnect from any currently connected network (adhoc or infrastructure).

managed: the MRF24WB0M will connect to the SSID in infrastructure mode. Note that all the network parameters must be correct before this command is called.

adhoc: the MRF24WB0M will connect to the SSID in adhoc mode. Note that all the network.

iwconfig channel <channel list/all>

channel list: a comma separated list of all the channels to scan.

all: sets the MRF24WB0M to scan all channels in the given regulatory domain.

iwconfig power

<reenable/disable/unicast/all>

reenable: enables all power saving features (PS_POLL) of the MRF24WB0M.

disable: disables any power savings features. The MRF24WB0M will always be in an active power state.

unicast: the MRF24WB0M will be in it's deepest sleep state, only waking up at periodic intervals to check for unicast data. The MRF24WB0M will not wake up on the DTIM period for broadcast or multicast traffic.

all: the MRF24WB0M will wake up to check for all types of traffic (unicast, multicast, and broadcast).

6.2.4 ifconfig Commands

These items should not be changed while the device is in a connected state to a network. ifconfig commands take the following structure:

(20)

Appendix

TABLE 6-5 COMMANDS

Name Description

ifconfig <IP address>

Use a static IP address. IP address must be in dot-decimal notation.

Note: this command will return an invalid parameter if the DHCP client is enabled. First disable the DHCP attempts (ifconfig auto-dhcp stop) before running this command.

ifconfig <MAC address>

Redefine the device MAC address. MAC address must be specified in hexadecimal colon notation.

This command can only be issued when the MRF24WB0M is in idle mode. Doing so at other times can have unexpected results.

ifconfig netmask <IP address> Use the specified IP address for the netmask. The netmask value is specified in dot-decimal notation.

ifconfig gateway <IP address> Configure the gateway address. The gateway value is specified in dot-decimal notation.

ifconfig auto-dhcp <start/drop>

start: e Starts the DHCP client. Only valid if the DHCP module has been compiled in. DHCP client is started by default.

drop: Stops the DHCP client. A static IP address will need to be assigned to the device. Only valid if the DHCP module has been compiled in.

6.2.5 iwpriv Commands

These items should not be changed while the device is in a connected state to a network. iwpriv commands take the following structure:

(21)

TABLE 6-6 COMMANDS

Name Description

iwpriv enc

<none/wep/wpa-psk/wpa-phrase>

none: the MRF24WB0M will not use any encryption to connect to the specified network.

wep: the MRF24WB0M will use either WEP-40 (short) or WEP-104 (long) encryption to connect to the specified network.

wpa-psk: the MRF24WB0M will use the specified 32-byte PSK to connect to the WPA/WPA2 network.

wpa-phrase: the MRF24WB0M will take the given 1-32 ASCII character passphrase, along with the SSID, and compute the required 32-byte PSK for the network. Note that doing so takes approximately 30 seconds to complete the calculation.

iwpriv key <[1]/[2]/|[3]/[4]>

<value>

Instructs the MRF24WB0M to use this key for connecting to the WEP encrypted network. Only key 1 is considered safe to use among different AP vendors. Keys 2-4 can have implementation specific entries that may not be compatible from AP to AP.

If value is specified, this will instruct the MRF24WB0M to use the specified key number and also program the device with this key value.

For WEP-40 networks, this implies the key is either 5 ASCII characters of 10 hex characters in length. For WEP-104 networks, this implies the key is either 13 ASCII characters or 26 hex characters in length. The console only accepts hex WEP keys. Therefore, the user must do the ASCII to hex conversion for their ASCII keys.

iwpriv psk <value>

32-byte hex value for the PSK.

This value can be calculated from the following website hosted on the Wireshark website.

iwpriv phrase <value>

An 8-63 ASCII character phrase (delimited with quotes if using spaces). This phrase will be used along with the SSID to generate the 32-byte PSK value for the network.

(22)

WIFI WEB SERVER MODULE

W TF SOCKET

USER’S GUIDE

Chapter 7. Contact Us

Sure Electronics Co., Ltd.

East zone, 3F, Building 6

Jingang Technology Innovation Center No.108 Ganjiabian Rd (ZIP: 210000) Qixia District

Nanjing P.R.China

Tel: +86-25-68154800-860 Fax: +86-25-68154891-832 Website: www.sure-electronics.com

Email: [email protected]

References

Related documents

Label Base Relay Board/Pigtails Power Cord I/O Module#1-4 WiFi Protocol Auxiliary Power - Sensor Mounting Sensor Option. Relay Board/Pigtails I/O Module#1-4 WiFi Protocol -

Use a computer or WiFi device to join the extender’s default WiFi network, then launch a web browser to set up the connection between the extender and a WiFi network (see Access

The client mode is similar with wireless network card, it is used for connecting WIFI hot spot signal or WIFI router, can make the devices without wireless function to join WIFI

(This refers to the WIFI side of the Nanostation) The Nano will automatically be assigned an IP address, gateway and DNS server by the WIFI access point you connect to later..

- Create a WiFi access point on the XWN5001 that has the same wireless settings as your router or gateway.. - Automatically connect your wireless client to the XWN5001 WiFi

For a device that is connected over WiFi, the WiFi network name (SSID) and WiFi security settings of the cable data gateway and WiFi computer must match exactly.. The default SSID

For a device that is connected over WiFi, the WiFi network name (SSID) and WiFi security settings of the modem router and WiFi computer must match exactly.. The default SSID

 Function: Set/Query SOCKB network protocol parameters. Setting is valid after reset.. If set as UDP SERVER, the module will save the IP address and port of the latest UDP