User Tools

Site Tools


wio:wiopico-io16eth-en

This is an old revision of the document!


French VersionDeutsche VersionEnglish Version

WIOpico 16 I/O ETH

Description

Goal is to provide a Pico with an ethernet connection W5500.
The W5500 is controlled by SPI and the WIOpico-ETH will use the same pin mapping as the WIOpico 16 I/O CAN.

Features

  • Only available for Pico's without WiFi shield. ✔️
  • Looking up the Rocrail server by mDNS. ✔️
  • Transparent communication between WiFi and Ethernet. ✔️
  • Same pin mapping as the WIOpico 16 I/O CAN. ✔️


Setup

Use the following terminal command to activate the EthCon in WIO:

*ethcon=1

This is bit 0 in options7.
A reboot is needed.


Wiring

wiopico-eth-wiring.jpg wiopico-eth-fritzing.jpg


Ethernet Library

To be able to set the hostname the Ethernet Library must be modified.
In Arduino/libraries/Ethernet/src/Dhcp.cpp the following code must be added:

const char* g_DhcpHostName = "";
void DhcpClass::send_DHCP_MESSAGE(uint8_t messageType, uint16_t secondsElapsed)
	// OPT - host name
	buffer[16] = hostName;
	if( strlen( g_DhcpHostName ) > 0 ) {
		buffer[17] = strlen(g_DhcpHostName);
		strcpy((char*)&(buffer[18]), g_DhcpHostName);
	}
	else {
		buffer[17] = strlen(HOST_NAME) + 6; // length of hostname + last 3 bytes of mac address
		strcpy((char*)&(buffer[18]), HOST_NAME);
 
		printByte((char*)&(buffer[24]), _dhcpMacAddr[3]);
		printByte((char*)&(buffer[26]), _dhcpMacAddr[4]);
		printByte((char*)&(buffer[28]), _dhcpMacAddr[5]);
	}


wio/wiopico-io16eth-en.1749014240.txt.gz · Last modified: 2025/06/04 07:17 by rjversluis