wio:wiopico-io16eth-en
This is an old revision of the document!
Table of Contents
WIOpico 16 I/O ETH
WIO Overview → WIOesp & WIOpico
- WIO Overview | WIO Setup | WIO Control | User Bitmaps | WIO Firmware | WIO Mobile | Cable | LEDScript | IOScript | WIOpi
Work In Progress: Do not translate. |
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.
PCB
For the W5500-EVB-Pico the same PCB can be used as for the WIOpicoCAN without mounting U2 and U3.
Wiring
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/extended:
const char* g_DhcpHostName = ""; // ***** NEW code line void DhcpClass::send_DHCP_MESSAGE(uint8_t messageType, uint16_t secondsElapsed)
// OPT - host name buffer[16] = hostName; // ***** start NEW code lines if( strlen( g_DhcpHostName ) > 0 ) { buffer[17] = strlen(g_DhcpHostName); strcpy((char*)&(buffer[18]), g_DhcpHostName); } else { // ***** end NEW code lines 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]); } // ***** NEW code line
Links
wio/wiopico-io16eth-en.1750077771.txt.gz · Last modified: 2025/06/16 14:42 by rjversluis