Labs / Electronic modules

GraftSense - Serial-to-Ethernet Module Based on TAS-755C (Open Version)

Author: Li Zisheng · Source: FreakStudio open documentation, v1.3 · License: CC BY 4.0 · Driver code (communication/tas755c_driver): MIT License

Contents
TAS-755C
TAS-755C TAS-755C-based V1.0 L3 L4 L5 L6 L7 L8 C1
TAS-755C C1 C2 R1 R2 TAS-755C-based V1.0

I. Module Introduction

The TAS-755C-based serial-to-Ethernet module is a product designed on the basis of TAS-LAN-755C. As a serial-to-Ethernet module, it supports a maximum power supply of 8V and 3V communication level, and is compatible with TCP, UDP, HTTP and MQTT (excluding the TAS-LAN-755W) protocols. It also supports functions such as DHCP dynamic IP and DNS domain name resolution. The serial port baud rate is selectable from 1200 to 115200 bps; the operating current is 15mA both in standby and working status, and the starting current is 35mA. It is also equipped with a command mode button, a firmware burning interface, etc. It is suitable for embedded, industrial control and other scenarios requiring serial device networking, and facilitates the development and debugging of embedded systems.

II. Introduction to Major Chips

Adopt the TAS-755C-based serial-to-Ethernet module.

2.1 Chip Overview

TAS-LAN-755C/755W 40 85 3.3V

2.2 Pin Definition

TAS-LAN-755C/755W TAS-755C

2.3 Functional Block Diagram

None.

2.4 Performance Parameters

TAS-755C 3.0V 1200 115200bps 9600bps 8 1 2 TAS-LAN-755C 10Mbps

2.5 Reference Circuit

None.

2.6 Chip Configuration

None.

TAS-755C

2.7.1 Serial Port and Basic Configuration

CommandSend (example)Typical response (example)Parameter summaryDefaultNotes / caution
AT+UARTCFGAT+UARTCFG=115200,1,0,0\r\nOK; query: +UARTCFG: 115200,1,0,0 OKBaud rate (115200...1200, TTL supports 230400), data bits (0:7, 1:8), parity (0/1/2), stop bits (0:1, 1:2)+UARTCFG:9600,1,0,0Parameters must be within the allowed range; all caps recommended
AT+UARTTIMEAT+UARTTIME=20\r\nOK; query: +UARTTIME: 20 OKPacketization time in ms (0-255, 0 = default)+UARTTIME:0Recommended: 0
AT+MACADDRAT+MACADDR=D8-B0-4C-E1-BE-10\r\nOK; query: +MACADDR: D8-B0-4C-E1-BE-10 OKMAC (6 bytes, separated by -, hexadecimal)Device has its own unique IEEE MACThe first byte must be even; can only be changed via serial port (not UDP/web page)

2.7.2 IP / Network / TCP / UDP / Mode

CommandSend (example)Typical responseParameter summaryDefaultNotes / caution
AT+IPCONFIGAT+IPCONFIG=0,192.168.1.80,192.168.1.1,255.255.255.0,114.114.114.114\r\nOK; query returns multiple lines of IP/GW/SUB/DNSMODE: 0 = static, 1 = DHCP; followed by IP/GW/SUB/DNS+IPCONFIG:0,192.168.0.80,192.168.0.1,255.255.255.0,192.168.0.1When DHCP is in effect, the local IP/GW/DNS settings are ignored; if DHCP fails to obtain an address, 0.0.0.0 is shown
AT+TCPCFGAT+TCPCFG=0,8234,0,192.168.0.201\r\n or with a domain name AT+TCPCFG=0,10067,0,"cloud.tastek.cn"\r\nQuery: +TCPCFG:0,8234,0,192.168.0.201Local port, remote port (valid for Client), working mode (0-9), remote address (IP/domain name)+TCPCFG: 10123,10123,0,192.168.0.73Working mode: 0 TCP Client, 1 TCP Server, 2 UDP Client, 3 UDP Server, 4 dual-server transparent transmission, 5 IGMP, 6 DTU cloud, 7 IOT cloud (unavailable), 8 HTTP transparent transmission, 9 MQTT
AT+SECONDSERVERADDRESAT+SECONDSERVERADDRES=0,10067,"cloud.tastek.cn"\r\nOK; query: +SECONDSERVERADDRES:0,10067,"cloud.tastek.cn"Second local port, remote port, remote address (domain name ≤128 bytes)+SECONDSERVERADDRESS:10193,10123,0.0.0.0 (example)Valid only in dual-server connection mode; compatible with legacy commands

2.7.3 UDP Broadcast and Discovery (Local Area Network Automation)

