RN-171 modules

Lab Manual for TCP 17051 MASTERs 2013 Lab Manual for TCP 17051 Table of Contents Hardware Architecture Lab 1 Instructions Appendix A: Command Refere...
Author: Kelley Austin
39 downloads 0 Views 4MB Size
Lab Manual for TCP 17051

MASTERs 2013 Lab Manual for TCP 17051

Table of Contents Hardware Architecture Lab 1 Instructions Appendix A: Command Reference Appendix B: Reference documents Appendix C: Schematics

2 4 12 17 18

Adding Wi-Fi to Embedded Designs Using the RN-131/RN-171 modules

Page | 1

Lab Manual for TCP 17051

Hardware Architecture: Development Environment

LED Indicators

USB Connector

UART Interface (J3)

AP/WPS/Factory Reset Pushbutton (GPIO9)

Reset Pushbutton

Sensor Interface (J1)

UART Interface (J3) 1 2 3 4 5 6 7 8 9 10 11 12 13

Sensors (J1) Pin

Description

1

3.3 VDC output

2

GND

3

UART RX

4

UART TX

5

UART RTS

6

UART CTS

7

RX - input to evaluation board TX - output from evaluation board

9 8 7 6 5 4 3 2 1

Pin

GPIO4

8

GPIO5

9

GPIO6

10

GPIO7

11

GPIO8

12

GPIO9

13

Reset

Description

1

Sensor Power

2

Sensor 4 (3.3-V tolerant)

3

Sensor 5 (3.3-V tolerant)

4

Sensor 7 (1.2 V only)

5

Sensor 5 (1.2 V only)

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 Evaluation Board LED Indicators

Condition

Blue LED

Red LED

Yellow LED

Green LED

On solid  

Unused

-­‐  

-­‐  

Connected over TCP

Fast blink  

Unused

Not associated  

Rx/Tx data transfer  

No IP address

Slow blink  

Unused

Associated, no Internet  

-­‐  

IP address OK

Off  

Unused  

Associated, Internet OK  

-­‐  

-

Page | 2

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 • 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/ttssh2/releases/) Access Point Setup • We have four Access Points set up for this class, each having a unique SSID • Three Access Point are configured with WAP2-Personal encryption • One Access Point is open (has no security enabled)

Page | 3

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. Send data over TCP using the RN-131-EK to your lab partner.

Page | 4

Overview: The following steps will show you how to: 1. 2. 3. 4. 5.

Set up the hardware. Configure the module on the evaluation kit. Associate with a network. Discover the module on the network via UDP broadcast. 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 manager to find the COM port. See the following figures.

2. Launch the Tera Term terminal software from your PC. a. Choose Serial. b. In the drop-down menu, select the COM port you found in step 1b.

Page | 5

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. 4. Review the module’s configuration 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. reboot You have completed the hardware setup. Example Output: CMD

ver

wifly-GSX Ver 4.00.1, Apr 19 2013 11:48:31 on RN-131 factory RESET Set Factory Defaults reboot *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*

Page | 6

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:

scan

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 08,06,-65,00,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,28,00,e0:91:f5:57:a3:54, 13,11,-48,04,3104,28,00,00:16:b6:45:63:98,CoolBox 14,11,-64,04,3108,28,00,00:14:d1:af:12:0c,roving1 15,11,-72,00,2100,40,40,00:18:02:70:7e:e8,GPT END:

The scan output format is shown below: Index

Channel

RSSI

Security Mode

Capabilities

WPA Configuration

WPS Mode

MAC Address

SSID

For a more detailed description of the scan output fields, refer to the WiFly Command Reference, Advanced Features & Applications User’s Guide. NOTE 1: If you do not see the desired access point in the list, re-issue the scan command. 2: The module does not display hidden access points in the scan output.

Page | 7

Lab Manual for TCP 17051 2. Auto-join a network with persistent configuration. a. set wlan ssid // AP name b. set wlan pass // AP passphrase c. set wlan join 1 // Enable auto-join to AP after reboot d. set option deivce-id //Give your module a unique device name e. save f. reboot Example Output:

set wlan ssid roving1

AOK

set wlan pass rubygirl

AOK

set wlan join 1

AOK

save

