Microchip Technology MRF24W User’s Guide

Microchip MRF24W Getting Started
Guide for MRF24WB0MA/B,
MRF24WG0MA/B for MLA v5
2013 Microchip Technology Inc. DS52108A
Note the following details of the code protection feature on Microchip devices:
YSTEM
CERTIFIE DBYDNV
== ISO/TS16949==
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, K PICSTART, PIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MTP, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip T echnology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
Analog-for-the-Digital Age, Application Maestro, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, SQI, Serial Quad I/O, Total Endurance, TSHARC, UniWinDriver, WiperLock, ZENA and Z-Scale are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip T echnology Incorporated in the U.S.A.
GestIC and ULPP are registered trademarks of Microchip Technology Germany II GmbH & Co. & KG, a subsidiary of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2013, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-62076-981-2
EELOQ, KEELOQ logo, MPLAB, PIC, PICmicro,
32
logo, rfPIC, SST, SST Logo, SuperFlash
QUALITYMANAGEMENTS
DS52108A-page 2  2013 Microchip Technology Inc.
Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and T empe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC devices, Serial EEPROMs, microperipherals, nonvolatile memo ry and analog products. In addition, Microchip’s quality system for the desig n and manufacture of development systems is ISO 9001:2000 certified.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
Object of Declaration: Microchip MRF24W Getting Started Guide for Microchip
MRF24WBG0MA/B, MRF24WG0MA/B for MLA v5
2013 Microchip Technology Inc. Preliminary DS52108A-page 3
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
NOTES:
DS52108A-page 4 Preliminary  2013 Microchip Technology Inc.
MICROCHIP MRF24W GETTING
STARTED GUIDE FOR
MRF24WB0MA/B, MRF24WG0MA/B
FOR MLA V5
Table of Contents
Preface ...........................................................................................................................7
Chapter 1. Getting Started with MRF24WB0MA/B or MRF24WG0MA/B .................13
1.1 Overview ......................................................................................................13
1.2 Scope ...........................................................................................................13
1.3 Hardware ......................................................................................................13
1.4 Software .......................................................................................................14
1.5 References ...................................................................................................14
1.6 Common Terms and Definitions ...................................................................15
1.7 Local Network Topologies ............................................................................16
Chapter 2. Hardware Setup and Configuration ........................................................21
2.1 PICtail Setup ................................................................................................21
2.2 PICDEM.net 2 ..............................................................................................21
2.3 Explorer 16 and PIC32 Starter Kit ................................................................22
2.4 Connecting the Development Board ............................................................22
2.5 Wireless Access Point (AP) Setup ............................................................... 23
2.6 Serial Monitor Setup .....................................................................................27
Chapter 3. Software Setup and Configuration .........................................................29
3.1 Software Items to Install ...............................................................................29
3.2 Installing the Microchip MPLAB
3.3 Installing the Microchip MPLAB
3.4 Installing the Microchip TCP/IP Stack with MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi
3.5 Installing Interim Code Releases ..................................................................30
®
X IDE ....................................................... 29
®
XC/C18 Compiler .....................................29
®
Driver .............................................................30
Chapter 4. Sample Application Demonstrations ......................................................31
4.1 Basic Demonstration Applications ................................................................31
4.2 Walkthrough and Instructions on Running the Demonstration ..................... 32
4.3 Opening Existing Projects ............................................................................ 33
4.4 Hardware Configuration Options ..................................................................34
4.5 Compile-Time Configuration Options ........................................................... 35
4.6 Compiling and Downloading Images ............................................................47
4.7 Running TCP/IP – Demo App ......................................................................51
4.8 Running the TCPIP – WiFi Console .............................................................72
4.9 Running the TCPIP – WiFi EZConfig ........................................................... 78
Chapter 5. Microchip Development Board Specifics ............................................... 91
5.1 PICDEM.NET 2 Usage .................................................................................91
5.2 Explorer 16 Usage ........................................................................................91
5.3 Erasing EEPROM ......................................................................................... 92
2013 Microchip Technology Inc. Preliminary DS52108A-page 5
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
Appendix A. Appendix .................................................................................................93
A.1 Microchip Hardware ..................................................................................... 93
A.2 Microchip Software ......................................................................................93
A.3 MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi
®
Resources ......................... 93
A.4 Tools ............................................................................................................ 93
Worldwide Sales and Service .....................................................................................96
DS52108A-page 6 Preliminary  2013 Microchip Technology Inc.
MICROCHIP MRF24W GETTING
STARTED GUIDE FOR
MRF24WB0MA/B, MRF24WG0MA/B
FOR MLA V5