OperationSend (example)Device response (example)Description / caution
Broadcast discoveryUDP broadcast at+tas → port 8081Multiple devices respond to the broadcast: +EquipmentIP:... / +CGMR:... / +EquipmentMAC:... / +ENCRYPT:0 OKUsed to discover device IP/MAC/version, etc.
Broadcast to enter command modeUDP broadcast +MAC:00EDE7FA56A3+++ → 8081 (+++ without carriage return)Device broadcast: OKMAC is 12 consecutive hex characters without -. After entering, AT commands with the MAC prefix can be sent
Broadcast configuration commandExample: +MAC:00EDE7FA56A3AT+UARTCFG=9600,1,0,0\r\nOKOver UDP, prefix commands with +MAC:device MAC; each command should still end with \r\n

2.7.4 HTTP / Web Configuration

Command / operationSend (example)Typical responseParameters / description
AT+PATHAT+PATH="/server/device/login"\r\nOK; query: +PATH:"/server/device/login" OKSet HTTP path (length 0-128)
AT+HTTPCFGAT+HTTPCFG=1,1,0\r\nOK; query: +HTTPCFG:1,1,0 OKNetwork status (0/1), method (0 POST / 1 GET), whether to return the header (1/0)
AT+HTTPHEADAT+HTTPHEAD=10,"1234567890"\r\nOK; query: +HTTPHEAD:10,"1234567890" OKHTTP header length 0-128; content is written into the packet according to the length
Web pageOpen http://192.168.0.80 in a browser (default)Page interactionThe computer and device must be on the same subnet; if the device is in TCP Server mode, web page configuration may compete with the TCP Client for the socket, so pause the client before configuring

2.7.5 Heartbeat / Registration / Polling / Poll

CommandSendResponseParameter summaryDefaultNotes
AT+KEEPALIVEAT+KEEPALIVE=1,0,heart,30\r\nOK; query: +KEEPALIVE:1,0,heart,30 OKEnable (0-2), format (0 ASCII / 1 HEX), content, interval in seconds (1-65535)+KEEPALIVE:0,0,heart,0Heartbeat is included; it must be converted to HEX to be processed; if there is interaction, the timer is refreshed
AT+REGISAT+REGIS=1,0,1,151232\r\nOK; query: +REGIS:1,0,1,151232 OKType (0/1/2), send mode (0/1/2), format (0/1), content+REGIS:0,0,0,regisWhen type=1, use MAC (subsequent fields are invalid); note the serial port's maximum upload of 512 bytes and its packet-splitting behavior
AT+POLLAT+POLL=1,10\r\nOK; query: +POLL:1,10 OKPolling enable (0/1), interval in seconds (0-65535)+POLL:0,0Polling starts after the network cable is plugged in and the IP is obtained
AT+POLLSTRAT+POLLSTR=1,1,1,"3132333435"\r\nOK; query lists all +POLLSTRn entriesIndex (1-10), enable (0/1), CRC (0/1), HEX string (0-24 HEX bytes)Multiple entries emptyHEX string length must be even; CRC optional (Modbus-CRC16)

2.7.6 Modbus/TCP Conversion

CommandSendResponseParameterDefaultNotes
AT+TCPMODBUSAT+TCPMODBUS=1\r\nOK; query: +TCPMODBUS:1 OK1 enables Modbus RTU ↔ TCP conversion, 0 transparent+TCPMODBUS:0When enabled, the network port uses Modbus TCP and the serial port uses Modbus RTU; maximum upload 255 bytes; CRC low byte first
CommandSendResponseParameter/RangeDefaultNotes
AT+CLINETID (or CLIENTID variant)AT+CLINETID="mqtt client id"\r\nOK; query: +CLINETID:"mqtt client id" OKClientID length 0–128 bytes+CLINETID:"clientid"The document spells it CLINETID; note that both spellings must be supported
AT+USERPWDAT+USERPWD="username","userpwd"\r\nOK; query: +USERPWD:"username","userpwd" OKUsername 0–64, password 0–128 bytes+USERPWD:"20060248","123456"Storage area is shared with DTUCLOUD; warn about overwrite risk before writing
AT+MQTTSUBAT+MQTTSUB="subTopic"\r\nOK; query: +MQTTSUB:"subTopic" OKTopic 0–64 bytes+MQTTSUB:"sTopic"QoS supports only 0; messages from all topics are printed to the serial port (filtering required)
AT+MQTTPUBAT+MQTTPUB="pubTopic"\r\nOK; query: +MQTTPUB:"pubTopic" OKTopic 0–64 bytes+MQTTPUB:"pTopic"QoS supports only 0
AT+CLEANSSIONAT+CLEANSSION=0\r\nOK; query: +CLEANSSION:0 OK0/1+CLEANSSION:1Clean session flag
AT+RETAINAT+RETAIN=1\r\nOK; query: +RETAIN:1 OK0/1+RETAIN:0MQTT retained message flag
AT+MQTTKEEPAT+MQTTKEEP=120\r\nOK; query: +MQTTKEEP:120 OK60–65535 seconds+MQTTKEEP:120Minimum recommended 60 seconds
CommandSendResponseParameterDefaultNotes
AT+CIPHEADAT+CIPHEAD=1\r\nOK; query: +CIPHEAD:1 OKEnable 0/1+CIPHEAD:0When enabled, network pass-through data to the serial port has the format +IPD,datalen:data (read based on datalen to prevent packet sticking)
AT+LINKDELAYAT+LINKDELAY=10\r\nOK; query: +LINKDELAY:10 OKTIME in seconds (0-65535, 0 disables)+LINKDELAY:3Valid only in TCP Client mode; after disconnection, wait TIME before reconnecting

