background image

Lab Manual for TCP 17051 

 

 

Page | 13 

Set Commands (Part 2 of 4) 

Command

 

Default

 

D

e
s

cr
ip

ti
o
n

 

set ftp time 

<

value

200 

Sets the FTP timeout value, where <

value

> is a 

decimal number that is five times the number of 
seconds required. 

set ftp user 

<

string

roving 

Sets the user name for accessing the FTP server. 

set ip address 

<

address

0.0.0.0 

Sets the WiFly module’s IP address. 

set ip backup 

<

address

0.0.0.0 

Sets a secondary host IP address. 

set ip dhcp 

<

value

Enables/disables DHCP mode. 

set ip flags 

<

mask

0x7 

Sets the TCP/IP functions. 

set ip gateway 

<

address

0.0.0.0 

Sets the gateway IP address. 

set ip host 

<

address

0.0.0.0 

Sets the remote host’s IP address. 

set ip localport 

<

value

2000 

Sets the local port number. 

set ip netmask 

<

address

255.255.255.0 

Sets the network mask. 

set ip protocol 

<

flag

Sets the IP protocol. 

set ip remote 

<

value

2000 

Sets the remote host port number. 

set ip tcp-mode 

<

mask

0x0 

Controls the TCP connect timers, DNS 
preferences, and remote configuration 
options. 

set opt average 

<

value

Sets the number of RSSI samples used to calculate 
the running RSSI average. 

set opt deviceid 

<

string

WiFly-

XXX

 

Sets the configurable device ID, where 

XXX 

is GSX 

for the RN131 and EZX for the RN171. 

set opt format 

<

flag

0x00 

Sets the HTTP client/web server information. 

set opt jointmr 

<

value

1000 

Sets the join timer, which is the length of time (in 
ms) the join function waits for the access point to 
complete the association process. 

set opt replace 

<

char

$ (0x24) 

Sets the replacement character you use to indicate 
spaces  in  the  SSID  and  pass  phrases,  where 
<

char

> is a single character. 

set opt password 

<

string

“” (no password 
required) 

Sets the TCP connection password. 

set opt signal 

<

value

Configures the threshold level for the RSSI value in 
infrastructure mode. 

set q power 

<

value

Automatically turns on the sensor power. 

set q sensor 

<

mask

Specifies  which  sensor  pins  to  sample  when 
sending  data  using  the  UDP  broadcast  packet 
or the HTTP auto sample function. 

set sys autoconn 

<

value

Sets the auto-connect timer in TCP mode. 

set sys autosleep 

<

value

Sets the auto-sleep timer in UDP mode. 

set sys iofunc 

<

mask

0x0 

Sets the I/O port alternate functions. 

set sys launch_string 

<

string

>  web_app 

Sets the application to launch when GPIO9 is high 
after powerup. 

set sys mask 

<

mask

0x20F0 (RN131) 
0x21F0 (RN171) 

Sets the I/O port direction. 

set sys printlvl 

<

value

0x1 

Controls the debug print messages printed by the 
WiFly module on the UART. 

set sys output 

<

mask

> <

mask

>  None 

Sets the output GPIO pins high or low. The 
optional <

mask

> sets a subset of the pins. 

 

Summary of Contents for TCP 17051

Page 1: ...Lab Manual for TCP 17051 Table of Contents Hardware Architecture 2 Lab 1 Instructions 4 Appendix A Command Reference 12 Appendix B Reference documents 17 Appendix C Schematics 18 Adding Wi Fi to Embe...

Page 2: ...nly 6 Sensor 4 1 2 V only 7 Sensor 6 1 2 V only 8 Sensor 3 1 2 V only 9 GND WARNING Sensors must not have more than 1 2 V DC Otherwise the module may be permanently damaged Table 1 RN 131 EK Evaluatio...

Page 3: ...to interface the RN 131 EK to the PC Access point s configured with WAP2 security this hardware is already set up in the lab by the instructor Software Tera Term software http sourceforge jp projects...