Storing in config reboot *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 DHCP in 17ms, lease=60s IF=UP DHCP=ON IP=172.35.1.13:2000 NM=255.255.0.0 GW=172.35.0.1 Listen on 2000

TIP: If the network is secure, set the pass phrase with set wlan pass before joining the network.

Page | 8

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. The UDP broadcast contains information that identifies the module on the network. Device Discovery via UDP Broadcast I’m here

Roving Networks Device

I’m here

Roving Networks Device 192.168.0.3

192.168.0.6

I’m here

Roving Networks Device 192.168.0.7 174.201.25.16

I’m here

I’m here

Roving Networks Device

Access Point DHCP server

To Internet

I’m here Roving Networks Device 192.168.0.5

I’m here

192.168.0.2

192.168.0.1

Who is there

Roving Networks Device

Roving Networks Device 192.168.0.4

192.168.0.8

UDP Server 192.168.0.100

The UDP broadcast is a fixed 110 byte packet with the following structure: Position 0 - 5 6 7 8 - 9 10 - 13 14 - 15 16 - 17 18 - 31 32 - 59 60 - 91 92 - 93 94 - 110 Access Point’s MAC Address (6 Bytes) Channel (1 Byte) RSSI (1 Byte) Local TCP Port (2 Bytes) RTC Value, MSB to LSB (4 Bytes) Pin 20’s Battery Voltage in mV, e.g., 2755 (2 Bytes) GPIO Pin Value (2 Bytes) ASCII Time (13 Bytes) Version String with Date Code (26 Bytes) Programmable Device ID Set with set option deviceid (32 Bytes) Boot Time in ms (2 Bytes) Sensor 0 - 7 Voltage Readings Enabled with set opt format (16 Bytes)

Page | 9

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).

Student A’s module initiates the TCP open and acts as the client. Student B’s module accepts the TCP connection and acts as the server. TCP connections are point-to-point connections that provide reliable, guaranteed, in order data delivery. They are also known as sockets. See the following figure. TCP Connections Remote Host

RN-134-K 192.168.1.50 Listen on Port 2000

Access Point DHCP server

open 192.168.1.200 5000

WiFly Module Opens TCP Connection Sensing applications Sending data to web server Data acquisition systems Fleet management

192.168.1.200 Listen on Port 5000

open 192.168.1.50 2000

Remote Host Opens TCP Connection Industrial controls Home automation Universal remotes

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 a. $$$ b. set wlan ssid c. set wlan pass d. set wlan join 1 e. save f. reboot

// Enter command mode // Enter AP SSID // Enter AP passphrase // Enable auto join

Page | 10

Lab Manual for TCP 17051

3. 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 DHCP in 17ms, lease=60s IF=UP DHCP=ON IP=172.35.1.13:2000 NM=255.255.0.0 GW=172.35.0.1 Listen on 2000

My module’s IP address:________________________ 4. Student A, open a TCP connection to your lab partner: a. $$$ // Enter command mode b. open 2000 // 2000 is the port number *OPEN* is shown on student A’s Tera Term window and a packet with *HELLO* is shown on student B’s Tera Term window. At this point, either student can type data in their Tera Term window and it is sent over Wi-Fi to your partner’s module using TCP. 5. Close the TCP connection: a. $$$ b. close

// Enter command mode. // Issue command to close TCP connection

Tera Term displays the close string, *CLOS*.

Page | 11

Lab Manual for TCP 17051

Appendix A: Command Quick Reference Set Commands (Part 1 of 4) Command

Default

Description

set adhoc beacon

102

Sets the ad hoc beacon interval in milliseconds.

set adhoc probe

5

Sets the ad hoc probe timeout in seconds (ad hoc mode only).

set adhoc reboot

0

Sets the reboot timer.

set broadcast address

255.255.255.255

Sets the address to which the UDP hello/heartbeat message is sent.

set broadcast backup

0.0.0.0

Sets the secondary broadcast backup address.

set broadcast interval 7

Sets the interval (in seconds) at which the hello/heartbeat UDP message is sent.

set broadcast port

55555

Sets the port to which the UDP hello/heartbeat message is sent.

set broadcast remote

0

Sets the secondary broadcast port.

set comm $

$

Sets character used to enter command mode to .

set comm close

*CLOS*

Sets the ASCI string that is sent to the local UART when the TCP port is closed.

set comm idle

0