2.7.9 Logs / Status / Probes / Pin Multiplexing

CommandSendResponseParameterDefaultNotes
AT+LOGAT+LOG=1,1,0\r\nOK; query: +LOG:1,1,0 OKA network status (0/1), B power-on prompt (0/1), C abnormal restart prompt (0/1)—Setting takes effect immediately
AT+STATUSAT+STATUS=1\r\nOK; query: +STATUS:1 OKEN (0/1)—EN=1 is equivalent to AT+LOG=1,1,1; if only some logs are enabled, AT+STATUS? returns 0
AT+PINMUXAT+PINMUX=2\r\nOK; query: +PINMUX:2 OK0 network indicator; 1 hardware flow control; 2 RS485 DE/RE+PINMUX:0After changing, pay attention to hardware wiring and flow control logic

2.7.10 Restart / Save / Export Device Information

CommandSendResponseDescription
AT&WAT&W\r\nOKSave the current configuration to NVM; after receiving OK, restart with AT+CFUN=1,1 or save via the web page; do not power off immediately after saving, to avoid failure
AT+CFUN=1,1AT+CFUN=1,1\r\nOK → device restartsRecommended to restart with this command after saving to ensure it takes effect
AT+ALL?AT+ALL?\r\nReturns multiple lines with all current configuration (see the example you gave)Export all parameters for backup/comparison
CommandSendResponseParameterDefaultNotes
AT+DSCTIMEAT+DSCTIME=40\r\nOK; query: +DSCTIME:120 OK0 disabled, or 10–65535 seconds+DSCTIME:120Automatically restart if no connection is established within X seconds (UDP is connected by default)
AT+ACKTIMEAT+ACKTIME=20\r\nOK; query: +ACKTIME:20 OK0 disabled, or 1–65535 seconds+ACKTIME:1800Restart if there is no downlink data within X seconds; not effective when there is no network
AT+PORTTIMEAT+PORTTIME=20\r\nOK; query: +PORTTIME:20 OK0 disabled, or 10–65535 seconds+PORTTIME:1800Restart if there is no uplink data to the network within X seconds; not effective when there is no network
AT+RESTTIMEAT+RESTTIME=600\r\nOK; query: +RESTTIME:600 OK0 disabled, or 10–2592000 seconds+RESTTIME:0Periodic scheduled restart (seconds)

2.7.12 Cloud Computing Platform / DTU / Web Login

CommandSendResponseParameters / descriptionDefaultNotes
AT+DTUCLOUDAT+DTUCLOUD="20060248","123456"\r\n or AT+DTUCLOUD=1,"20060248","123456"\r\nOK; query: +DTUCLOUD:"20060248","123456"Mode 0/1/2; account 1–64; password 1–128+DTUCLOUD:"20060248","123456"If cloud working mode (1) is used, the working mode is locked to DTU cloud (unlock with AT+DTUCLOUD=0,...); account/password are shared with the MQTT area
AT+WEBLOGINAT+WEBLOGIN="admin","admin"\r\nOK; query: +WEBLOGIN:"admin","admin" OKAccount/password each 1–12 bytes+WEBLOGIN:"admin","12345678"Web login credentials

2.8 PCB Routing Precautions

None.

III. Circuit Engineering

3.1 Circuit Source Engineering

To obtain the source project of the circuit, please follow the official account [Freak Embedded]

3.2 Module Usage Instructions

The schematic diagram of this module is shown below:

SCH_Schematic1_Serial-to-Ethernet Module Based on TAS-755C-V1.0.0_2025-10-24.pdf 2.1 MB

R3 C4 C3 C1 C2 R1 R2 TAS-LAN-755C
TAS-755C-based V1.0

