Testing QNEthernet with W5500
QNEthernet, explains how the new W5500 driver works, shows how to enable it in Arduino IDE / PlatformIO, and suggests
QNEthernet로 W5500 완전 활용하기 – Arduino용 lwIP 기반 이더넷 라이브러리 테스터 모집
QNEthernet는 Teensy 4.1을 시작으로 “다른 플랫폼에서도 동작하도록 설계된” lwIP 기반 Arduino 스타일 Ethernet 라이브러리입니다. 최근 개발자가 WIZnet W5500 드라이버를 추가하고, Teensy 이외의 MCU + W5500 조합에서 테스트해 줄 메이커를 공개 모집하고 있습니다.
이 글에서는 QNEthernet의 특징, W5500 드라이버 설정 방법, 추천 하드웨어 조합, 그리고 테스트 시 체크해 보면 좋은 포인트를 정리해 WIZnet Maker 여러분께 공유합니다.
1. 왜 QNEthernet인가?
QNEthernet는 lwIP 기반의 이더넷 스택으로, Arduino가 정의한 Ethernet API와 호환되면서도 더 풍부한 기능을 제공합니다.
주요 특징은 다음과 같습니다.
- Arduino
Ethernet스타일 API와 호환 (대부분의 기존 Ethernet 예제를 큰 수정 없이 포팅 가능) - lwIP 기반으로 보다 유연한 TCP/UDP 스택 사용
- mDNS, DNSClient, Ping, SNTP, Raw Ethernet 프레임, 멀티캐스트 등 고급 네트워크 기능 제공Arduino Library List+1
- Arduino IDE와 PlatformIO 모두 지원
- 라이선스: AGPL-3.0-or-later (상업/폐쇄형 프로젝트에 사용할 경우 라이선스 검토 필요)
특히, 기존 Arduino Ethernet 라이브러리를 사용하던 프로젝트를 최소 변경으로 업그레이드하면서도, lwIP의 강력한 기능을 활용하고 싶은 메이커에게 적합한 라이브러리입니다.
2. QNEthernet 개발자의 공식 요청: “W5500 드라이버를 테스트해 주세요”
Arduino Forum에 올라온 글에서 QNEthernet 개발자 Shawn Silverman은 다음과 같은 내용을 전하고 있습니다.
- 자신은 QNEthernet가 Teensy 외 다른 플랫폼에서도 동작한다고 주장해 왔으며,
- W5500 드라이버는 일부 테스트만 진행한 상태이고,
- Teensy가 아닌 플랫폼 + W5500 조합으로 테스트해 줄 사용자 피드백을 적극적으로 원합니다.
또한, QNEthernet는 표준 Arduino Ethernet 라이브러리의 “드롭인(dropping) 대체”를 목표로 하고 있으며, Readme에 정리된 몇 가지 작은 차이점만 주의하면 된다고 안내하고 있습니다.
이 글을 통해 WIZnet Maker 여러분이 W5500 기반 보드로 QNEthernet 테스트에 참여할 수 있도록, 실제 설정 팁과 예시를 정리합니다.
3. W5500 드라이버의 구조와 특징
포럼 글에 따르면 현재 QNEthernet가 공식적으로 구현한 외부 이더넷 칩 드라이버는 W5500이며, ENC28J60, W5100, LAN8650 드라이버는 아직 미완성 단계입니다.
개발자가 정리한 W5500 관련 포인트는 다음과 같습니다.
1. 드라이버 사용 조건
- 프로젝트 컴파일 옵션에
QNETHERNET_DRIVER_W5500를 정의해야 W5500 드라이버가 활성화됩니다.
예:
- PlatformIO:
build_flags = -DQNETHERNET_DRIVER_W5500 - Arduino IDE:
build_opt.h나 보드별 설정에서-DQNETHERNET_DRIVER_W5500추가
2. 전송/수신 방식 – “raw” 모드 사용
- W5500 드라이버는 “raw frame” 모드를 활용합니다.
- 즉, W5500은 이더넷 프레임 입출력과 PHY 역할을 담당하고,
TCP/UDP 소켓 처리와 프로토콜 스택은 lwIP(QNEthernet)가 직접 처리하는 구조입니다.
3. SPI 기반 인터페이스
- 현재 W5500 드라이버는 SPI 인터페이스를 사용하는 플랫폼을 전제로 합니다.
- SPI 핀은
SPI클래스를 통해 설정 가능하며, - Chip Select(CS) 핀은 사용자가 원하는 핀으로 지정할 수 있습니다.
4. 추가 옵션
- 플랫폼이 지원한다면 하드웨어 난수 발생기(HW RNG)를 붙여서 활용할 수 있는 구조도 고려되어 있습니다.
이러한 구조 덕분에, W5500의 안정적인 물리 계층/버퍼 구조와 lwIP의 유연한 스택을 결합해 고급 네트워크 동작을 세밀하게 제어해 볼 수 있다는 점이 메이커 입장에서 흥미로운 포인트입니다.
4. 요구 사양 & 권장 MCU
포럼에서의 질의응답을 기반으로 정리하면, QNEthernet + lwIP를 구동하기 위한 대략적인 리소스 요구사항은 다음과 같습니다.
C++ 표준
- QNEthernet 0.33.1 릴리스는 C++14 이상을 요구하지만,
- GitHub 최신 개발 버전은 C++11 이상에서 동작하도록 정리되고 있습니다.
플래시 & RAM 예시 (개발자 측 테스트 결과)
- Adafruit Feather M4 (
adafruit_feather_m4, SAMD51) - BlackPill STM32F411 (
blackpill_f411ce) - 위 보드에서 기본 예제를 빌드했을 때:
- 플래시 사용량: 약 55 KiB 수준
- RAM 사용량: 약 3–10 KiB, 추가로 일부 heap 사용
플랫폼별 경험 공유Arduino Forum
- SAMD21 기반 Arduino 보드에서는 lwIP 구동에 리소스가 부족해 동작하지 않았던 사례가 보고됨
- SAMD51 계열(Feather M4) 및 STM32F411 계열(BlackPill)에서는 정상 동작
- AVR(예: ATmega328P) 계열에서는 표준 C++ 헤더(
cerrno,ctime) 미지원 문제 등으로 컴파일 에러가 보고되었으며,
“모든 아키텍처에서 사용 가능”이라는 문구는 라이브러리 메타 정보에서 자동 생성된 것으로, 실제로는 리소스가 충분한 32bit MCU를 권장합니다.
정리하자면:
W5500 + QNEthernet를 제대로 활용하려면,
SAMD51 / STM32F4 / Teensy 4.x / 그와 유사한 성능의 32bit MCU 보드를 사용하는 것이 좋습니다.
5. 설치 방법 (Arduino IDE & PlatformIO)
5-1. Arduino IDE에서 설치
1. Arduino IDE를 실행
2. 메뉴에서 [스케치] → [라이브러리 포함] → [라이브러리 관리] 선택
3. 검색창에 QNEthernet 입력
4. Shawn Silverman의 **“QNEthernet – An lwIP-based Ethernet library for Teensy 4.1 and other platforms”**를 선택 후 설치
5. 설치 후, 필요하다면 보드 설정/추가 빌드 옵션에-DQNETHERNET_DRIVER_W5500 플래그를 추가
주의: IDE의 라이브러리 매니저를 통해 설치하면 **공식 릴리스 버전(예: 0.33.1)**이 설치되고, GitHub에서 ZIP으로 내려받아 설치하면 최신 개발 브랜치 버전이 설치됩니다. 둘 사이에 버그 수정 타이밍 차이가 있을 수 있으니, 문제가 있으면 GitHub의 최신 버전도 함께 시도해 보시길 권장합니다.
5-2. PlatformIO에서 설치
platformio.ini 예시:PlatformIO Registry
6. 기본 예제 – W5500 + QNEthernet로 네트워크 시작하기
아래는 비-Teensy 플랫폼에서 W5500을 사용한다고 가정한 단순 예제 스켈레톤입니다. (실제 핀 번호/보드 이름은 각자 환경에 맞게 수정 필요)
핵심 포인트:
#include <QNEthernet.h> 를 사용해야 하며, 기존 Ethernet.h를 대체합니다.
비-Teensy 보드에서는 Ethernet.loop()를 주기적으로 호출해야 패킷 처리와 연결 유지가 제대로 이루어집니다.
7. Ping, Raw Frame 등 고급 기능 활성화
포럼 글에서 개발자는 다음과 같은 매크로를 지정해 줄 것을 안내하고 있습니다.Arduino Forum+1
1. Ping 예제 사용 시
QNETHERNET_ENABLE_PING_SEND를1로 정의- 예:
-DQNETHERNET_ENABLE_PING_SEND=1
2. Raw Frame 예제 사용 시
QNETHERNET_ENABLE_RAW_FRAME_SUPPORT를1로 정의- 예:
-DQNETHERNET_ENABLE_RAW_FRAME_SUPPORT=1
이 두 옵션을 활성화하면:
- QNEthernet의 Ping 예제 / RawFrameMonitor 예제를 그대로 빌드해서,
- W5500 + lwIP 환경에서 ICMP Echo 요청/응답, 레벨 2 프레임 모니터링 등을 테스트해 볼 수 있습니다.
8. 테스트 시 체크하면 좋은 포인트
WIZnet Maker로서 QNEthernet + W5500 조합을 테스트할 때, 다음과 같은 부분을 집중적으로 살펴보면 좋습니다.
1. 플랫폼 호환성
- 내가 사용하는 보드(SAMD51, STM32, RP2040, 기타 32bit MCU)에서
- 라이브러리가 문제 없이 빌드/링크 되는지
- 표준 C++ 헤더(
cerrno,ctime등) 관련 컴파일 오류가 발생하지 않는지
2. 메모리 사용량
- 기본 예제 빌드 후,
- 플래시 사용량
- RAM 사용량
- 빌드 로그에 표시되는 사이즈를 캡처해 포럼/깃허브 이슈로 공유하면,
개발자가 “최소 요구 사양”을 더 구체적으로 정리하는 데 도움이 됩니다.
3. 네트워크 안정성
- 장시간 TCP 연결/HTTP 클라이언트/UDP 통신 등을 반복하면서
- 패킷 유실
- 연결 끊김 후 재연결
- 케이블 탈착 후 복구 동작
- 등을 관찰
4. 고급 기능 사용성
- mDNS, DNSClient, Ping, Raw Frame 기능 등을 실제로 사용해 보면서
- API 사용성이 어떤지
- 기존 Arduino Ethernet API 대비 개선/불편한 점은 무엇인지
9. 피드백 공유 방법
QNEthernet 개발자는 여러 플랫폼에서의 테스트 결과와 피드백을 적극적으로 원하고 있습니다.Arduino Forum+1
테스트 결과를 공유할 수 있는 채널은 다음과 같습니다.
- Arduino Forum 스레드
- “Request for QNEthernet library testers” 글에 직접 댓글로
- 사용한 MCU 보드, W5500 보드, 빌드 옵션, 로그, 이슈 등을 공유
- (원문 링크: 사용자가 제공한 포럼 URL)
- GitHub 이슈
- QNEthernet GitHub 저장소의 Issues 탭을 통해
- 버그 리포트 / 기능 제안 / 문서 개선 사항 등을 등록
10. 마무리 – WIZnet 메이커가 기여할 수 있는 좋은 기회
정리하자면,
- QNEthernet는 lwIP 기반의 강력한 이더넷 스택을 Arduino 스타일로 제공하고,
- 현재 W5500 드라이버가 구현된 상태에서, 다양한 32bit MCU + W5500 조합에 대한 실전 테스트가 절실한 상황입니다
WIZnet 커뮤니티는 전 세계에서 가장 활발한 W5500 사용자 그룹 중 하나입니다.
W5500 기반 보드(예: WIZnet 이더넷 쉴드, W5500 모듈/EVB, W5500이 붙은 커스텀 보드)를 가지고 계신다면,
QNEthernet를 설치 → W5500 드라이버 활성화 → 예제 빌드 & 실행 → 결과를 Arduino Forum/GitHub에 공유
이 과정만으로도 QNEthernet 프로젝트 품질 향상과,
WIZnet 하드웨어가 다양한 오픈소스 네트워크 스택에서 더 널리 활용되는 데 큰 도움이 됩니다.
Testing QNEthernet with W5500 – Call for Makers Using lwIP-Based Ethernet on Arduino
QNEthernet is an lwIP-based Ethernet library that follows the Arduino-style Ethernet API. It was originally created for Teensy 4.1 but is designed to work on other platforms as well.
Recently, the author added a WIZnet W5500 driver and is now asking the community to help test it on non-Teensy boards + W5500 combinations via the Arduino Forum.
This article introduces QNEthernet, explains how the W5500 driver works, shows how to enable it in Arduino IDE / PlatformIO, and suggests what to test so that WIZnet makers can actively participate in improving this library.
1. What is QNEthernet?
QNEthernet is an Ethernet library built on top of lwIP, providing a familiar Arduino-style API while offering more advanced networking capabilities.
Key features include:
- Compatibility with the Arduino
EthernetAPI - A full TCP/UDP stack implemented through lwIP
- Support for mDNS, DNSClient, Ping, SNTP, raw Ethernet frames, and multicast
- Works with Arduino IDE and PlatformIO
- Licensed under AGPL-3.0-or-later
In other words, if you already have a project using Arduino’s Ethernet library, QNEthernet aims to be a drop-in replacement that gives you more power and flexibility.
2. The Arduino Forum Call: “Please Test the W5500 Driver”
In a recent Arduino Forum topic titled “Request for QNEthernet library testers”, the author, Shawn Silverman, explains that:
- He has long said that QNEthernet works on platforms other than Teensy,
- The W5500 driver has only received limited testing so far, and
- He is specifically looking for testers using non-Teensy MCU boards + W5500.
He also notes that QNEthernet is meant to be a drop-in replacement for the standard Arduino Ethernet library, with only a few documented differences listed in the README.
For the WIZnet community, this is an ideal chance to use familiar W5500 hardware and contribute directly to the quality of an important open-source networking library.
3. How the W5500 Driver Works in QNEthernet
From the forum discussion and documentation, we can summarize the current W5500 support like this:
1.Implemented external Ethernet driver
- The only fully implemented external driver at the moment is W5500.
- Other drivers (ENC28J60, W5100, LAN8650) exist but are marked incomplete.
2. Enabling the driver via compile-time flag
- To use the W5500 driver, you must define the following macro in your build options:
- Example:
- PlatformIO:
build_flags = -DQNETHERNET_DRIVER_W5500 - Arduino IDE: add
-DQNETHERNET_DRIVER_W5500to your board’s extra flags
- PlatformIO:
3. Raw frame mode
- The W5500 driver uses raw Ethernet mode.
- W5500 acts as a MAC/PHY + buffer device,
- While all TCP/UDP socket handling is done in software by lwIP inside QNEthernet, not by W5500’s built-in hardware sockets.
4. SPI interface
- The driver assumes an SPI interface to W5500.
- SPI pins are configured through the usual
SPIinterface. - The chip-select (CS) pin is configurable and can be mapped to any available GPIO.
5. Optional hardware RNG
- The internal design also allows for using a hardware random number generator (RNG) when available on the platform, which can be useful for building more secure systems.
This approach lets you combine W5500’s robust hardware with lwIP’s flexible networking stack, which is especially attractive for advanced debugging, diagnostics, or custom protocols.
4. Requirements & Recommended MCUs
Based on the author’s comments and community feedback, here are the practical requirements for running QNEthernet + W5500:
- C++ standard
- Release 0.33.1: requires C++14 or later.
- Newer development versions are being adjusted to work with C++11 or later.
- Architecture / “All architectures” note
- The Arduino metadata marks the library as supporting all architectures, but in reality some low-end platforms (like classic AVR) lack standard headers such as
<cerrno>or<ctime>, which can cause compile errors.
- The Arduino metadata marks the library as supporting all architectures, but in reality some low-end platforms (like classic AVR) lack standard headers such as
- Memory usage example
- On boards such as:
- Adafruit Feather M4 (SAMD51)
- BlackPill STM32F411
- Basic examples used roughly 55 KiB flash and 3–10 KiB RAM, plus some heap.
- Reported experiences
- lwIP did not run well on SAMD21 boards because of limited resources.
- It ran well on SAMD51 and STM32F411 class boards.
So, in practice:
For QNEthernet + W5500, you should choose a 32-bit MCU with enough flash and RAM, such as SAMD51, STM32F4, Teensy 4.x, or similar.
5. Installing QNEthernet
5.1. Arduino IDE
- Open Arduino IDE.
- Go to Sketch → Include Library → Manage Libraries…
- Search for “QNEthernet”.
- Install “QNEthernet – An lwIP-based Ethernet library for Teensy 4.1 and other platforms” by Shawn Silverman.
- Add the following flag to your board’s build options:
- Installing via Library Manager gives you the latest official release.
- Installing a ZIP from GitHub gives you the development version from the current branch.
5.2. PlatformIO
Example platformio.ini:
