Wiznet makers

Hannah

Published February 13, 2026 ©

69 UCC

22 WCC

1 VAR

0 Contests

0 Followers

0 Following

ioNIC SSL Client Arduino Example

The W55RP20-S2E is configured in SSL client mode via the UART or SPI interface and operates to exchange data with an OpenSSL server running on a PC.

COMPONENTS Hardware components

WIZnet - W55RP20-EVB-Pico

x 1

Software Apps and online services

Arduino - Arduino IDE

x 1


PROJECT DESCRIPTION

 

Step 1: Prepare software

The following serial terminal programs are required for test, download and install from below links.

Step 2: Prepare hardware

1. Connect GPIO13 according to the selected UART/SPI mode of the W55RP20 EVB Pico, as illustrated below.

GPIO13 Pin Desc
LOW(GND)UART mode (default)
HIGH(3.3V)SPI mode

2. Connect the Raspberry Pi Pico and the W55RP20 EVB Pico using jumper wires as shown below, depending on the selected UART/SPI mode.

If UART mode :

Raspberry Pi PicoW55RP20 EVB Pico
GPIO4 (UART_TX)GPIO5 (UART_RX)
GPIO5 (UART_RX)GPIO4 (UART_TX)
GNDGND

If SPI mode :

Raspberry Pi PicoW55RP20 EVB Pico
GPIO2 (SPI_CLK)GPIO2 (SPI_CLK)
GPIO3 (SPI_TX)GPIO4 (SPI_RX)
GPIO4 (SPI_RX)GPIO3 (SPI_TX)
GPIO5 (SPI_CS)GPIO5 (SPI_CS)
GPIO26 (SPI_INT)GPIO26 (SPI_INT)
GNDGND

 

3. Connect the Raspberry Pi Pico to your PC (desktop or laptop) using a 5-pin Micro USB cable.

4. Connect the W55RP20 EVB Pico to your PC (desktop or laptop) using a USB Type-C cable.

 

Step 3: Arduino IDE Setup

Install Board Support Package

  1. Open Arduino IDE
  2. Go to File → Preferences
  3. Add the following to "Additional Boards Manager URLs": https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
  4. Go to Tools → Board → Boards Manager
  5. Search for "Raspberry Pi Pico" and install Raspberry Pi Pico/RP2040 by Earle F. Philhower, III
  6. Select Tools → Board → Raspberry Pi RP2040 Boards → Raspberry Pi Pico

Step 4: Code Examples

Each example provides a .ino file to upload to the Pico.

  1. SPI Communication
  2. UART Communication

 

Step 5: OpenSSL Setup

  1. Run OpenSSL to be used as the SSL server.

2. Create SSL server using openSSL by executing the following command. If the SSL server is created normally, the SSL server's IP is the current IP of your desktop or laptop, and the port is 443 by default.

/* Setup the SSL server */
// create the private key
genrsa -des3 -out [key name].key 2048
// create the CSR(required for certificate signing request)
req -new -key [key name].key -out [csr name].csr
// create the certificate
x509 -req -days [days] -in [csr name].csr -signkey [key name].key -out [crt name].crt

// e.g.
genrsa -des3 -out server.key 2048
req -new -key server.key -out server.csr
x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

/* Run the SSL server */
s_server -accept [port] -cert [crt name].crt -key [key name].key

// e.g.
s_server -accept 443 -cert server.crt -key server.key

 

 

 

Step 6: Upload and Test

6.1 Select Raspberry Pi Pico

  1. Go to Tools → Board → Raspberry Pi RP2040 Boards → Raspberry Pi Pico
  2. Select Tools → Port → Choose your COM port

6.2 Upload Code

  1. Open the desired example .ino file
  2. Modify IP addresses and port numbers as needed
// SSL (TLS) target
// For OpenSSL test server, use host as your PC IP and port 443 (or your chosen port).
static const char *REMOTE_HOST = "192.168.11.100";
static const char *REMOTE_PORT = "443";
  1. Click Upload button or press Ctrl+U
  2. Wait for upload to complete

6.3 Open Serial Monitor

  1. Go to Tools → Serial Monitor
  2. Set baud rate to 115200
  3. Verify network information and connection status

Step 7: Run

PC (SSL Server):

  • Start your SSL Server tool listening on Port 443.
> s_server -accept 443 -cert server.crt -key server.key

1. After the W55RP20-S2E is configured as an SSL client and the handshake with the SSL server is successfully completed, the Windows terminal displays a connection success message as shown below.

2. The W55RP20-S2E processes the received SSL-encrypted data and forwards it to the Raspberry Pi Pico via the UART/SPI interface.

The Raspberry Pi Pico prints the received data to a terminal, generates a response message, and sends it back to the W55RP20-S2E through UART/SPI.

3. The W55RP20-S2E then encrypts the received response data using SSL and transmits it to the OpenSSL server running on the PC.

 

Documents
  • ioNIC SSL Client Example

Comments Write