In this module, MRX (corresponding to the UART RXD pin of the MCU) is physically connected to the TAS-LAN-755C TXD pin, and MTX (corresponding to the UART TXD pin of the MCU) is physically connected to the TAS-LAN-755C RXD pin; this follows the "cross-transmit-receive" rule of UART serial communication — the transmit terminal (TX) of each communication party must be connected to the receive terminal (RX) of the counterpart, and this design ensures correct bidirectional UART serial data transmission between the MCU and TAS-LAN-755C.

It is particularly important to note that when using this module, MRX is directly connected to the UART RXD of the MCU, and MTX is directly connected to the UART TXD of the MCU. Do not cross-connect them under any circumstances.

3.3V R1 4.7k SW1 TS24CA 1 2 3 4 TAS-LAN-755C
SW1 SW2 SW3 TS24CA TAS-LAN-755C 3.3V R2 4.7k

As shown in the figure above, the module is equipped with three keys SW1 to SW3, and their functions are described as follows: SW1 serves as the control key for TAS-LAN-755C to enter the command mode. SW2 and SW3 function as the reset pin and firmware burning pin respectively.

TAS-LAN-755C It will automatically reset upon power-up, and there is a built-in 10kΩ pull-up resistor inside, so no additional pull-up resistor is added for SW2.

TAS-755C 4 1 2 3 5V SW3
U3 4 1 2 3 5V

In the schematic diagram, two serial port interfaces are reserved, one is the serial port interface for firmware burning, and the other is the serial port interface for data interaction with MCU.

3.3 Application Experiment

Here, we use the GraftPort-RP2040 development board for testing, and the TAS-755C-based serial-to-Ethernet module uses the UART interface to communicate with the main controller.

Here, we first use the HY2.0-4P cable to connect the module to the GraftPort-RP2040 development board's UART0 interface:

The module connections are shown in the table below:

Development Board Pins

Module Pins

Description

Pin 16

MTX

UART data transmission line, corresponding to the transmit pin of the development board

Pin 17

MRX

UART data transmission line, corresponding to the receiving pin of the development board

Then connect the Ethernet port to the router.

Here, we need to search for the relevant driver packages on uPyPI: https://upypi.net/zh/

106

Enter tas755c_driver to search, and the following will be displayed:

tas755c 0.0.0 TAS755C 2020 2 12

Click to copy the local installation command:

tas755c_driver TAS755C 1.0.0 2024-02-12 TAS-755C

Here, we can use the mip tool to import module driver library code. The following are the usage commands for the mpremote tool:

mpremote mip install github:FreakStudioCN/GraftSense-Drivers-MicroPython/communication/tas755c_driver

Import the TAS-755C driver library - MicroPython driver code, then copy all the files into our project:

3.3.1 Web Backend Configuration

After configuring the tas.set_ip_config Ethernet module's IP via this method, you can access the device's backend. This configuration needs to adapt to the actual network environment at the user's site; it is recommended to set it with reference to the output result of the Windows CMD command executed in the same network environment ipconfig.

IPv4 192.168.2.97 255.255.255.0 192.168.2.21 TAS-755C

All subsequent sample programs will include the following initialization section

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address (Alibaba Cloud public DNS is used here)
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,       
    # Remote service port
    remote_port=9000, 
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=0,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address='"www.cnblogs.com"'
)

In any mode, you can access the web backend via the configured IP Address

TAS-755C 192.168.2.254 12345678 3.3.1

After entering the default password to access the backend, you can graphically set the module parameters (a restart is required for the settings to take effect after completion)

TAS-755C 192.168.2.251 255.255.255.0 192.168.2.1 8.8.8.8 34 46 63 08

3.3.2 DNS Domain Name Resolution Experiment

Import the MicroPython driver code for the TAS-755C-based serial-to-Ethernet module

DNS The specific code for the domain name resolution example is as follows

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : tcp_client.py
# @Description : tas755c DNS domain name resolution test file

# ======================================== Import Modules =========================================

# Import hardware-related modules
import time
from machine import UART, Pin
# Import the third-party driver module
from tas_755c_eth import TAS_755C_ETH

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# This example first opens the target server's TCP, then runs this client example
# Power-on delay of 3 s
time.sleep(3)
# Print debug information
print("FreakStudio:tas755c dns test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create a TAS_755C instance
tas = TAS_755C_ETH(uart0)
# Switch to AT mode
tas.enter_command_mode()

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address (Alibaba Cloud public DNS is used here)
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,       
    # Remote service port
    remote_port=9000, 
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=0,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address='"www.cnblogs.com"'
)

