Page 3
Lab Manual for TCP 17051 Lab Equipment For this lab, you need the following hardware and software. Hardware RN-131-EK evaluation board, which contains the RN-131 WiFly module • Personal computer with a USB port • USB cable to interface the RN-131-EK to the PC •...
Lab Manual for TCP 17051 Lab 1: Association and Data Transmission over TCP Purpose: This lab will teach you how to: Configure the module’s parameters. • Scan, join, and authenticate to wireless networks. • Discover the WiFly module on your wireless network via UDP.
Page 5
Overview: The following steps will show you how to: 1. Set up the hardware. 2. Configure the module on the evaluation kit. 3. Associate with a network. 4. Discover the module on the network via UDP broadcast. 5. Send data to your lab partner using TCP. Part 1: Hardware Setup 1.
Page 6
Lab Manual for TCP 17051 3. Configure the RN-131-EK to enter command mode: a. Type the escape sequence (three dollar signs, $$$). b. The module responds with CMD. When you press the enter key, Tera Term console displays the version prompt.
Page 7
Lab Manual for TCP 17051 Part 2: Associating with a Wireless Network (Access Points) 1. Search for wireless networks. a. $$$ (enter command mode) b. scan Example Output: <4.00> scan <4.00> SCAN:Found 15 01,01,-69,08,1104,28,00,00:1a:70:74:15:43,youllneverbelievewhatsinside 02,01,-67,08,3104,28,00,06:90:e8:25:54:86,Moxa 03,01,-73,08,3104,28,00,84:c9:b2:65:5b:54,ADoctorADayKeepsAnAppleAway 04,01,-70,08,3104,28,00,00:15:f9:38:bd:b0,laptastic 05,01,-66,04,1100,28,c0,00:22:3f:6b:95:42,SensorNet 06,01,-74,04,3100,28,00,e0:91:f5:a9:8a:a0,accelbiotech 07,06,-58,06,3100,14,00,d8:c7:c8:aa:e7:a0,mchp-peap...
Page 8
Lab Manual for TCP 17051 2. Auto-join a network with persistent configuration. set wlan ssid <string> // AP name b. set wlan pass <string> // AP passphrase c. set wlan join 1 // Enable auto-join to AP after reboot d. set option deivce-id <string> //Give your module a unique device name e.
Page 9
Lab Manual for TCP 17051 Part 3: Discovering Your Devices on the Network Using the UDP Broadcast Protocol NOTE: You will be observing this section. There is no action required. The following figure illustrates device discovery via UDP broadcast. The module sends a UDP broadcast at programmable intervals to make itself discoverable.
Page 10
Lab Manual for TCP 17051 Part 4: Communicating with your lab partner over TCP This lab section will teach you how to: Connect from the module to a remote host using TCP (client). • Connect to module from remote host using TCP (server).
Page 11
Lab Manual for TCP 17051 Check and note your module’s IP address at this stage. Example Output: *Reboot*.wifly-GSX Ver 4.00.1, Apr 19 2013 11:48:28 on RN-131 MAC Addr=00:06:66:21:3a:08 *READY* Auto-Assoc roving1 chan=11 mode=MIXED SCAN OK Joining roving1 now.. Associated! DHCP: Start...
Lab Manual for TCP 17051 Appendix A: Command Quick Reference Set Commands (Part 1 of 4) Command Default Description set adhoc beacon <value> Sets the ad hoc beacon interval in milliseconds. set adhoc probe <value> Sets the ad hoc probe timeout in seconds (ad hoc mode only).
Page 13
Lab Manual for TCP 17051 Set Commands (Part 2 of 4) Command Default set ftp time <value> Sets the FTP timeout value, where <value> is a decimal number that is five times the number of seconds required. set ftp user <string>...
Page 14
Lab Manual for TCP 17051 Set Commands (Part 3 of 4) Command Default Description set sys sleep <value> Sets the sleep timer. set sys trigger <flag> or With this parameter setting, the module wakes from sleep state using the sensor input 0, 1, 2, and 3.
Page 15
Lab Manual for TCP 17051 Set Commands (Part 4 of 4) Command Default Description set wlan rate <value> Sets the wireless data rate. set wlan ssid <string> roving1 Sets the SSID with which the module associates. Sets the Wi-Fi transmit power, where <value> is a set wlan tx <value>...
Page 16
Lab Manual for TCP 17051 Action Commands Command Description Use this command to enter command mode. apmode <bssid> <chan- Creates a soft AP network. nel> close Disconnects a TCP connection. exit Exits command mode. factory RESET Loads the factory defaults into the module’s RAM and writes the settings to the standard configuration file.
Lab Manual for TCP 17051 Appendix B: Reference Documents For more information, refer to the following documentation: WiFly Command Reference, Advanced Features & Applications User’s Guide • RN-131G & RN-131C 802.11 b/g Wireless LAN Module Data Sheet • RN-171 802-11 b/g Wireless LAN Module Data Sheet •...
Lab Manual for TCP 17051 Appendix C: Schematics The following figures illustrate the RN-131-EK, RN-131-PICtail, and RN-171-PICtail schematics, respectively. RN-131 EK Board Schematic SENS OR _P OW E R SENSOR4_ P IN 220k SENSOR _4 SENSOR5_ P IN 220k SENSOR _5...
Page 19
Lab Manual for TCP 17051 RN-131-PICtail Schematic PI C_RX VDD3V3 RB2/SS1/AN2 RF2/U1RX_E PI C_TX RF6/SCK1 RF3/U1TX_E MI SO ISP_ T X PI C_TX RF7/SDI 1_E RG2/SCL 1 MOSI WAKEUP RESET RF8/SDO1_E RG3/SDA1 ISP_ R X UART_TX RB0/AN0 RB1/AN1 PI C_L EDY...
Page 20
Lab Manual for TCP 17051 RN-171-PICtail Schematic PI C_RX RB2/SS1/AN2 RF2/U1RX_E PI C_TX VDD3V3 RF6/SCK1 RF3/U1TX_E MI SO RF7/SDI 1_E RG2/SCL 1 MOSI ISP_ T X PI C_TX RF8/SDO1_E RG3/SDA1 WAKEUP RESET ISP_ R X UART_TX RB0/AN0 RB1/AN1 PI C_L EDY...
Need help?
Do you have a question about the TCP 17051 and is the answer not in the manual?
Questions and answers