Sets the idle timer value in seconds.

set comm match |

0

Sets the match character in hex or decimal.

set comm open

*OPEN*

Sets the ASCI string that is sent to the local UART when the TCP port is opened.

set comm remote

*HELLO*

Sets the ASCI string that is sent to the remote TCP client when the TCP port is opened.

set comm size

64

Sets the flush size in bytes.

set comm time

5

Sets the flush timer.

set dhcp lease

86400

Sets the soft AP mode DHCP lease time in seconds.

set dns address

0.0.0.0

Sets the IP address of the DNS sever.

set dns backup

rn.microchip.com Sets the name of the backup host for TCP/IP connections to .

set dns name

server1

Sets the name of the host for TCP/IP connections to .

set ftp addr

0.0.0.0

Sets the FTP server’s IP address of the FTP server.

set ftp dir

public

Sets the starting directory on the FTP server.

set ftp filename

See description

set ftp pass

Pass123

Sets the name of the file that is transferred when issuing the ftp u command, where is the firmware image. Firmware version 4.0 default is wifly3-.img (RN131) wifly7-.img (RN171). Firmware prior to 4.0 default is wifly-GSX.img (RN131) wifly-EZX-.img (RN171). Sets the password for accessing the FTP server.

set ftp mode

0x0

Sets the ftp mode, where indicates active or passive mode. Default is passive.

set ftp remote

21

Sets the FTP server’s remote port number.

Page | 12

Lab Manual for TCP 17051 Set Commands (Part 2 of 4) Command

Default

set ftp time

200

set ftp user

roving

set ip address

0.0.0.0

set ip backup

0.0.0.0

D e Sets the FTP timeout value, where is a s decimal number that is five crtimes the number of seconds required. ip ti Sets the user name for accessing the FTP server. o Sets the WiFly module’s IP address. n Sets a secondary host IP address.

set ip dhcp

1

Enables/disables DHCP mode.

set ip flags

0x7

Sets the TCP/IP functions.

set ip gateway

0.0.0.0

Sets the gateway IP address.

set ip host

0.0.0.0

Sets the remote host’s IP address.

set ip localport

2000

Sets the local port number.

set ip netmask

255.255.255.0

Sets the network mask.

set ip protocol

2

Sets the IP protocol.

set ip remote

2000

Sets the remote host port number.

set ip tcp-mode

0x0

set opt average

5

Controls the TCP connect timers, DNS preferences, and remote configuration options. Sets the number of RSSI samples used to calculate the running RSSI average.

set opt deviceid

WiFly-XXX

Sets the configurable device ID, where XXX is GSX for the RN131 and EZX for the RN171.

set opt format

0x00

Sets the HTTP client/web server information.

set opt jointmr

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

$ (0x24)

Sets the replacement character you use to indicate spaces in the SSID and pass phrases, where is a single character.

set opt password

“” (no password required)

Sets the TCP connection password.

set opt signal

0

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

set q power

0

Automatically turns on the sensor power.

set q sensor

0

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

set sys autoconn

0

Sets the auto-connect timer in TCP mode.

set sys autosleep

0

Sets the auto-sleep timer in UDP mode.

set sys iofunc

0x0

Sets the I/O port alternate functions.

set sys launch_string

web_app

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

set sys mask

0x20F0 (RN131) 0x21F0 (RN171)

Sets the I/O port direction.

set sys printlvl

0x1

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

set sys output None

Sets the output GPIO pins high or low. The optional sets a subset of the pins.

Page | 13

Lab Manual for TCP 17051 Set Commands (Part 3 of 4) Command

Default

Description

set sys sleep

0

Sets the sleep timer.

set sys trigger or

0x1

With this parameter setting, the module wakes from sleep state using the sensor input 0, 1, 2, and 3.

set sys value

0x0

Sets the default value of the GPIO pins’ outputs upon power-up.

set sys wake

0

Sets the automatic wake timer in seconds.

set time address

64.90.182.55

Sets the time server address.

set time enable

0

Tells the module how often to fetch the time from the specified SNTP time server in minutes.

set time port

123

Sets the time server port number.

set time raw

None

Allows you to set the RTC raw value from the console in seconds.

set uart baud

9600

set uart flow

0

Sets the UART baud rate, where is 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600. Sets the flow control mode and parity.