# Save the current settings and restart to apply the configuration
tas.save()
tas.restart()
time.sleep(5)

# Switch to AT mode
tas.enter_command_mode()

# View the current configuration to check whether it took effect
print(tas.get_ip_config())
print(tas.get_tcp_config())

# ========================================  Main Program  ===========================================

while True:
    # Switch to AT mode
    tas.enter_command_mode()
    # Confirm that entering command mode succeeded
    if tas.enter_command_mode()[0]:
        # Raw data
        TCPCFG = tas.get_tcp_config()
        # Split and extract
        parts = TCPCFG[1].split(',')
        ip = parts[3]  # Take the IP directly
        domain = parts[4].strip('"')  # Take the domain name and strip the quotes
        # Output the result
        # IP: 120.26.186.247
        print("IP:", ip)
        # Domain name: www.cnblogs.com
        print("Domain Name:", domain)
        time.sleep(5)

Burn the code, open the terminal, and use REPL to connect to the main controller, then enter the following code:

# Run dns.py as the main program, a unified entry point for dispatching driver examples
import dns

The output is as follows:

TAS-755C 120.26.186.247 3.3.2

Go to the domain name lookup website https://www.boce.com/ enter www.cnblogs.com to perform a query

25 12 17 11 30 41 93 100 0.004s 120.26.186.247

As you can see, we have resolved www.cnblogs.com and obtained its IP Address as 123.26.186.247

3.3.3 UDP SERVER Experiment

After importing the MicroPython driver code for the TAS-755C-based serial-to-Ethernet module, enter the following in the REPL:

# Run udp_server.py as the main program, a unified entry point for dispatching driver examples
import udp_server

udp_server.py The specific code is as follows:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : udp_server.py
# @Description : tas755c server test file

# ======================================== Import Modules =========================================

# Import hardware-related modules
import time
from machine import UART, Pin
# Import the third-party driver module
from tas_755c_eth import TAS_755C_ETH

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# Power-on delay of 3 s
time.sleep(3)
# Print debug information
print("FreakStudio:tas755c server test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create an HC14_Lora instance
tas = TAS_755C_ETH(uart0)
# Switch to AT mode
tas.enter_command_mode()

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,
    # Remote service port
    remote_port=9000,
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=3,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address="192.168.2.97"
)

# Save the current settings and restart to apply the configuration
tas.save()
tas.restart()
time.sleep(5)

# Switch to AT mode
tas.enter_command_mode()

# View the current configuration to check whether it took effect
print(tas.get_ip_config())
print(tas.get_tcp_config())

# Switch back to data mode
tas.enter_data_mode()

# ========================================  Main Program  ===========================================

while True:
    if tas.has_data():
        tas.send_data("Data received!")
        print(tas.read_data().decode('utf-8'))

Download Network Debugging Assistant

NetAssist.exe 641 KB

We configure the network debugging assistant with the protocol type set to UDP, and the remaining configurations are as shown in the figure:

TAS-755C

After the configuration is complete, click the Open button and send any data in the Network Debugging Assistant dialog box:

GraftSense - Serial-to-Ethernet Module Based on TAS-755C (Open Version)

The terminal output the data we sent, and the main control sent back a message confirming that it had received the data.

3.3.4 UDP Client Experiment

After importing the TAS-755C-based Serial-to-Ethernet Module - MicroPython Driver Code, enter the following in the REPL:

# Run udp_client.py as the main program, a unified entry point for dispatching driver examples
import udp_client

udp_server.py The specific code is as follows:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : udp_client.py
# @Description : tas755c udp_client test file

# ======================================== Import Modules =========================================

# Import hardware-related modules
import time
from machine import UART, Pin
# Import the third-party driver module
from tas_755c_eth import TAS_755C_ETH

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# Power-on delay of 3 s
time.sleep(3)
# Print debug information
print("FreakStudio:tas755c udp_client test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create an HC14_Lora instance
tas = TAS_755C_ETH(uart0)
# Switch to AT mode
tas.enter_command_mode()

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,       
    # Remote service port
    remote_port=9000, 
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=2,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address="192.168.2.97"
)

# Save the current settings and restart to apply the configuration
tas.save()
tas.restart()
time.sleep(5)

# Switch to AT mode
tas.enter_command_mode()

# View the current configuration to check whether it took effect
print(tas.get_ip_config())
print(tas.get_tcp_config())

# Switch back to data mode
tas.enter_data_mode()

# ========================================  Main Program  ===========================================
while True:
    if tas.has_data():
        tas.send_data("Data received!")
        print(tas.read_data().decode('utf-8'))

Download the Network Debugging Assistant

NetAssist.exe 641 KB

