CH9121 based 2-CH UART TO ETH - Waveshare - Page 1
Forum section: electronics / general

author: interflexo
author_rank: Regular Contributor
timestamp: January 01, 2023, 11:12:15 pm
content: Hi,The main goal is to use a Raspberry Pi Pico to control several devices, send acquisition data and receive commands from a TCP Server (Windows PC) over a wired network.The Pico would interface the wired network via a UART to Ethernet adapter configured as TCP Client. This will be replicated to more than 100 devices. The messages are a few bytes every other hundreds of milliseconds.This is the CH9121 based UART to ETH:https://www.waveshare.com/wiki/2-CH_UART_TO_ETHI managed to inspect and change the adapter configuration via UART and through NetModuleConfig.exe LAN utility. The device responds to pings (ICMP) over the network and DHCP works well.Wireshark does not show any TCP packets.The TCP Server code is tested against several TCP Clients on other PC over the same network. Used also other third party TCP Client and Server utilities for debug.I understand the device configuration parameters and the packet send mechanism (packing buffer full and timeout).This is an handy building block for the new generation of powerful small MCUs. It blows my mind the lack of online feedback about the usage of these devices (or should have seen the red flag). In my defense CH912X has an entry on Github Cursed Hardware Collection...My question is. Did anyone managed to make one of these things to work properly?CH9121 is a chip realizing transparent transmission between network and UART. It integrates TCP/IP protocol stack, which can realize bidirectional transparent transmission between network data packets and serial data. It has 4 working modes: TCP CLIENT, TCP SERVER, UDP CLIENT and UDP SERVER. The serial baud rate can be up to 921600bps. It can be easily configured by upper computer software or serial commands, which is convenient and quick.● Internal Ethernet MAC layer and PHY layer● Realize bidirectional transparent transmission between serial data and network data● Support 10/100M, full/half duplex self-adaption Ethernet interface, compatible with 802.3 protocol● Support automatic MDI/MDIX line conversion● Support DHCP automatic access to IP address, and DNS domain name access● Set the chip working mode, port, IP and other network parameters through upper computer software and serial commands● Support four working modes: TCP CLIENT, TCP SERVER, UDP CLIENT and UDP SERVER● Support up to two independent UARTs, independent transparent transmission● Serial baud rate supports 300bps ~ 921600bps● Serial TTL level, compatible with 3.3V and 5V● UART supports full-duplex and half-duplex serial communication, and RS485 transceiving automatic switch● Support and provide virtual serial software● Support KEEPALIVE mechanism

author: tellurium
author_rank: Frequent Contributor
timestamp: January 02, 2023, 05:03:27 pm
content: If you do not consider using an alternative - a W5500 module, please ignore this message.If you're open to use W5500 instead of CH9121, then please take a look at this example:https://github.com/cesanta/mongoose/tree/master/examples/rp2040/pico-w5500Cons:- It is more complex software-wise- Requires Mongoose library (GPLv2/commercial licensed)Pros:- Can implement multiple connection - server, client, etc- Can talk multiple protocols - HTTP, MQTT, etc.(therefore your PC client/server can be a standard browser / Web server, not a custom TCP server)- Can use TLS- W5500 is comparable to CH912X price-wiseDisclosure: I work for a company that develops Mongoose library

author: interflexo
author_rank: Regular Contributor
timestamp: January 03, 2023, 07:44:52 am
content: I ordered yesterday a Pi Pico with a fully hardwired W5500 on board just to be on the safe side.In the meantime I opened a ticket on Waveshare regarding the CH9121 issue, let's see how it goes. I sure would like to get what I payed for (device order + time invested on sorting out the project solution and trying hard to get the device to work).Quote from a movie: Time is the single most precious commodity in the universe.

author: tellurium
author_rank: Frequent Contributor
timestamp: January 03, 2023, 09:00:04 pm
content: Is this the board you have orderedhttps://docs.wiznet.io/Product/iEthernet/W5500/w5500-evb-pico?

author: interflexo
author_rank: Regular Contributor
timestamp: January 04, 2023, 02:43:12 pm
content: Yes it is. Ordered it from Mouser and will be delivered next Friday.

author: tellurium
author_rank: Frequent Contributor
timestamp: January 04, 2023, 05:16:50 pm
content: Great.An example mentioned works on that board with no changes.

author: interflexo
author_rank: Regular Contributor
timestamp: January 05, 2023, 01:08:03 am
content: I received word from Waveshare advising me to open the ports for SSCOM (TCP Server utility for this case) on the Windows Firewall.My first text explained that I disabled the Windows Firewall for test purposes and every TCP server (including SSCOM they mention on their instructions) worked flawlessly with another PC (as TCP Client) over the same network. It's wild goose chase time.

author: Sagar S M
author_rank: Newbie
timestamp: November 19, 2023, 10:13:51 am
content: Hi,I am also trying to use a CH9121 board.Could you please provide the link for NetModuleConfig.exe file to change the settings ?thanks in advanceSagar S M

author: eb4fbz
author_rank: Regular Contributor
timestamp: April 24, 2024, 08:47:51 pm
content: Have you managed to make it work? I’m considering CH9121 for some future developments, although I’m only interested in using it as TCP Server.

author: P2N
author_rank: Newbie
timestamp: May 15, 2025, 08:30:34 am
content: Created a HOWTO and simple TCPServer to test this withhttps://github.com/gr-butler/HOWTO-Waveshare-CH9121