set uart instant

Not applicable

set uart mode

0

Sets the UART mode register.

set uart raw

Not applicable

Sets a raw UART value.

set uart tx

Not applicable

Disables or enables the UART’s TX pin (GPIO10), where is 1 or 0.

set wlan auth

0

Sets the authentication mode.

set wlan channel

0

set wlan ext_antenna

0

Sets the WLAN channel, where is a decimal number from 1 to 13 representing a fixed channel and is the optional character i (meaning immediate). Determines which antenna is active, where is 0 (use the chip antenna) or 1 (use the U.FL connector).

set wlan fmon

3600

Sets the soft AP mode link monitor timeout threshold for the associated client device.

set wlan id



Reserved for future use.

set wlan hide

0

Hides the WEP key and WPA passphrase, where is 0 or 1.

set wlan join

1|0

Sets the policy for automatically associating with network access points.

set wlan key

Not applicable

Sets the 128-bit WEP key, where is EXACTLY 26 ASCII chars (13 bytes) in hex without the preceding 0x.

set wlan linkmon

0 (disabled)

set wlan mask

Immediately changes the baud rate, where is 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, or 921600.

Sets the link monitor timeout threshold, where is a decimal number representing the number of failed scans before the module declares AP is Lost and de-authenticates. 0x1FFF (all chan- Sets the WLAN channel mask, which is used for nels) scanning channels with auto-join policy 1 or 2).

set wlan phrase

rubygirl

set wlan number

0

Sets the passphrase for WPA and WPA2 security modes. Sets the WEP key number.

Page | 14

Lab Manual for TCP 17051 Set Commands (Part 4 of 4) Command

Default

Description

set wlan rate

12

Sets the wireless data rate.

set wlan ssid

roving1

Sets the SSID with which the module associates.

set wlan tx

0

Sets the Wi-Fi transmit power, where is a decimal number from 1 to 12 that corresponds to 1 to 12 dBm.

set wlan user



Reserved for future use.

Get Commands Command

Description

get adhoc

Displays the ad hoc settings.

get broadcast

Displays the broadcast UPD address, port, and interval.

get com

Displays the communication settings.

get dns

Displays the DNS settings.

get everything

Displays all of the configuration settings, which is useful for debugging.

get ftp

Displays the FTP settings.

get ip

Displays the IP address and port number settings, where is the optional parameter a. Using returns the current IP address.

get mac

Displays the device’s MAC address.

get option

Displays the optional settings such as the device ID.

get sys

Displays 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 settings.

ver

Displays the firmware version.

Status Commands Command

Description

show battery

Displays current battery voltage, and is only applicable to Roving Networks’ battery-powered products such as the RN370 and temperature sensors (ISENSOR-CB).

show connection

Displays the connection status in the hex format 8.

show io

Displays the GPIO pins’ level status in the hex format 8.

show net

Displays the current network status, association, authentication, etc., where is the optional parameter n. Using the n parameter displays only the MAC address of the access point with which the module is currently associated.

show q

Displays the value of the analog interface pin, where is 0 to 7.

show q 0x1

Displays multiple analog interface values simultaneously.

show rssi

Displays the last received signal strength.

show stats

Displays the current statistics, packet RX/TX counters, etc.

show time

Displays the number of seconds since the module was last powered up or rebooted.

Page | 15

Lab Manual for TCP 17051 Action Commands Command

Description

$$$

Use this command to enter command mode.

apmode close

Creates a soft AP network.

exit

Exits command mode.

factory RESET

Loads the factory defaults into the module’s RAM and writes the settings to the standard configuration file. You must type the word RESET in capital letters. Instructs the WiFly module to join the network indicated by .

join

Disconnects a TCP connection.

join #

Use this command to join a network that is shown in the scan list, where is the entry number listed for the network in the scan list.

leave

Disconnects the module from the access point to which it is currently associated.

lookup

Causes the module to perform a DNS query for host name .

open Opens a TCP connection to , where is the port number. ping

Pings a remote host, where is a parameter setting and is the number of pings. The default is 1 packet.

reboot

Forces the module to reboot (similar to a power cycle).

run

Runs an application using ASCII commands.

scan

Performs an active probe scan of access points on all 13 channels. The default is 200 ms/channel.

sleep

Puts the module to sleep.

time