We configure the network debugging assistant with the protocol type set to UDP, and the remaining configurations are as shown in the figure:

192.168.2.251 10000 192.168.2.297

After the configuration is complete, click the Open button and send any data in the Network Debugging Assistant dialog box:

2020 02 08 17 57 16

The terminal output the data we sent, and the main control sent back a message confirming that it had received the data.

3.3.5 TCP Client Experiment

After importing the TAS-755C-based Serial-to-Ethernet Module - MicroPython Driver Code, enter the following in the REPL:

# Run tcp_client.py as the main program, a unified entry point for dispatching driver examples
import tcp_client

tcp_client.py The specific code is as follows:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : tcp_client.py
# @Description : tas755c tcp_client test file

# ======================================== Import Modules =========================================

# Import hardware-related modules
import time
from machine import UART, Pin
# Import the third-party driver module
from tas_755c_eth import TAS_755C_ETH

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# This example first opens the target server's TCP, then runs this client example
# Power-on delay of 3 s
time.sleep(3)
# Print debug information
print("FreakStudio:tas755c tcp_client test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create a TAS_755C instance
tas = TAS_755C_ETH(uart0)
# Switch to AT mode
tas.enter_command_mode()

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,       
    # Remote service port
    remote_port=9000, 
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=0,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address="192.168.2.97"
)

# Save the current settings and restart to apply the configuration
tas.save()
tas.restart()
time.sleep(5)

# Switch to AT mode
tas.enter_command_mode()

# View the current configuration to check whether it took effect
print(tas.get_ip_config())
print(tas.get_tcp_config())

# Switch back to data mode
tas.enter_data_mode()

# ========================================  Main Program  ===========================================

while True:
    if tas.has_data():
        tas.send_data("Data received!")
        print(tas.read_data().decode('utf-8'))

Download the Network Debugging Assistant

NetAssist.exe 641 KB

We configure the network debugging assistant as follows: since the module acts as the Client, our network debugging assistant serves as the server, and the protocol type is TCP Server; the remaining configurations are shown in the figure:

Configure the communication host address to be consistent with that of the server.

192.168.2.257

After the configuration is complete, click the Open button and send any data in the Network Debugging Assistant dialog box:

GraftSense - Serial-to-Ethernet Module Based on TAS-755C (Open Version)

The terminal output the data we sent, and the main control sent back a message confirming that it had received the data.

3.3.6 TCP Server Experiment

After importing the MicroPython driver code for the TAS-755C-based serial-to-Ethernet module, enter the following in the REPL:

# Run tcp_server.py as the main program, a unified entry point for dispatching driver examples
import tcp_server

tcp_server.py The specific code is as follows:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : tcp_server.py
# @Description : tas755c tcp_server test file

# ======================================== Import Modules =========================================

# Import hardware-related modules
import time
from machine import UART, Pin
# Import the third-party driver module
from tas_755c_eth import TAS_755C_ETH

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# Power-on delay of 3 s
time.sleep(3)
# Print debug information
print("FreakStudio:tas755c tcp_server test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create a TAS_755C instance
tas = TAS_755C_ETH(uart0)
# Switch to AT mode
tas.enter_command_mode()

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,       
    # Remote service port
    remote_port=9000, 
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=1,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address="192.168.2.97"
)

# Save the current settings and restart to apply the configuration
tas.save()
tas.restart()
time.sleep(5)

# Switch to AT mode
tas.enter_command_mode()

# View the current configuration to check whether it took effect
print(tas.get_ip_config())
print(tas.get_tcp_config())

# Switch back to data mode
tas.enter_data_mode()

# ========================================  Main Program  ===========================================

while True:
    if tas.has_data():
        tas.send_data("Data received!")
        print(tas.read_data().decode('utf-8'))

Download Network Debugging Assistant

NetAssist.exe 641 KB

We configure the network debugging assistant as follows: since the module acts as the Client, our network debugging assistant serves as the server, and the protocol type is TCP Client; the remaining configurations are shown in the figure:

The remote host address configuration is consistent with the device address.

TAS-755C

After the configuration is complete, click the Open button and send any data in the network debugging assistant dialog box:

V5.8.13

The terminal outputs the data we sent, and the main control sends back a message indicating that the data has been received.

3.3.7 HTTP Request Experiment

We use the MicroPython driver code for the TAS-755C-based serial-to-Ethernet module, where the host computer runs the HTTP server file

http_server folder http_serve.py, the specific code is as follows:

# Python env   : Python v3.13
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : 侯钧瀚
# @File    : http_sever.py
# @Description : Simple HTTP server example code
# ======================================== Import Modules =========================================

from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import TCPServer
import socket
import sys
import os