Preface

NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/ or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the document.
For the most up-to-date information on development tools, see the MPLAB Select the Help menu, and then Topics to open a list of available on-line help files.
®
IDE on-line help.
INTRODUCTION
This preface contains general information that will be useful to know before using the MRF24WB0MA/B and/or MRF24WG0MA/ B. Topics discussed in this preface include:
Document Layout
Conventions Used in this Guide
Warranty Registration
Recommended Reading
The Microchip Web Site
Development Systems Customer Change Notification Service
Customer Support
Document Revision History
DOCUMENT LAYOUT
This user’s guide describes how to use the Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5. The document is organized as follows:
Chapter 1. “Getting Started with MRF24WB0MA/B or MRF24WG0MA/B” – This chapter introduces the various wireless network topologies, terminologies, and a brief description of the hardware and software needed.
Chapter 2. “Hardware Setup and Con figuration” – This chap ter provid es information on how to set up the hardware to be used in the development environment.
Chapter 3. “Software Setup and Configuration ” – This chapter describes the software to be used in conjunction with the hardware.
Chapter 4. “Sample Ap plication Demon strations” – T his chapter descr ibes the various applications released in the TCP/IP stack MLA release.
2013 Microchip Technology Inc. Preliminary DS52108A-page 7
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
Chapter 5. “Micro chip Deve lopment Board Specifics” – This chapter provides the pin descriptions that interface the hardware platform to the MRF24W.
Appendix A – This appendix pro vides the web links to access the h ardware or software as described in this user guide.
DS52108A-page 8 Preliminary  2013 Microchip Technology Inc.
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB
Initial caps A window the Output window
Quotes A field name in a window or
Underlined, italic text with right angle bracket
Bold characters A dialog button Click OK
N‘Rnnnn A number in verilog format,
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
Italic Courier New A variable argument file.o, where file can be
Square brackets [ ] Optional arguments mcc18 [options] file
Curly braces and pipe character: { | }
Ellipses... Replaces repeated text var_name [,
Preface
®
IDE User’s Guide
Emphasized text ...is the only compiler...
A dialog the Settings dialog A menu selection select Enable Programmer
“Save project before build”
dialog A menu path File>Save
A tab Click the Power tab
4‘b0010, 2‘hF1 where N is the total number of digits, R is the radix and n is a digit.
Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’
any valid filename
[options]
Choice of mutually exclusive arguments; an OR selection
Represents code supplied by user
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
2013 Microchip Technology Inc. Preliminary DS52108A-page 9
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
WARRANTY REGISTRATION
Please complete the enclosed Warran ty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates. Interim software releases are availab le at th e Microchip web site.
RECOMMENDED READING
This user’s guide describes how to use MRF24WB0MA/B and/or MRF24WG0MA/B. The device-specific data sheets contain current information on programming the specific microcontroller or digital signal controller devices. Other useful documents are listed below. The following Microchip document s are available and recommended as supplemental reference resources:
MRF24WB0MA/MRF24WB0MB Data Sheet (DS70632) MRF24WG0MA/MB Data Sheet (DS70686)
To obtain any of these documents, visit Microchip web site at www.microchip.com.
DS52108A-page 10 Preliminary  2013 Microchip Technology Inc.
Preface
THE MICROCHIP WEB SITE
Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser , the web site contains the following information:
Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software
General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing
Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a spec ified product family or development tool of interest.
To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.
The Development Systems product group categories are:
Compilers – The latest information on Microchip C compile rs and other language tools. These include the MPLAB assemblers; MPLINK™ and MPLAB 16-bit object linkers; and MPLIB™ and MPLAB 16-bit object librarians.
Emulators – The latest information on the Microchip MPLAB REAL ICE™ in-circuit emulator.
In-Circuit Debuggers – The latest information on the Microchip in-circuit debugger , MPLAB ICD 3.
MPLAB IDE – The latest information on Microchip MPLAB IDE, the Windows Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB SIM simulator, MPLAB IDE Project Manage r and general editing and debugging features.
Programmers – The latest information on Microchip programmers. These include the MPLAB PM3 device programmer and the PICkit™ 3 deve lo pm e nt programmers.
®
C compiler; MPASM™ and MPLAB 16-bit
®
2013 Microchip Technology Inc. Preliminary DS52108A-page 11
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support Customers should contact their distributor, represent ative or field application eng ineer
(FAE) for support. Local sa les of fices ar e also available to help cu stomers. A listing of sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com.
DOCUMENT REVISION HISTORY
Revision A (January 2013)
This is the initial released version of the document
DS52108A-page 12 Preliminary  2013 Microchip Technology Inc.
MICROCHIP MRF24W GETTING
STARTED GUIDE FOR
MRF24WB0MA/B, MRF24WG0MA/B
FOR MLA V5

Chapter 1. Getting S tarted with MRF24WB0MA/B or MRF24WG0MA/B

1.1 OVERVIEW

MRF24WB0MA/B and MRF24WG0MA/B Wi-Fi® PICtail™ are the 802.11 module based boards for evaluating 802.11b/g wireless connectivity on the Microchip Technology’s processing platform. MRF24WB0MA/B and MRF24WG0MA/B Wi-Fi PICtail™ are the expansion boards that are compatible with the Explorer 16 and PICDEM™.NET 2 development boards.
• MRF24WB0MA/B supports only 802.11b (1 Mbps, 2 Mbps)
• MRF24WG0MA/B supports both 802.11b and 802.11g
802.11b, ratified in 1999 is an extension of 802.11 that uses the same 2.4 GHz
frequency band, and supports two additional transmission rates, 5.5 Mbps and 11 Mbps along with existing 1 Mbps and 2 Mbps.
802.11g, ratified in 2003 is backward compatible with 802.11b, and supports the
additional transmission rates of 6 Mbps, 9 Mbps, 12 Mbps, 18 Mbps, 24 Mbps, 36 Mbps, 48 Mbps and 54 Mbps.
®

1.2 SCOPE

The Getting Started Guide covers these topics:
• MLA v5 based releases
• MPLAB

1.3 HARDWARE

The following are required for developing or evaluating of the Microchip MRF24WB0MA/B and MRF24WG0MA/B Wi-Fi
• MRF24WB0MA/MB or MRF24WG0MA/B Wi-Fi
• One of the following Microchip hardware development platforms:
- Explorer 16 Development Board (PIC24 or PIC32 depending on the
- PICDEM.Net2 (PIC18)
- PIC32 Starter Kit and I/O Expansion Board
• One of the following Microchip development tools:
- MPLAB Real ICE
- MPLAB ICD
- PICKit™ 3 programmer with AC164110 RJ11 to ICSP adapter
• Power supply (different hardware configurations have different power require­ments. Use the AC power adapter that comes along with the kit)
®
X IDE
personality module)
®
module 802.11b/g solution:
®
PICtail™
2013 Microchip Technology Inc. Preliminary DS52108A-page 13
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
• 802.11 access point (AP) (b, b/g, or b/g/n) required for using the development board in Infrastructure BSS mode
- Linksys WRT54G or WRT54G2 is recommended, and it is used as a re fer-
ence in this document. If other types of APs are used, the approach remains similar and user must refer to the APs operating manual.

1.4 SOFTWARE

This user’s guide consists of sections on installing the Microchip MPLAB X IDE, the Microchip MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi
®
SDK and TCP/IP stack, and the necessary changes to configure the demonstration software for networks with different characteristics apar t from the defau lt settings . Refer to Appendix A, for direct links to the specific Microchip software you may require for your project. The latest Microchip documentation is available on the Microchip web site, and t akes precedence over software bundles on the installation CD. The latest MRF24WB0MA/B and MRF24WG0MA/B Wi-Fi
®
documentation is available on the Microchip Wi-Fi® support web site (http://www.microchip.com/pagehandler/en-us/technology/wifi), and is the most accurate.
This user’s guide documents how to configure the wireless network by hard coding the network parameters into the software, then compiling, and storing this information on the Microchip MCU. The software uses the C function calls to modify the values in variables used to keep the configurations. Customer application code can therefore create a user interface that allows scanning for networks and then configuring based on the end users selection. As an example of using the variables, the included demonstration projects have a num ber of source files to allow run-time configuration of the networks (for example, select Ad hoc or Infrastructure network type, change the SSID, change the security methods and keys, and so on).
The required software installation to build the project are:
• Microchip MPLAB
®
XC compiler
• Microchip MPLAB C18 compiler (PICDEM.Net 2 and PIC18)
• Microchip MPLAB X IDE Refer to Appendix A, for download information.

1.5 REFERENCES

For more information, refer to the following:
• Microchip TCP/IP Stack Help
The help file comes with the TCP/IP source code releases.
DS52108A-page 14 Preliminary  2013 Microchip Technology Inc.

1.6 COMMON TERMS AND DEFINITIONS

TABLE 1-1: COMMON TERMS AND DEFINITIONS
Parameter Description
STA Station (local station) is a device on the network, typically refer to a wireless
device. This can be a laptop, PC, or the Microchip development board with MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® PICtail.
LAN Local area network (LAN) is a collection of computers communicating to each
other. LAN consists of two devices communicating through a wireless access point (AP) or router (see Figure 1-1). Local networks can communicate to each other, or, with a WAN (internet) connection, and they can communicate to other networks over the internet.
AP Wireless access point (AP) is a device that creates a wireless network that
multiple wireless devices can connect to. When connected to a wired network, wired and wireless devices can communicate with each other. Typically, most APs and routers come as a single unit, making the connection between wired, wireless and internet seamless.
Router
DHCP Dynamic host configuration protocol (DHCP) is an application layer protocol
OUI
MAC address Media access control address is a unique identifier to each device on a
BSS Basic service set is the basic building block of a wireless LAN. This usually
IBSS Independent basic service set is a network with no controlling AP. The first
SSID Service set identifier is a name for the wireless network. WEP Wired equivalent privacy is an encryption mechanism for wireless networks.
WPA WiFi protected access is the implementation of the IEEE 802.1 1i specification.
WAN Wide area network is a network that connects other networks (LANs)
MCU Microcontroller unit. In the case of this demonstration, this will either be PIC18
Router is a network device th at directs an d forwards traffic. Generally , a router and an AP are combined together, so that wired and wireless devices can communicate to each other.
that manages the IP network. This reduces the amount of manual intervention required when putting a new device on the network. To connect to a network, you are provided with an IP address by the DHCP server.
Organizationally unique identifier is a 24-bit number (3 bytes) that composes the first three bytes (octets) of the six byte MAC address. The OUI is managed by the IEEE. The OUI that identifies MRF24WB0MA/B or MRF24WG0MA/B is 00:1E:C0. With each OUI, you are guaranteed 224 unique combinations that can be used for device identification.
network. For a given OUI, there can be 224 uniquely programmed MAC addresses.
consists of an AP, with one or more wireless stations. This is commonly referred to as Infrastructure mode.
device to start the network will broadcast the SSID, and other local stations can join. This is commonly referred to as Ad hoc mode.
Most APs implement two different flavors of WEP, 64-bit WEP (WEP-40) and 128-bit WEP (WEP-104). Several failings have been identified in WEP, resulting in easily hackable and insecure networks. WEP is no longer recommended for use, except as required to interface with legacy equipment that cannot support WPA/WPA2.
It is considered a secure alternative to WEP.
together. The most famous WAN is the internet.
(PICDEM.net 2), PIC24 (Explorer 16), or PIC32 (Explorer 16).
Introduction
2013 Microchip Technology Inc. Preliminary DS52108A-page 15
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5

1.7 LOCAL NETWORK TOPOLOGIES

1.7.1 Infrastructure Basic Service Set (BSS)

A common example of a local network operating in Infrastructure mode is shown in
Figure 1-1.
FIGURE 1-1: INFRASTRUCTURE BSS NETWORK
Figure 1-1 illustrates a laptop computer and the Microchip development board with
MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi
®
PICtail™ communicating with each other through a wireless AP and router. This network can gain access to the internet if the router is connected to a WAN.
DS52108A-page 16 Preliminary  2013 Microchip Technology Inc.
Introduction

1.7.2 Independent BSS (IBSS) or Ad hoc Network

Another example of a common local network is the ad hoc (IBSS) network, see Figure 1-2.
FIGURE 1-2: IBSS OR AD HOC NETWORK
The Microchip development board with MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi PICtail™ is the first station to broadcast when creating the network, see Figure 1-2. In this case, join the laptop to the ad hoc network after the deve lopmen t board has gon e through the steps of setting up the ad hoc network. The security mode supported is Open mode and WEP security. According to specifications, ad hoc network only sup­ports 802.11b rates of 1 Mbps, 2 Mbps, 5.5 Mbps and 11 Mbps. Most Andr oid devices do not support ad hoc network.
®
2013 Microchip Technology Inc. Preliminary DS52108A-page 17
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5

1.7.3 WiFi Direct (Peer-to-Peer (P2P)) Network

Figure 1-3 provides a typical example of local network, WiFi Direct (peer-to-peer (P2P))
network. WiFi Direct does not support 802.11b, therefore only MRF24WG0MA/B Wi-
®
Fi
PICtail™ can support such network types.
FIGURE 1-3: WIFI DIRECT (PEER-TO-PEER P2P) NETWORK
WiFi Direct allows you to configure a secured wireless network between several devices, such as smart devi ces, laptop s or computers with wireless network ad apters, without using an AP. WiFi Direct supports WiFi Protected Setup (WPS) connection method, which is known as the WSC (WiFi Simple Configuration) Config Methods in the Wi-Fi Peer-to-Peer (P2P) Technical Specifications, in particular WPS Push Button method with WPA2.
From the negotiation process, each device will determine which devices become group owner (GO) or group client (GC). The “GroupOwnerIntent” field in the P2P information element (IE) will indicate the level of desire to become the GO. The higher the value, the higher the desire to be the GO. Since MRF24WG0MA/B supports the role of GC only , it implies
GroupOwnerIntent=0 (P2P IE). Within each WiFi Direct network, there
can be only one GO, similar to only single AP in the infrastructure network.
DS52108A-page 18 Preliminary  2013 Microchip Technology Inc.
Introduction

1.7.4 SoftAP Network

Figure 1-4 provides a typical example of common local network, software enabled AP
(SoftAP) network. Current RF module firmware version only has the MRF24WG0MA/ B Wi-Fi
FIGURE 1-4: SOFTAP NETWORK
®
PICtail™ programmed to support this network type.
SoftAP functions can be used to extend wireless coverage and share internet connection with others.
2013 Microchip Technology Inc. Preliminary DS52108A-page 19
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
NOTES:
DS52108A-page 20 Preliminary  2013 Microchip Technology Inc.

Chapter 2. Hardware Setup and Configuration

2.1 PICTAIL SETUP

The MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® PICtail™ can be plug into either the PICtail Plus (Explorer 16) using the card edge connector or the PICtail slot (PICDEM.net 2) using the pin header on the development board, see Figure 2-1.
MICROCHIP MRF24W GETTING
STARTED GUIDE FOR
MRF24WB0MA/B, MRF24WG0MA/B
FOR MLA V5
FIGURE 2-1: MRF24WB0MA/B OR MRF24WG0MA/B WI-FI
When inserting the PICtail into the development board, orient the PICtail with the module facing the microcontroller.

2.2 PICDEM.NET 2

The PICDEM.net 2 can be used to demonstrate wireless functionality by connecting the PICtail with header J1 on the PICtail inserted into connector J5 on the PICDEM.net 2 Development Board, see Figure 2-2.
®
PICTAIL™
FIGURE 2-2: PICDEM.NET2 DEVELOPMENT BOARD WITH
MRF24WB0MA/B OR MRF24WG0MA/B WI-FI
2013 Microchip Technology Inc. Preliminary DS52108A-page 21
®
PICTAIL™
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5

2.3 EXPLORER 16 AND PIC32 STARTER KIT

The Explorer 16 and PIC32 Starter Kit can be used to demonstrate wireless functionality by connecting the PICtail with header J1 on the PICtail inserted into the top slot of connector J5 (Explorer 16) or J4 (I/O Exp ansion Board) on the PIC32 S tarter Kit boards, see Figure 2-3.
FIGURE 2-3: EXPLORER 16 AND PIC32 STARTER KIT WITH
MRF24WB0MA/B OR MRF24WG0MA/B WI-FI

2.4 CONNECTING THE DEVELOPMENT BOARD

Warning:The boards in this kit are highly sensitive to electrostatic discharge (ESD).
Maintain ESD practice while in contact with the boards.
Perform the following actions to connect the develop m en t bo ar d:
1. Connect RJ1 1 cab le (grey phon e cable) from the RJ11 port on the devel opment
board to the ICD.
2. Applicable only to Explorer 16 and PICDEM.Net2:
Connect the serial cable to the serial port (UART port) of the development board and to the serial port (COM port) on the PC (typically, the default port on the PC is COM 1, but the default number may differ from PC to PC). This is required to monitor the debug messages from the MLA TCP/IP software stack. Refer to
2.6 “Serial Monitor Setup”, for more information on setting up the serial
connection.
3. Connect the USB cable from the ICD to the PC.
4. Power-up the development board.
5. Power on the AP or router, and connect the PC to the AP or router with an
Ethernet cable. If a wireless laptop (PC) is used, associate the computer with the correct SSID of the wireless AP.
®
PICTAIL™
DS52108A-page 22 Preliminary  2013 Microchip Technology Inc.
Hardware Setup and Configuration

2.5 WIRELESS ACCESS POINT (AP) SETUP

The following sections provide the settings and configuration options for the Linksys WRT54G2 Wireless-G Broadband Router. In this scenario, the terms “access point” and “router” are synonymous, and refer to the combination of these two networking parts as a single unit. The graphics in this section are specific to this p articular AP. The concepts and items that need to be configured should be identical if a different AP is used.
Accessing the AP Configuration Pages
Main AP Configuration Page
Setting up the Wireless AP

2.5.1 Accessing the AP Configuration Pages

Figure 2-4 shows the web interface to the AP. These web pages can be viewed from
any web browser . Enter the IP address of the AP, for example http://192.168.1.1, in the URL. The Linksys WRT54G2 Wireless-G Broadband Ro uter uses the IP address, http:/ /192.168.1.1.
When prompted with the authentication text box, leave the “User Name:” field blank, and use “admin” as the password in the “Password:” field.
The IP address of the AP and configurations or set tings may vary for each mod el. Refer to the access point operating manual, for more information.
FIGURE 2-4: ACCESS POINT LOGIN
2013 Microchip Technology Inc. Preliminary DS52108A-page 23
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5

2.5.2 Main AP Configuration Page

After authenticating with AP, the configuration page will be displayed. The settings on the configuration page are for configuring th e router po rtion of the system. Most of the default settings are pre-programmed and enough for the demo nstration. By default, the WRT54G router acts as a DHCP server. For the demonstration, consider AP as the DHCP server, as shown in Figure 2-5.
FIGURE 2-5: AP CONFIGURATION PAGE
DS52108A-page 24 Preliminary  2013 Microchip Technology Inc.
Hardware Setup and Configuration

2.5.3 Setting up the Wireless AP

1. To set up wireless AP, Click Wireless tab at the top of the screen.
2. Either Figure 2-6 or Figure 2-7 will be displayed. If Figure 2-6 is displayed, click Manual radio button and Figure 2-7 will be displayed. Figure 2-7 shows the basic wireless settings required for the demonstrations.
FIGURE 2-6: WI-FI PROTECTED SETUP (WPS)
2013 Microchip Technology Inc. Preliminary DS52108A-page 25
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
FIGURE 2-7: BASIC WIRELESS SETUP
Table 2-1 provides a summary of the options that is required for the basic wireless
settings and its expected values.
Table 2-1: Wireless Settings
Option Value/Setting
Wireless network name (SSID) MicrochipDemoAP or MicrochipDemoAP_123
(case sensitive), or any desired SSID network
name Wireless channel Either channel 1, 6 or 11 Wireless network mode Either mixed mode (b and g service) or B-only
3. After the set up, click Save Settings button. The AP should confirm that the set­tings have been saved successfully to set up the AP for the demonstrations. For experimenting with wireless security modes, refer to 4.5.7.1 “Wired Equivalent
Privacy (WEP)” or 4.5.8 “WPA/WPA2”.
DS52108A-page 26 Preliminary  2013 Microchip Technology Inc.
Hardware Setup and Configuration

2.6 SERIAL MONITOR SETUP

The Serial Monitor Setup is applicable for Explorer 16 and PICDEM.Net2 development boards. The MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi send status information to the serial UART port on the Microchip development board that is useful for debugging. This section provides detailed information on setting up a terminal session to view this output by using “Hyper T erminal” as an example. The same approach is used for other serial port monitors such as Tera Term and so on.
®
PICtail™ displays and

2.6.1 To Set up Serial Monitor

1. Launch HyperTerminal from the Run from the Windows Start menu or directly
from the Windows Start menu, se e Figure 2-8.
FIGURE 2-8: STARTING HYPERTERMINAL FROM RUN DIALOG
2. Name the connection and press OK, see Figure 2-9.
FIGURE 2-9: HYPERTERMINAL NAME SETUP
2013 Microchip Technology Inc. Preliminary DS52108A-page 27
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5
3. Select the COM port as the listening port. Generally, the COM port will be COM1, check the system to ensure correct port is selected and then press OK, see
Figure 2-10.
FIGURE 2-10: COM PORT CONNECTION
4. Choose communication port parameters and then press OK, see Figure 2-11.
FIGURE 2-11: COM COMMUNICATION SETTINGS
5. After the serial port monitor is set up it will print the messages from the MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi
DS52108A-page 28 Preliminary  2013 Microchip Technology Inc.
®
PICtail™.
MICROCHIP MRF24W GETTING
MRF24WB0MA/B, MRF24WG0MA/B

Chapter 3. Software Setup and Configuration

3.1 SOFTWARE ITEMS TO INSTALL

The following are required to install the software:
• Microchip MPLAB Integrated Development Environment (MPLAB
• Microchip MPLAB
(PIC18)
• Microchip TCP/IP stack installer (which contains the MRF24WB0MA/B or
MRF24WG0MA/B Wi-Fi
Note 1: Microchip In-circuit Debugger, for example ICD 3 or REAL ICE™ driver
is embedded with the MPLAB X IDE installation.
2: The screenshots provide references to older versions of the MPLAB X
IDE, and older compiler and TCP/IP stack versions. These screenshots are for visual cues only, and the latest versions should be installed from the Microchip web site.
®
XC compiler (PIC24/32) and Microchip MPLAB C18 Compiler
®
driver)
STARTED GUIDE FOR
FOR MLA V5
®
X IDE)

3.2 INSTALLING THE MICROCHIP MPLAB® X IDE

The path to the MPLAB X IDE is available on the Microchip web site, see
A.2 “Microchip Software”. After downloading the installer, execute the setup file and
follow the GUI instructions for installing the MPLAB X IDE on your computer. Restart the computer after the installation.

3.3 INSTALLING THE MICROCHIP MPLAB® XC/C18 COMPILER

Different versions of the MPLAB XC compiler for different PIC microprocessors are available. For PICDEM.net 2 Development Board, the C18 compiler for PIC18 MCUs is required. For Explorer 16 Development Board, either the XC16 compiler for PIC24/ dsPIC or the XC32 compiler for PIC32 devices is required.
Microchip offers evaluation copies of the compilers (student versions) that can be downloaded from the Microchip web site, refer to A.2 “Microchip Software”. After downloading the installer, run through the setup to install the compiler on your system.
2013 Microchip Technology Inc. Preliminary DS52108A-page 29
Loading...
+ 67 hidden pages