Sets the real-time clock by synchronizing with the time server specified with the time server (set time) parameters.

File I/O Commands Command

Description

del

Deletes a file.

load

Reads in a new configuration file.

ls

Displays the files in the system.

save

Saves the your configuration settings to a file.

boot image

Makes a file represented by the new boot image.

ftp update

Deletes the backup image file, retrieves a new image file, and updates the boot pointer to the new image.

Page | 16

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 RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards User Manual

Page | 17

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

J1

36 GND

37

36

R16 100k

R9 100k

R6 100k

R7 100k

SUPERCAP_BAL ANCE EPC_B

7 7

EPC_A

6 6

RESET

5 5

RESET _N

SENSOR_7

4 4

SENSOR _7

SENSOR_5

3 3

SENSOR _5

SENSOR_4

2 2

SENSOR _4

SENSOR_6

1 1

SENSOR _6

100nF C3 100nF

RXD TXD CTS RTS

R1 R3 R2 R4

3k3 3k3 3k3 3k3

30 TXD 2 RXD 32 RTS 8 CTS 31 DTR 6 DSR 7 DCD 3 RI 22 CBUS0 21 CBUS1 10 CBUS2 11 CBUS3 9 CBUS4

VDD_3V3 GPIO _9 S2

16

100nF

VBUS

U1 FT232RQ

3V 3OUT

14 SPI_MOSI

15

16 16

15 SPI_SCK

14

C1

FOR C E _AW AK E

1

SENSOR_0

9 8 8

Power Net i

V CCIO

34

9

19

SENSOR_POWER

SENSOR _0 SENSOR _1 SENSOR _2

C2 VBUS

V CC

33

SPI_MISO

18

17 17

18 SR E G_IN

SR E G_OUT

20

19 19 GND

SENSOR_3

220k 220k 220k

USBDM USBDP RESET OSCI T E ST

33 34

SENSOR _0

32

R8 RX D R15 CT S GPIO _9 R11

OSCO

15 14

i Power Net

D_N D_P

18

J2 1 VBUS 2 D3 D+ 5

MTAB

6

GND

USB Mini B

27 28

26

SENS OR _P OW E R

SENSOR_2

SENSOR _4 SENSOR _5

20 GND 17 GND 4 GND 24 A GND 33 T HPA D

32

31

RT S

44 GND

SENSOR _3

SENSOR_1

10 10

44

31

30

CT S

UART_RTS(GPI O_13)

43 GND

SENSOR _2

GPI O_4

RX D

11 11

42 GND

30

GPI O_5

29

12 12

42

SENSOR _1

28

UART_RX(GPI O_11) UART_CTS(GPI O_12)

FORCE_AWAKE

220k 220k

R14 100k TX D

43

29

GPI O_6

R5 R10

Sensor Interface

13 13

41 GND

28

GPIO _4

GPI O_7

27

40 GND

GPIO _5

26

40

27

GPI O_8

M1 RN131 Module

UART_TX (GPI O_10)

41

GPIO _6

25

39 GND

26

38 GND

GPIO _7

GPI O_9

39

25

SP_RX I

24

38

GPIO _8

23

B A T T 20

22

21

22

V DD 21

ISP_T X

24

37 GND

23 GPIO _9

SENS OR _P OW E R SENSOR4_ P IN SENSOR5_ P IN SENSOR _7 SENSOR _5 SENSOR _4 SENSOR _6 SENSOR _3

1 2 3 4 5 6 7 8 9

VDD_3V3

RESET _N S1

R23

Blue

R20

U2 TC1262- 3.3VDBTR 3

VDD_3V3 i Power Net

T ab

Vout GND

Vin

4

1

2

VBUS

C4 100nF i Power Net

GPIO _4

100k R18

GPIO _5

R21

100k R12

GPIO _6

100k R19

100k

R17

GPIO _4 D3 Yellow GPIO _5

220R GPIO _7

100k R22

D4 Green

220R

R13 GPIO _8

D2 Red GPIO _6

J3

VDD_3V3

GPIO _7

220R RX D TX D RT S CT S GPIO _4 GPIO _5 GPIO _6 GPIO _7 GPIO _8 GPIO _9 RESET _N

1 2 3 4 5 6 7 8 9 10 11 12 13 UART I nterface

220R D1

Page | 18

Lab Manual for TCP 17051 RN-131-PICtail Schematic J3 ISP Connector

R22

PI C_RTS PI C_CTS SS

SS

25

STATUS_L ED

26

SI RQ

27

MI SO

28

MOSI

29 30

Vin

SEN2

i Power Net

SEN3

31 32 33

SEN0

2

27

GPI O_6

28

GPI O_5

29

GPI O_4

30

SENSOR_1

31

SENSOR_2

32

SENSOR_3

33

SENSOR_POWER

34

SENSOR_0

14 14 SPI_MOSI

16

15 SPI_SCK

15

16 SPI_MISO

18

17 17

18 SR E G_IN

SR E G_OUT

20

19 19

21

GPI O_7

13 13

UART_TX

UART_RX(GPI O_11)

12 12

PI C_TX

UART_CTS(GPI O_12)

11 11

PI C_RTS

UART_RTS(GPI O_13)

10 10

PI C_CTS

9

WAKEUP

FORCE_AWAKE

9

SUPERCAP_BAL ANCE

8 8

EPC_B

7 7

EPC_A

6 6

RESET

5 5

SENSOR_7

4 4

SENSOR_5

3 3

SENSOR_4

2 2

SENSOR_6

1 1

RESET

GND 42

44 GND 44

43

42

S2

43 GND

UART_TX GND

R12 3k3

26

GND

i Power Net C3 10uF

PI C_RX PI C_TX SEN2 SEN3

GPI O_8

GND

3

1 2 3 4

25

M2 RN131 Module

UART_TX (GPI O_10)

41

GND

Vout

ISP_TX ISP_RX

GPI O_9

36

Vin

C4 10uF

VDD3V3

T ab

1

TC1262- 3.3V

SP_RX I

24

36

U2

4

Vin

34

23

40

PI CTAI L 28 Pin

MOSI MI SO SCK

24

41

J1

2 4 6 8 10 12 14 16 18 20 22 24 26 28

23

SCK

40

RA5 RA4 RA3 RC5 RC4 RC3 RA0 RA1 RA2 RC0 RC1 RC2 V_VAR GND

ISP_RX

GND

1 RE2 3 RE3 5 RA7/OSC1 7 RA6/OSC2 9 RC7 11 RC6 13 RB7 15 RB6 17 RB5 19 RB4 21 RB3 23 RB2 25 RB1 27 RB0

100k

39

SEN0

39

R21

GND

PI CTAI L PLUS 30 Pin

B A T T 20

22

22

VDD3V3 RESET WAKEUP

220k

PI C_L EDR PI C_L EDY WAKEUP RESET SI RQ

VDD3V3 ISP_TX

38 GND

PI C_L EDR SI RQ PI C_RTS

PI C_TX

PI C_RX PI C_TX

PI C_TX RESET UART_TX

38

J2

2 4 6 8

V DD 21

VDD3V3

1 3 5 7

ISP_ T X WAKEUP ISP_ R X

ISP_T X

PI C_CTS

VDD3V3

PI C_RX PI C_TX

GND

PI C_L EDY

2 RF2/U1RX_E 4 RF3/U1TX_E 6 RG2/SCL 1 8 RG3/SDA1 10 GND 12 RB1/AN1 14 RB4/AN4 16 GND 18 RE8/I NT1 20 RD15/U1RTS_E 22 3.3V 24 5V 26 9V 28 RF0 30 RF1

37

1 RB2/SS1/AN2 3 RF6/SCK1 5 RF7/SDI 1_E 7 RF8/SDO1_E 9 GND 11 RB0/AN0 13 RB3/AN3 15 GND 17 RE9/I NT2 19 RD14/U1CTS_E 21 3.3V 23 5V 25 9V 27 RG0 29 RG1

37

SS SCK MI SO MOSI

i Power Net

MI SO

R ed L E D

D6

100k R15

SI RQ

100k R13

Green L E D

R16

Y ellow L E D

MOSI

100k

R20 220R

ST A T US_L E D

STATUS_L ED

100k R17

PIC_L E DR

R14

PIC_L E DY

VDD3V3

D5 R19 220R

D4 R18 220R

SS

100k

Page | 19

Lab Manual for TCP 17051 RN-171-PICtail Schematic

31

SEN3

32 33

MOSI MI SO SCK

VDD3V3

34 35 36

PI C_RTS PI C_CTS SS

37 38

Vin i Power Net

39 RESET

40

WAKEUP

41 42

U1 Vin

Vout GND

C2 10uF

VDD3V3 3 C1 10uF

T ab

1

TC1262- 3.3V

4

Vin

ISP_TX ISP_RX

1 2 3 4

PI C_RX PI C_TX SEN2 SEN3

R8

UART_TX

3k3

S1

PI C_CTS

43

PI C_RTS

44

PI C_TX

45

UART_TX

46

MI SO

100k R3

D3

GND

30

SENSOR_1

SPI _MOSI

18 18

31

SENSOR_2

SPI _SCK

17 17

32

SENSOR_3

33

SENSOR_POWER

34

VDD_3V3_RF

35

SENSOR_4

36

SENSOR_5

GPI O_2

12 12

37

SENSOR_6

GPI O_3

38

SENSOR_7

39

GND

GPI O_4

9 9

MOSI

40

RESET

GPI O_5

8 8

MI SO

41

FORCE_AWAKE

GPI O_6

7 7

SI RQ

42

GPI O_14

GPI O_7

6 6

STATUS_L ED

43

GPI O_13 (UART_RTS)

GPI O_8

5 5

SS

44

GPI O_12 (UART_CTS)

GPI O_9

4 4

SCK

45

GPI O_11 (UART_RX)

ISP_RX

3 3

ISP_RX

46

GPI O_10 (UART_TX)

ISP_TX

2 2

ISP_TX

47

GND

GND

1 1

19 19

SPI _MI SO

16 16

FL ASH_CS

15 15

GND

14 14

GPI O_1

13 13

VDD_3V3

11 11 10 10

VDD3V3

VDD3V3

D1

SI RQ

100k R1

D2

22

21

GND

VDD_3V3_SW

49

R5

Y ellow L E D

MOSI

100k

ST A T US_L E D

STATUS_L ED

100k R4

PIC_L E DR

R2

PIC_L E DY

VDD3V3

21

22

GND

24

23

24

23

A NT E NNA

26

25

SENSOR_0

49

47

GND

29

3V 3_R E G_CT R L

SEN2

GND

20 20

28

48

PI CTAI L 28 Pin

30

100k

M1 RN171 Module

48

J1

2

PI C_L EDR PI C_L EDY WAKEUP RESET SI RQ

2 4 6 8 10 12 14 16 18 20 22 24 26 28

29

V BATT

220k

RA5 RA4 RA3 RC5 RC4 RC3 RA0 RA1 RA2 RC0 RC1 RC2 V_VAR GND

SEN0

R7

SEN0

GND

28 R6

26

27

VDD3V3 RESET WAKEUP

PI C_TX

PI C_RX PI C_TX

RF Net i

J3 ISP Connector

SI RQ PI C_RTS

PI CTAI L PLUS 30 Pin

1 RE2 3 RE3 5 RA7/OSC1 7 RA6/OSC2 9 RC7 11 RC6 13 RB7 15 RB6 17 RB5 19 RB4 21 RB3 23 RB2 25 RB1 27 RB0

A1

PI C_TX RESET UART_TX

25

PI C_L EDR

2 4 6 8

27

J2

VDD3V3 1 3 5 7

ISP_ T X WAKEUP ISP_ R X

GND

VDD3V3

PI C_RX PI C_TX

GND

PI C_CTS

2 RF2/U1RX_E 4 RF3/U1TX_E 6 RG2/SCL 1 8 RG3/SDA1 10 GND 12 RB1/AN1 14 RB4/AN4 16 GND 18 RE8/I NT1 20 RD15/U1RTS_E 22 3.3V 24 5V 26 9V 28 RF0 30 RF1

Green L E D

PI C_L EDY

1 RB2/SS1/AN2 3 RF6/SCK1 5 RF7/SDI 1_E 7 RF8/SDO1_E 9 GND 11 RB0/AN0 13 RB3/AN3 15 GND 17 RE9/I NT2 19 RD14/U1CTS_E 21 3.3V 23 5V 25 9V 27 RG0 29 RG1

R ed L E D

SS SCK MI SO MOSI

SS

R11 220R

R10 220R

R9 220R

100k

Page | 20