Page 4: ...ransmission 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: ...via UDP broadcast 5 Send data to your lab partner using TCP Part 1 Hardware Setup 1 Connect the evaluation board a Connect the RN 131 EK board to your computer using the USB cable b Use the device ma...

Page 6: ...on and initialize the module to the factory default conditions a Check the configuration and firmware version i ver b Perform a factory reset starts the module in a known state i factory RESET ii rebo...

Page 7: ...2100 00 00 d8 c7 c8 aa e7 a1 guest 09 06 57 08 3100 28 00 d8 c7 c8 aa e7 a2 mchp secure 10 06 52 04 3104 28 00 b8 c7 5d 06 d0 2b 11 06 53 04 3104 28 00 00 26 f2 4f 89 d6 roving guest 12 09 49 04 3104...

Page 8: ...0 set wlan ssid roving1 AOK 4 00 set wlan pass rubygirl AOK 4 00 set wlan join 1 AOK 4 00 save Storing in config 4 00 reboot Reboot wifly GSX Ver 4 00 1 Apr 19 2013 11 48 28 on RN 131 MAC Addr 00 06 6...

Page 9: ...ce 192 168 0 2 192 168 0 1 174 201 25 16 To Internet Roving Networks Device Roving Networks Device Roving Networks Device Roving Networks Device Roving Networks Device 192 168 0 4 192 168 0 5 192 168...

Page 10: ...re TCP Connections 1 Restore the module to the factory defaults a Enter command mode b factory RESET Restore module to factory defaults c reboot Reboot module with factory defaults 2 Associate with AP...

Page 11: ...isten on 2000 My module s IP address ________________________ 4 Student A open a TCP connection to your lab partner a Enter command mode b open Lab Partner IP address 2000 2000 is the port number OPEN...

Page 12: ...that is sent to the local UART when the TCP port is opened set comm remote string HELLO Sets the ASCI string that is sent to the remote TCP client when the TCP port is opened set comm size value 64 Se...

Page 13: ...RN131 and EZX for the RN171 set opt format flag 0x00 Sets the HTTP client web server information set opt jointmr value 1000 Sets the join timer which is the length of time in ms the join function wai...

Page 14: ...value Not applicable Disables or enables the UART s TX pin GPIO10 where value is 1 or 0 set wlan auth value 0 Sets the authentication mode set wlan channel value flag 0 Sets the WLAN channel where va...

Page 15: ...ys the system settings sleep and wake timers etc get time Displays the time server UDP address and port number get wlan Displays the SSID channel and other WLAN settings get uart Displays the UART set...

Page 16: ...address value Opens a TCP connection to address where value is the port number ping string value Pings a remote host where string is a parameter setting and value is the number of pings The default i...

Page 17: ...mation 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...

Page 18: ...3k3 R1 3k3 R3 3k3 R2 3k3 R4 GPIO _5 GPIO _6 GPIO _4 GPIO _6 GPIO _5 GPIO _4 GPIO _7 GPIO _8 GPIO _7 220R R21 220R R23 220R R17 220R R13 100k R20 100k R18 100k R12 100k R19 100k R22 Blue D4 Green D3 Y...

Page 19: ...22 220k R21 PIC_TX 10uF C3 10uF C4 VDD3V3 Vin 1 GND 2 Vout 3 T ab 4 TC1262 3 3V U2 Vin i Power Net 220R R18 Green L E D D4 ST A T US_L E D 220R R19 R ed L E D D5 PIC_L E DR 220R R20 PIC_L E DY Y ellow...

Page 20: ...220R R10 Green L E D D1 ST A T US_L E D 220R R9 R ed L E D D2 PIC_L E DR 220R R11 PIC_L E DY Y ellow L E D D3 SEN0 100k R7 220k R6 PIC_TX ISP_ TX ISP_ R X 1 2 3 4 5 6 7 8 J3 ISP Connector UART_TX PIC...

Reviews: