Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 2013 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices: • 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.
Object of Declaration: Microchip MRF24W Getting Started Guide for Microchip MRF24WBG0MA/B, MRF24WG0MA/B for MLA v5 2013 Microchip Technology Inc.
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 ....................................................................
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.
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.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 • Chapter 5. “Microchip Development Board Specifics” – This chapter provides the pin descriptions that interface the hardware platform to the MRF24W. • Appendix A – This appendix provides the web links to access the hardware or software as described in this user guide. DS52108A-page 8 Preliminary 2013 Microchip Technology Inc.
Preface CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Represents Examples Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB® IDE User’s Guide ...is the only compiler...
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 WARRANTY REGISTRATION Please complete the enclosed Warranty Registration Card and mail it promptly. Sending in the Warranty Registration Card entitles users to receive new product updates. Interim software releases are available at the Microchip web site. RECOMMENDED READING This user’s guide describes how to use MRF24WB0MA/B and/or MRF24WG0MA/B.
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.
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, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers.
MICROCHIP MRF24W GETTING STARTED GUIDE FOR MRF24WB0MA/B, MRF24WG0MA/B FOR MLA V5 Chapter 1. 1.1 Getting Started with MRF24WB0MA/B or MRF24WG0MA/B 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.
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 reference in this document. If other types of APs are used, the approach remains similar and user must refer to the APs operating manual. 1.
Introduction 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.
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.
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 development board has gone through the steps of setting up the ad hoc network.
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 WiFi® PICtail™ can support such network types.
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® PICtail™ programmed to support this network type. FIGURE 1-4: SOFTAP NETWORK SoftAP functions can be used to extend wireless coverage and share internet connection with others. 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 NOTES: DS52108A-page 20 Preliminary 2013 Microchip Technology Inc.
MICROCHIP MRF24W GETTING STARTED GUIDE FOR MRF24WB0MA/B, MRF24WG0MA/B FOR MLA V5 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 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 Expansion Board) on the PIC32 Starter Kit boards, see Figure 2-3. FIGURE 2-3: 2.
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 particular AP. The concepts and items that need to be configured should be identical if a different AP is used.
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 the router portion of the system. Most of the default settings are pre-programmed and enough for the demonstration. 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.
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.
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.
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® PICtail™ displays and 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 “HyperTerminal” as an example.
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.
MICROCHIP MRF24W GETTING STARTED GUIDE FOR MRF24WB0MA/B, MRF24WG0MA/B FOR MLA V5 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® X IDE) • Microchip MPLAB® XC compiler (PIC24/32) and Microchip MPLAB C18 Compiler (PIC18) • Microchip TCP/IP stack installer (which contains the MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® driver) 3.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 3.4 INSTALLING THE MICROCHIP TCP/IP STACK WITH MRF24WB0MA/B OR MRF24WG0MA/B WI-FI® DRIVER The TCP/IP stack and MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® driver is available in two different forms: • CDROM disc • Download from Microchip web site (www.microchip.com) A CDROM disc with the installer is bundled with the development kit provided by MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® Wireless.
MICROCHIP MRF24W GETTING STARTED GUIDE FOR MRF24WB0MA/B, MRF24WG0MA/B FOR MLA V5 Chapter 4. Sample Application Demonstrations The development environment is equipped with three out-of-the-box WiFi demonstrations to showcase the MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® module. More demonstrations and features may be added in the future. These demonstrations are illustrated based on Microsoft Windows® OS and the Linksys WRT54G2 Wireless-G Broadband Router. The concepts remain the same for different OS or router.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.1.2 TCPIP – WiFi Console TCP/IP – WiFi Console is a throughput performance demonstration using a tool called Iperf, which is a commonly used networking test tool. Iperf will allow you to measure the throughput bandwidth on the WiFi link for both receive and transmit. Supported network types for TCP/IP - WiFi Console: • CFG_WF_INFRASTRUCTURE • CFG_WF_ADHOC • CFG_WF_P2P (applicable only for MRF24WG0MA/B) 4.1.
Sample Application Demonstrations 4.3 OPENING EXISTING PROJECTS This section describes the TCP/IP demonstration application running on an Explorer 16 Development Board with a PIC24/32 PIM module installed. The configuration, compile and downloading of the code image to the PIC MCUs is the same for all of the development boards, MCUs and demonstration applications. After starting the MPLAB X IDE, the user can open an existing project. 4.3.1 To Open an Existing Project 1.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.4 HARDWARE CONFIGURATION OPTIONS Depending on the development board used, the relevant hardware profile header file must be changed to match the configuration of the slot on which the PICtail is plugged into. For Explorer 16 with XC32 configurations, the hardware profile header file is HWP EX16_MRF24W XC32.h. Ensure that the selected SPI option (MRF24W_IN_SPI1 or MRF24W_IN_SPI2) matches the development board’s setup.
Sample Application Demonstrations 4.5 COMPILE-TIME CONFIGURATION OPTIONS The following files contain most of the compile-time options for the demonstrations: • TCPIP MRF24W.h, located in the Configs sub folder within individual demonstrations. For example, \TCPIP\Demo App\Configs\TCPIP MRF24W.h. • WF_Config.h, located within the individual demonstrations. For example: \TCPIP\Demo App\WF_Config.h These files can be viewed within the MPLAB X IDE using the file navigator. 4.5.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.5.2 Static IP Address By default, the demonstrations use DHCP and rely on the DHCP server in the AP or router to give the development board an IP address on the network. 4.5.2.1 TO ENABLE THE USE OF A STATIC IP ADDRESS 1. The selected static IP address must be on the same subnet as the AP. By default, the Linksys WRT54G manages IP addresses on the subnet 192.168.1.x (192.168.1.1 is for AP). The IP address above 192.168.
Sample Application Demonstrations FIGURE 4-6: SETTING UP STATIC IP ADDRESS 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.5.
Sample Application Demonstrations FIGURE 4-7: CHANNEL SETUP Depending on the selected domain (regions), the available channels vary. Refer to WFApi.h for detailed definitions, see Example 4-1.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.5.5 Ad hoc Network Configuration Changing to ad hoc (IBSS) network can be done at compile-time, the MY_DEFAULT_ NETWORK_TYPE can be changed to CFG_WF_ADHOC, see Figure 4-8. FIGURE 4-8: SOURCE CODE AD HOC SETTINGS 4.5.
Sample Application Demonstrations FIGURE 4-9: WPS AND SECURITY METHODS 4.5.7 Wireless Security 4.5.7.1 WIRED EQUIVALENT PRIVACY (WEP) Note: Several disadvantages are identified in WEP, which results in hackable and insecure networks. The use of WEP has been superceded by WPA/WPA2. WEP security has two forms: 64-bit WEP, which uses a 40-bit key (WEP-40) and 128bit WEP, which uses a 104-bit key (WEP-104). In the basic form, WEP keys have hexadecimal values, 5 bytes for WEP-40 and 13 bytes for WEP-104.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.5.7.2 SETUP ACCESS POINT FOR WEP 1. Login to the router, see instructions in 2.5 “Wireless Access Point (AP) Setup”. 2. To access the wireless security options Wireless>Wireless Security, see Figure 4-10. FIGURE 4-10: 64-BIT WEP SECURITY SETUP 3. To match the default code in the hardware, choose security features as shown in Figure 4-11 (depending on whether 64-bit WEP or 128-bit WEP is used).
Sample Application Demonstrations 4.5.7.3 SETUP SOURCE CODE FOR WEP After the AP is configured for WEP, user must program the development board to use WEP. Configure the following for WEP, and it is located in WF_Config.h. For more information, see Figure 4-12. • Set the encryption type to WEP-40 or WEP-104. Define MY_DEFAULT_WIFI_SECURITY_MODE to either WF_SECURITY_WEP_40 or WF_SECURITY_WEP_104 • Set the WEP phrase. Refer to MY_DEFAULT_WEP_KEYS_40 or MY_DEFAULT_WEP_KEYS_104.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.5.8.1 TO SET UP AP FOR WPA/WPA2 PERSONAL 1. Login to the router, refer instructions in the 2.5 “Wireless Access Point (AP) Setup”. 2. Access the wireless security options by Wireless>Wireless Security. For WPA Personal, see Figure 4-13. For WPA2 Personal, use WPA algorithm (AES) only see Figure 4-14. 3. To match the default code in the hardware, set up the security as shown in Figure 4-13 and Figure 4-14.
Sample Application Demonstrations 4.5.9 Setup Source Code for WPA/WPA2 The MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® PICtail™ has the following two approaches to run WPA/WPA2 security: • On-the-fly PSK Calculation - The straight forward approach to supply the passphrase. The PIC18/24/32 or PICtail will calculate the PSK based on the SSID and the supplied passphrase. Due to the computationally intensive nature of this operation, this will take approximately 30 seconds to 45 seconds to complete.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.5.9.2 PRE GENERATED PSK Users can pre generate the PSK and use 32 byte PSK in the source code. The handy tool to generate the PSK is available online at the Wireshark Foundation (see Appendix A.4). The Wireshark web site can generate the expected 32 byte PSK key with the SSID name and the passphrase. Use these values in the variable MY_DEFAULT_PSK in WF_Config.h. For more information, see Figure 4-16.
Sample Application Demonstrations 4.6 COMPILING AND DOWNLOADING IMAGES 1. From the left pane, under Device select appropriate Compiler development board PICtail combination and PIC microprocessor, see Figure 4-17. FIGURE 4-17: PIC MICROPROCESSOR AND COMPILER-DEVELOPMENT BOARD-PICTAIL COMBINATION 2. To change the device type, click Project Properties, see Figure 4-18. The Project Properties sub panel is displayed. FIGURE 4-18: PROJECT PROPERTIES ICON 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 3. Select the device type, as shown in Figure 4-19. FIGURE 4-19: CHANGE DEVICE TYPE 4. Click Debug menu and select Debug Project command to compile, build, connect to the ICD, detect the target device, program the target device and run, see Figure 4-20. DS52108A-page 48 Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations FIGURE 4-20: DEBUG PROJECT 5. Monitor the Demo App (Build, Load, …) tab under the Output window in the MPLAB X IDE to view compiler errors or warnings. When the compilation has completed and built correctly, the output is shown in Figure 4-21. FIGURE 4-21: BUILD SUCCESSFUL. LOADING COMPLETED. 6. Monitor the ICD3 tab under the Output window in MPLAB X IDE to view the target being detected and programmed, the output is shown in Figure 4-22.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-22: DS52108A-page 50 SUCCESSFUL PROGRAMMING Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations 4.7 RUNNING TCP/IP – DEMO APP This is applicable only for Explorer 16 and PICDEM.net2 Development Boards as the PIC32 starter kit does not use the EEPROM. Due to this, you may notice situations where you have made changes in the code that are not reflected during the demonstration (for example, you changed the SSID name, but do not see it is being used), and user must erase the EEPROM, refer to 5.3 “Erasing EEPROM”. For the first time demonstration, perform these actions.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-24: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: INFRASTRUCTURE NETWORK TYPE 3. Navigate to the upload page of the development board. On computer 2s web browser, type http://xxx.xxx.xxx.xxx/mpfsupload, where xxx.xxx.xxx.xxx is the IP address of the development board, see Figure 4-25. Note: This is only required for the PICDEM.net 2 and the Explorer 16 Development Board.
Sample Application Demonstrations 4. Click Browse button to upload the MPFSImg2.bin file, and this file is located in the root directory of the TCPIP-Demo App directory. If all the softwares are installed in the default location, the directory path will be C:\Microchip Solutions vyyyy-mm-dd\TCPIP\Demo App\. 5. Open the MPFSImg2.bin file and click Upload button to upload the file. 6. After the successful uploading, “MPFS Update Successful” message will be displayed, see Figure 4-26.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-27: TCPIP – DEMO APPLICATION (COMPUTER 2) 8. The TCP/IP WiFi demonstration application enable users to understand features and applications that are available with the Microchip TCP/IP stack, and how it can be used on wireless medium. From the web main page, user can interact with the development board hardware to toggle LEDs, push buttons and change potentiometer values.
Sample Application Demonstrations FIGURE 4-28: TCPIP – DEMO APPLICATION: TOGGLING LEDS AND LCD (COMPUTER 2) FIGURE 4-29: TCPIP – DEMO APPLICATION: LEDS AND LCD ON DEVELOPMENT BOARD 10. Other web pages of the demonstration allow you to send e-mails, upload files and change network configuration values. Refer to the Microchip TCP/IP Stack Help.chm document that is part of the TCP/IP Stack source code release. 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.7.2 Network Type: CFG_WF_ADHOC The security mode supported by MRF24WB0MA/B and MRF24WG0MA/B is Open mode and WEP security. In the following example, open security is used. In the WF_Config.h file, perform these actions: 1. Define the MY_DEFAULT_NETWORK_TYPE as CFG_WF_ADHOC. 2. Ensure that the MY_DEFAULT_SSID_NAME is defined to be unique and different from the SSID name used in the CFG_WF_INFRASTRUCTURE.
Sample Application Demonstrations FIGURE 4-31: DEVELOPMENT BOARD SERIAL DISPLAY: AD HOC NETWORK TYPE 4. After the development board is connected to another device, the LCD panel will display new IP address, see Figure 4-32. Alternately, the serial output also displays similar information, see Figure 4-31. FIGURE 4-32: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 5. On the smart device, select the menu settings to view the WiFi networks detected, see Figure 4-33. FIGURE 4-33: WIFI NETWORKS DETECTED ON SMART DEVICE 6. Click on the ad hoc network SSID to connect to this ad hoc network, as shown in Figure 4-34. FIGURE 4-34: DS52108A-page 58 SELECT AD HOC NETWORK ON SMART DEVICE Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations 7. After connection to this ad hoc network is established, user can enter IP address of the ad hoc network (for example, 169.254.52.38) on the smart device’s web browser. The demonstration is similar to the infrastructure network type. For example, when user presses any of the buttons (S1 through S4) on the development board, the web page will display the same buttons being pressed, see Figure 4-35. FIGURE 4-35: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.7.3 Network Type: CFG_WF_P2P WiFi Direct (peer-to-peer (P2P)) network type is only applicable for 802.11g hence specific to MRF24WG0MA/B modules. The Samsung Galaxy tablet is used in this demonstration. Figure 4-36 illustrates the WiFi Direct environment setup. FIGURE 4-36: WIFI DIRECT ENVIRONMENT SETUP The implementation is restricted to the role of group client (GC) only. In the WF_Config.
Sample Application Demonstrations FIGURE 4-37: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: WIFI DIRECT NETWORK TYPE 6. On the smart device, enable WiFi Direct mode, see Figure 4-38. FIGURE 4-38: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 7. The smart device will prompt a message to Accept or Decline the device. Click to accept the connection request, see Figure 4-39. FIGURE 4-39: SMART DEVICE PROMPT TO ACCEPT OR REJECT CONNECTION REQUEST 8. The development board will display the successful connection status, as shown in Figure 4-40. FIGURE 4-40: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: WIFI DIRECT CONNECTION STATUS 9.
Sample Application Demonstrations FIGURE 4-41: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.7.4 WPS Connection Method An AP that supports WPS is used in this demonstration. Figure 4-42 illustrates the WPS environment setup. FIGURE 4-42: 4.7.4.1 WPS ENVIRONMENT SETUP WPS METHOD: WF_SECURITY_WPS_PUSH_BUTTON In the WF_Config.h file, perform these actions: 1. Define the MY_DEFAULT_NETWORK_TYPE as CFG_WF_INFRASTRUCTURE. 2. Define the MY_DEFAULT_WIFI_SECURITY_MODE as WF_SECURITY_WPS_PUSH_BUTTON. 3.
Sample Application Demonstrations FIGURE 4-43: Note: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: WPS PUSH BUTTON The development board with the MRF24WG0MA/B PICtail, by default, has the Push button already pressed. For an actual product based on the MRF24WG0MA/B PICtail, the user will need to be prompted to press the Push button. 5. On the AP or router settings, select WPS mode, and then click the Push button to initiate the WPS procedure. 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-44: ACCESS POINT/ROUTER WPS PUSH BUTTON METHOD 6. The AP will search and connect to the client devices, see Figure 4-45 and Figure 4-46. FIGURE 4-45: DS52108A-page 66 ACCESS POINT/ROUTER IN SEARCH MODE Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations FIGURE 4-46: ACCESS POINT/ROUTER FOUND AND CONNECTING TO DEVELOPMENT BOARD 7. After the development board has established the connection, the AP prompts the message as shown in Figure 4-47. FIGURE 4-47: ACCESS POINT/ROUTER WPS PUSH BUTTON METHOD: SUCCESSFUL CONNECTION 8. Click OK. 9. The serial output will display the connection details as shown in Figure 4-48. 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-48: DS52108A-page 68 DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: WPS PUSH BUTTON Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations 4.7.4.2 WPS METHOD: WF_SECURITY_WPS_PIN In the WF_Config.h file, perform these actions: 1. Define the MY_DEFAULT_WIFI_SECURITY_MODE as WF_SECURITY_WPS_PIN. 2. Define the MY_DEFAULT_WPS_PIN to be used, and this needs to be an exact match to the AP/router PIN, for example, 12390212. 3. Define the MY_DEFAULT_SSID_NAME to be same as the AP or router’s SSID. 4. After the development board is powered up and running, the UART output will display the message shown in Figure 4-49.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-50: ACCESS POINT/ROUTER WPS PIN METHOD 6. The AP or router will search for the development board, and report the status of the successful connection, as shown in Figure 4-51. FIGURE 4-51: DS52108A-page 70 ACCESS POINT/ROUTER WPS PIN METHOD: SUCCESSFUL CONNECTION Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations 7. After AP or router accepts the connection request, the development board will display the status as connection successful, see Figure 4-52. FIGURE 4-52: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.8 RUNNING THE TCPIP – WIFI CONSOLE This demonstration supports the following network types: • CFG_WF_INFRASTRUCTURE • CFG_WF_ADHOC • CFG_WF_P2P. This section only elaborates the CFG_WF_INFRASTRUCTURE network type. Refer to 4.1.1 “TCPIP – Demo App”, for more information on the CFG_WF_ADHOC and CFG_WF_P2P network types.
Sample Application Demonstrations 3. After installing Iperf, on the computer open a command prompt either running the cmd.exe from the “Run” dialog (see Figure 4-54) or by selecting it from the All Programs menu (see Figure 4-55). FIGURE 4-54: OPENING A COMMAND PROMPT FROM RUN DIALOG FIGURE 4-55: OPENING A COMMAND PROMPT FROM PROGRAMS MENU 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4. To run Iperf, user must know the IP address of the development board and the computer (server and client). The IP address of the development board can be viewed on the LCD or on the serial output, as shown in Figure 4-56. FIGURE 4-56: DEVELOPMENT BOARD SERIAL OUTPUT 5.
Sample Application Demonstrations FIGURE 4-57: HYPERTERMINAL WINDOW READY 6. To get the IP address of the computer, run ipconfig command from the command prompt, as shown in Figure 4-58. FIGURE 4-58: USING IPCONFIG TO GET PC IP ADDRESS 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.8.
Sample Application Demonstrations FIGURE 4-60: IPERF TRANSMIT PERFORMANCE (DEVELOPMENT BOARD – CLIENT) 4. To know the development board receiver performance, the server and client must reverse roles (server is the development board HyperTerminal session and client is the computer command prompt window). Also, change the IP address to match the server’s address. 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.9 RUNNING THE TCPIP – WIFI EZCONFIG This demonstration supports the following network types: • CFG_WF_ADHOC • CFG_WF_SOFT_AP 4.9.1 Network Type: CFG_WF_ADHOC In this demonstration, a computer with wireless network adapter is used. Smart devices, such as iPhone can also be used. This demonstration will direct the user to connect to another AP in infrastructure network type.
Sample Application Demonstrations FIGURE 4-62: PRESS S3 BUTTON ON EXPLORER 16 DEVELOPMENT BOARD TO RESET DEMO) 2. The serial output is changed to indicate Reset is effective, see Figure 4-63. FIGURE 4-63: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: RESET MESSAGE 3. After the development board has established connection with computer 2, the LCD panel will display the IP address of the computer that is being used. Alternately, the serial output should display similar information, see Figure 4-64.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-64: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY: SUCCESSFUL CONNECTION 4. Computer 2 will display the list of available wireless networks, and among them is the wireless network with SSID EasyConfig. Click EasyConfig to connect to the development board, as shown in Figure 4-65. FIGURE 4-65: DS52108A-page 80 WIRELESS NETWORK CONNECTION (COMPUTER 2) Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations 5. On successful connection between the development board (computer 1) and computer 2, use the web browser on computer 2 to download the image and upload the Easyconfig.bin file. This file is located in the root directory of the TCPIP-WiFi EZConfig directory, see Figure 4-66. 6. On computer 2 web browser, type http://xxx.xxx.xxx.xxx/mpfsupload, where xxx.xxx.xxx.xxx is the IP address of the development board. FIGURE 4-66: WEB SERVER IMAGE UPLOAD (COMPUTER 2) 7.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 FIGURE 4-67: WEB BROWSER (COMPUTER 2) 8. Click Configure Network to scan for wireless networks. As scanning is in progress, you may receive an error message, as shown in Figure 4-68. FIGURE 4-68: WEB BROWSER (COMPUTER 2): CONFIGURE NETWORK AND SCANNING 9. Click OK. DS52108A-page 82 Preliminary 2013 Microchip Technology Inc.
Sample Application Demonstrations 10. After scanning is completed, a list of available wireless network will be displayed, see Figure 4-69. FIGURE 4-69: WEB BROWSER (COMPUTER 2): LIST OF AVAILABLE WIRELESS NETWORKS 11. Click on the specific network, for example, infrastructure network with SSID MicrochipDemoAP_123. 12. The development board serial output will display the status of the scan results, see Figure 4-70. FIGURE 4-70: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 13. The web browser will highlight the transition from the old (ad hoc) network to the newly (infrastructure) selected network, as shown in Figure 4-71. In this example, infrastructure network with SSID MicrochipDemoAP_123. FIGURE 4-71: WEB BROWSER (COMPUTER 2): TRANSITION FROM OLD (AD HOC MODE) TO NEW (INFRASTRUCTURE MODE) NETWORK 14.
Sample Application Demonstrations 15. On computer 2, if you enter the old network address, the “Unable to connect” error message will be displayed. FIGURE 4-73: WEB BROWSER (COMPUTER 2): OLD NETWORK IP ADDRESS 16. Enter the new IP address of the newly joined network. FIGURE 4-74: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 4.9.2 Network Type: CFG_WF_SOFT_AP This SoftAP function uses the base EasyConfig demonstration due to the required features: DHCP server and HTTP server.
Sample Application Demonstrations FIGURE 4-76: DEVELOPMENT BOARD SERIAL OUTPUT DISPLAY (COMPUTER 1) 5. On computer 2, user can view the SoftAP SSID in the list of available wireless networks, see Figure 4-77. Select SoftAP SSID to join SoftAP network. FIGURE 4-77: 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 6. On computer 2, enter ipconfig in the Command Prompt, the wireless connection to this Soft AP will be displayed, as shown in Figure 4-78. FIGURE 4-78: IPCONFIG WIRELESS NETWORK CONNECTION STATUS (COMPUTER 2) 7. Similarly, ping the SoftAP, as shown in Figure 4-79. FIGURE 4-79: PINGING SOFT AP (COMPUTER 2) 8. Run computer 2 web browser to connect to the web server of the SoftAP.
Sample Application Demonstrations FIGURE 4-80: WEB BROWSER (COMPUTER 2) 2013 Microchip Technology Inc.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 NOTES: DS52108A-page 90 Preliminary 2013 Microchip Technology Inc.
MICROCHIP MRF24W GETTING STARTED GUIDE FOR MRF24WB0MA/B, MRF24WG0MA/B FOR MLA V5 Chapter 5. Microchip Development Board Specifics 5.1 PICDEM.NET 2 USAGE This section provides instructions specific to the PICDEM.net 2 Development Board. Note the connector (J1) on the PICtail. Table 5-1 provides the P ICDEM.net 2 PICtail pin descriptions. If you are using Explorer 16 Development Board, skip this section. TABLE 5-1: 5.2 PICDEM.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 5.3 ERASING EEPROM When debugging, if code settings (especially related to SSID name, MAC address and so on) are not effected, then erase the EEPROM. The values in the EEPROM takes precedence over values that are defined in the source code (that is, TCPIPConfig.h). To erase the EEPROM, perform these actions: 1. Ensure that the development board is programmed and not in Debug mode. 2.
MICROCHIP MRF24W GETTING STARTED GUIDE FOR MRF24WB0MA/B, MRF24WG0MA/B FOR MLA V5 Appendix A. Appendix A.1 MICROCHIP HARDWARE Microchip hardware, including the MRF24WB0MA/B or MRF24WG0MA/B Wi-Fi® PICtail™ can be purchased from Microchip Direct (http://www.microchipdirect.com) or from any of the Microchip distributors. Microchip development tool MPLAB ICD 3 In-Circuit Debugger (ICD) (http:// www.microchip.com/stellent/ idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en537580) A.
Microchip MRF24W Getting Started Guide for MRF24WB0MA/B, MRF24WG0MA/B for MLA v5 NOTES: DS52108A-page 94 Preliminary 2013 Microchip Technology Inc.
2013 Microchip Technology Inc.
Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.