Introduction
The CH9121 module is a low cost serial to ethernet module that allows TTL serial data to be sent and received via TCP or UDP layers.
The device can be used as a simple ethernet to serial module, which is very useful in many applications.
Tutorial
Basic setup
- Power the CH9121 module by connecting a 5V supply between its 5V and GND pins.
- Use any serial to ethernet converter, connect the TxOut of the serial to ethernet converter to the RxIn of the serial converter (and vice versa)
- Plug the RJ45 connection on the serial to ethernet module into a windows PC.
- The CH9121 must now be configured via software.
Serial setup
- First we must setup the serial interface on the CH9121. To do this you will need to download the Net Module Configure software from the links below. This software is Chinese and not very clear, however using it is fairly simple.
- With the CH9121 connector, select the Adapter (use networking and sharing center to find which adapter it is connected to) and click Search. The CH9121 should appear in the list below.
- Double click the CH9121 in the list below, and the settings should appear on the right. Don’t worry if your mode does not match UDP Client and the IP settings are different. For now, just set the Baud, Data Bit, Stop Bit and Parity settings in the image above and click “Set ALL”. The module will reboot and will now retain this setting between power cycles. The serial settings are now set.
- We must now configure the ethernet side of the device, there are four individual settings for this which are described in the next section.
Ethernet Setting
Text below is copied directly from tutorial 2.
3.2. TCP SERVER mode