# ======================================== Global Variables ============================================


HOST = "0.0.0.0"  # 0.0.0.0 allows access from all network devices (use localhost or 127.0.0.1 for local only)
PORT = 8080        # Listening port (recommend choosing an unused port such as 8000/8080/9090)

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# Completely disable standard error output
class DevNull:
    def write(self, msg):
        pass
    def flush(self):
        pass

class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
    """Custom request handler, overrides the GET request logic"""

    def _set_response(self, status_code=200, content_type="text/html"):
        """Set the HTTP response headers (status code, content type, etc.)"""
        self.send_response(status_code)
        self.send_header("Content-type", content_type)
        self.send_header("Server", "Python-Simple-HTTP-Server")  # Server identifier
        self.end_headers()  # End the response headers (must be called)

    def do_GET(self):
        """Handle GET requests (core logic)"""
        # 1. Print the request log (console output)
        client_ip, client_port = self.client_address  # Get the client IP and port
        print(f"\n[新请求]")
        print(f"  客户端: {client_ip}:{client_port}")
        print(f"  方法: {self.command}")  # Request method (GET/POST, etc.)
        print(f"  路径: {self.path}")    # Request path (such as / or /test)
        print(f"  协议: {self.request_version}")

        # 2. Build the response content (HTML format supported, customizable)
        response_html = f"""
        <html>
            <head><title>Python Simple HTTP Server</title></head>
            <body style="text-align: center; margin-top: 50px;">
                <h1>✅ Server responded successfully!</h1>
                <p>Request information:</p>
                <p>Client IP: {client_ip}:{client_port}</p>
                <p>Request method: {self.command}</p>
                <p>Request path: {self.path}</p>
                <p>Server port: {PORT}</p>
                <hr>
                <p style="color: #666;">Powered by Python http.server</p>
            </body>
        </html>
        """

        # 3. Send the response (set the response headers first, then send the content)
        self._set_response(status_code=200)  # 200 = Success
        # Convert the string to a byte stream (HTTP transmission requires bytes)
        self.wfile.write(response_html.encode("utf-8"))

    def do_POST(self):
        """Handle POST requests"""
        # 1. Print the request log
        client_ip, client_port = self.client_address
        print(f"\n[新请求]")
        print(f"  客户端: {client_ip}:{client_port}")
        print(f"  方法: {self.command}")
        print(f"  路径: {self.path}")
        print(f"  协议: {self.request_version}")

        # 2. Read the POST data
        content_length = int(self.headers['Content-Length']) if self.headers.get('Content-Length') else 0
        post_data = self.rfile.read(content_length).decode('utf-8') if content_length > 0 else ''
        print(f"  POST 数据: {post_data}")

        # 3. Build the response content
        response_html = f"""
        <html>
            <head><title>Python Simple HTTP Server</title></head>
            <body style="text-align: center; margin-top: 50px;">
                <h1>✅ POST request handled successfully!</h1>
                <p>Request information:</p>
                <p>Client IP: {client_ip}:{client_port}</p>
                <p>Request method: {self.command}</p>
                <p>Request path: {self.path}</p>
                <p>POST data: {post_data}</p>
                <p>Server port: {PORT}</p>
                <hr>
                <p style="color: #666;">Powered by Python http.server</p>
            </body>
        </html>
        """

        # 4. Send the response
        self._set_response(status_code=200)
        self.wfile.write(response_html.encode("utf-8"))

    def log_message(self, format, *args):
        """Disable the default log (optional, avoids redundant console output)"""
        return


def run_simple_http_server():
    """Start the HTTP server"""
    # Create a TCP server instance (bind host + port, specify the request handler)
    server_address = (HOST, PORT)
    httpd = TCPServer(server_address, SimpleHTTPRequestHandler)

    # Print the startup information
    print(f"📡 Python 简单 HTTP 服务器已启动")
    print(f"  访问地址: http://{socket.gethostbyname(socket.gethostname())}:{PORT}")
    print(f"  本地访问: http://localhost:{PORT} 或 http://127.0.0.1:{PORT}")
    print(f"  提示: 按 Ctrl+C 关闭服务器")

    try:
        # Keep listening for requests (blocking mode)
        httpd.serve_forever()
    except KeyboardInterrupt:
        # Catch the Ctrl+C signal and shut down the server gracefully
        print(f"\n🔌 正在关闭服务器...")
        httpd.server_close()  # Close the server connection
        print(f"✅ 服务器已关闭")

# ======================================== Initialization ==========================================

# ========================================  Main Program  ===========================================
sys.stderr = DevNull()
if __name__ == "__main__":
    run_simple_http_server()

A terminal will pop up after opening, and the access address may vary slightly depending on the user's network environment:

192.168.2.97 8080 127.0.0.1

After importing the files in the code folder of the TAS-755C-based serial port to Ethernet module-MicroPython driver code , enter in the REPL :

# Run http_test.py as the main program, a unified entry point for dispatching driver examples
import http_test

http_test.py The specific code is as follows:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : http_test.py
# @Description : tas755c HTTP test file

# ======================================== Import Modules =========================================

# Import hardware-related modules
import time
from machine import UART, Pin
# Import the third-party driver module
from tas_755c_eth import TAS_755C_ETH

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# This example first opens the target server's TCP, then runs this client example
# Power-on delay of 3 s
time.sleep(3)
# Print debug information
print("FreakStudio:tas755c http test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create a TAS_755C instance
tas = TAS_755C_ETH(uart0)
# Switch to AT mode
tas.enter_command_mode()

# Configure the IP parameters of the tas
tas.set_ip_config(
    # (0=Static, 1=DHCP)
    mode=0,
    # Static IP of the tas device
    ip="192.168.2.251",
    # Gateway address
    gateway="192.168.2.1",
    # Subnet mask
    subnet="255.255.255.0",
    # DNS server address (Alibaba Cloud public DNS is used here)
    dns="223.5.5.5"
)

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,
    # Remote service port
    remote_port=8080,
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=8,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address='192.168.2.97'
)

tas.set_http_config(
    # Network status (0=Disabled, 1=Enabled).
    net_status=1,
    # Request method (0=POST, 1=GET).
    method=0,
    # Whether to return the header (0=No, 1=Yes).
    header_return=1
)

# Save the current settings and restart to apply the configuration
tas.save()
tas.restart()
time.sleep(5)

# Switch to AT mode
tas.enter_command_mode()

# View the current configuration to check whether it took effect
print(tas.get_ip_config())
print(tas.get_tcp_config())

# Switch back to data mode
tas.enter_data_mode()
# Send HTTP request test data
tas.send_data("http.request.test")

# ========================================  Main Program  ===========================================

while True:
    # Read data
    if tas.has_data():
        print(tas.read_data().decode('utf-8'))
        time.sleep(5)



Here are the key settings users need to pay attention to:

# Configure TCP/UDP parameters
tas.set_tcp_config(
    # Local port of the tas device
    local_port=8080,
    # Remote service port
    remote_port=8080,
    # 0=TCP Client 1=TCP SERVER 2=UDP Client 3=UDP SERVER 8=HTTP mode
    mode=8,
    # Remote server IP (same as the IP of the communicating host; the user must check and change it)
    # To resolve a domain name, add quotes '"domain name"'
    # An IP address does not need quotes "IP address"
    remote_address='192.168.2.97'
)

tas.set_http_config(
    # Network status (0=Disabled, 1=Enabled).
    net_status=1,
    # Request method (0=POST, 1=GET).
    method=0,
    # Whether to return the header (0=No, 1=Yes).
    header_return=1
)

After running the code, we will send a request according to the settings and print the received message in the terminal:

1 192.168.2.23

It can be seen that when method= 1, the request uses the GET method;

TAS-755C 1

It can be seen that when method= 0, the request uses the POST method.

Download Network Debugging Assistant

NetAssist.exe 641 KB

We configure the network debugging assistant with the protocol type set to UDP, and the remaining configurations are as shown in the figure:

GraftSense - Serial-to-Ethernet Module Based on TAS-755C (Open Version)

After the configuration is complete, click the Open button, and then send any data in the Network Debugging Assistant dialog box:

TAS-755C

The terminal output the data we sent, and the main controller sent back a message confirming the received data.

IV. Drivers

tas755c_driver.zip 23 KB

None.

VI. Revision History

Document Version

Date of Modification

Modifier

Modified Content

v1.0

2025-10-24

Ling Gaoxing

Initialize the document

v1.1

2025-12-29

Li Zisheng

Added application experiments and production files

v1.2

2025-12-31

Xin Ruili

Create an open version of the document based on the internal document version v1.1.

v1.3

2026-03-29

Xin Ruili

Modified the application experiment section.

VII. Relevant Materials

7.1 Chip Datasheet

Configuration Software

Tool V4.9.4 D202301216.exe 9.6 MB

Package Design:

05_Package Design.rar 2.7 MB

Datasheet:

TAS-LAN-755C_Datasheet V1.0.1.pdf 4.3 MB

TAS-LAN-755C_AT Command Set_V1.0.1.pdf 597 KB

TAS-LAN-755C&755W Product Datasheet V1.0.1.pdf 382 KB

7.2 Unique Icons for PCB Silkscreen

TAS-755C