0% found this document useful (0 votes)
55 views

EEPROM CH341A programmer - Read and write data to chip on Linux - LinuxConfig

Breve explicacion para poder usar los programadores que usen el CH341A en el sistema operativo Linux.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

EEPROM CH341A programmer - Read and write data to chip on Linux - LinuxConfig

Breve explicacion para poder usar los programadores que usen el CH341A en el sistema operativo Linux.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

Ubuntu Debian Redhat / CentOS / AlmaLinux Fedora Kali Linux

1 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

EEPROM CH341A programmer – Read


and write data to chip on Linux
16 September 2022 by Lubos Rendek

In this tutorial we will use CH341A programmer to read, write and erase data/
firmware on attached chip. This is your getting started guide to CH341A
programmer. CH341A programmer allows users to attach variety of chips in order
to read or backup firmware or overwrite the exiting firmware.

In this tutorial you will learn:

• How to compile ch341eeprom software


• How to read data from chip via CH341A
• How to write data to chip via CH341A
• How to erase data from chip via CH341A

2 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

EEPROM CH341A programmer – Read and write data to chip on Linux

Software Requirements and Linux Command Line Conventions

Category Requirements, Conventions or Software Version Used

System Debian/Ubuntu

Software ch341eeprom

Privileged access to your Linux system as root or via the sudo


Other
command.

# – requires given linux commands to be executed with root


privileges either directly as a root user or by use of sudo command
Conventions
$ – requires given linux commands to be executed as a regular
non-privileged user

EEPROM CH341A programmer on Linux

3 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

There is a plentiful of software available on Linux to deal with EEPROM CH341A


programmer. Many of them are available via standard Debian repository such as
flashrom .

However, after multiple attempts I have not been able to use any of the tools to
recognise my CH341A programmer and the chip. After days of searching I have
settled with ch341eeprom software.

Step 1 Let’s get started with all prerequisites:

# apt install git make libusb-1.0-0-dev clang

Step 2 In the next step we will clone the ch341eeprom repository.

git clone https://github.com/plumbum/ch341eeprom.git

4 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

Step 3 Now navigate to a directory and execute the make command to compile
the source code:

$ cd ch341eeprom
$ make

Step 4 Once you have compiled the software locate the executable ch341eeprom .
Feel free to execute the newly compiled software now. The output should look as
follows:

$ ./ch341eeprom
ch341eeprom - an i2c EEPROM programming tool for the WCH CH341a IC
Version 0.5 copyright (c) 2011 asbokid <[email protected]>

This program comes with absolutely no warranty; This is free software,


and you are welcome to redistribute it under certain conditions:
GNU GPL v3 License: http://www.gnu.org/licenses/gpl.html

Usage:
-h, --help display this text
-v, --verbose verbose output
-d, --debug debug output
-s, --size size of EEPROM {24c01|24c02|24c04|24c08|24c16|24c32|24c64|24c128|24c256|24c
-e, --erase erase EEPROM (fill with 0xff)
-w, --write write EEPROM with image from filename
-r, --read read EEPROM and save image to filename

Example: ch341eeprom -v -s 24c64 -w bootrom.bin

Step 5 Insert the EEPROM CH341A programmer with the chip into the USB

5 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

port. Following the above example execute the following commands while
changing command arguments to fit your needs:

READ(backup) CHIP with size 24c32

$ ./ch341eeprom -v -s 24c32 -r firmware.bin

WRITE to CHIP with size 24c128

$ ./ch341eeprom -v -s 24c128 -w firmware.bin

ERASE chip with size 24c128

$ ./ch341eeprom -v -s 24c128 -e

6 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

Write firmware with EEPROM CH341A programmer

Conclusion
In this tutorial, we saw how to read, write and erase data on the chip using
EEPROM CH341A programmer. As already mentioned I was unable to use
standard tools like flashrom to access chip via CH341A programmer. If you have
different experience or other tools to work with EEPROM CH341A programmer
leave the comments below.

Related Linux Tutorials:

• Best Linux Distro: How to Choose Guide for Every User


• An Introduction to Linux Automation, Tools and Techniques
• Ubuntu 22.04 System Backup and Restore

7 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

• Things to do after installing Ubuntu 22.04 Jammy…


• Things to install on Ubuntu 22.04
• Ubuntu 22.04 Guide
• How to check firmware version on Raspberry Pi
• How to create a backup with Proxmox backup client
• Quick Guide to Securely Erasing Files in Linux
• How to create incremental and differential backups with tar

Programming & Scripting


commands, Hardware, programming, storage
How to remove alias on Linux
How to install and setup Ghost CMS on Ubuntu

Comments and Discussions

8 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

5 replies

Luigi_Provencher April 2023


“make” doesn’t work for me so what next?

1 reply

Jose_C ▶ Luigi_Provencher May 2023


Using Debian Bullseye here, the warning/error messages that I got and how I made it work:
Warning: ch341funcs.c:61:5 warning ‘libusb_set_debug’ is deprecated…
Fix: Open/Edit “ch341funcs.c” and go to line 61 and change “libusb_set_debug” to
“libusb_set_option”, keep this file open, don’t close it yet…
Error: clang: error: multiple definition of ‘readbuf’…
Fix: at the same file “ch341funcs.c” search for “readbuf” and replace it for something that
makes sense, “readbuf” means “read buffer” so that’s what I did, replace “readbuf” to
“readbuffer”, make sure that you replace it in this three lines, line 34, line 256 and line 320.
Save the file and try again, it will compile at the first attempt.

1 reply

IVAN_KOSOLAPOV ▶ Jose_C September 2023


Please see my universal (93xxx, 24xxx, 25xxx chips supported) linux program _github.com/
bigbigmdm/IMSProg

1 reply

IVAN_KOSOLAPOV ▶ IVAN_KOSOLAPOV September 2023

9 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

IVAN_KOSOLAPOV October 2023

10 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

Continue Discussion

11 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

NEWSLETTER TAGS FEATURED LATEST


TUTORIALS TUTORIALS
Subscribe to Linux 18.04
Career How to install the How to Secure GRUB
Newsletter to administration NVIDIA drivers on Boot Loader with
receive latest news, apache applications Ubuntu 22.04 Password
jobs, career advice
backup bash beginner How to mount USB drive How to Install KDE
and featured
browser centos centos8 in Linux Plasma on Linux Mint
configuration
tutorials. commands database How to install tar.gz file Protecting Data Integrity
on Linux on Ext4 and XFS with
debian desktop dm-integrity and LUKS
How to enable/disable
development docker wayland on Ubuntu Findmnt Command:

12 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

error fedora filesystem Desktop Querying Filesystems in


SUBSCRIBE
gaming gnome Linux Made Easy
firewall Linux IP forwarding
Hardware installation How to install Ubuntu on
Netplan static IP on
WRITE FOR US Windows
kali multimedia Ubuntu configuration
How to resize ext4 root
networking nvidia Google Chrome for
LinuxConfig is partition live without
Linux: Download and
programming python umount on Linux
looking for a Installation
raspberrypi redhat rhel8
technical writer(s) SSHuttle: A VPN-Like
Ubuntu Network
geared towards scripting security Tool for Secure Traffic
Configuration Guide
GNU/Linux and server ssh storage Routing
FLOSS How to Check NVIDIA
technologies. Your terminal ubuntu Driver Version on Linux
How to Backup and
Restore UFW on Linux
articles will feature ubuntu 20.04 video How to find my IP
various GNU/Linux How to Test Network
virtualization webapp address on Ubuntu Linux
configuration (ethernet) Speed on
webserver Change IP address on
tutorials and Linux CLI with iperf3
Ubuntu Server
FLOSS How to Install a Desktop
technologies used How to use curl to get
ABOUT US (GUI) on Ubuntu Server
in combination with public IP address
Understanding Bash
GNU/Linux How to install the
Command Syntax: A
operating system. NVIDIA drivers on
Beginner’s Tutorial
Ubuntu 20.04 Focal
Best Small Linux Distros
When writing your Fossa Linux
for 2024
articles you will be How to make a bootable
expected to be able Fedora 41 released. Here
USB from an ISO in
to keep up with a is what’s new
Linux
technological How to Use Bash
How to install missing

13 of 14 12/4/24, 10:14
EEPROM CH341A programmer - Read and write data to chip on Linux - Linux... https://linuxconfig.org/eeprom-ch341a-programmer-read-and-write-data-to-chi...

advancement ifconfig command on Autoincrement Variables


regarding the Linux and Counters Effectively
above mentioned
How to install Yum on Exploring the
technical area of
Linux Foundations of Linux: A
expertise. You will Look at Major
Ubuntu 24.04 LTS vs
work independently Distributions and Their
22.04 LTS: A Comparison
and be able to Base Systems
Guide and What’s New
produce at
Automate Dynamic IP
minimum 2 Ubuntu Remote Desktop
Updates for Your Domain
technical articles a Access from Windows
with Cloudflare and Bash
month. 10/11
Script
How to Install Adobe
How to Save a Script on
Acrobat Reader on
APPLY NOW Terminal
Ubuntu and Debian
Linux How to Allow Short
Passwords in Linux
Resolving the ‘No Space
Left on Device’ Error on Setting Up VNC Server/
Linux Client on Ubuntu Linux

Ubuntu Static IP How to Repackage an


configuration Ubuntu ISO Image for
Autoinstall Using YAML
Bash Scripting Tutorial

© 2024 TOSID Group Pty Ltd - LinuxConfig.org

14 of 14 12/4/24, 10:14

You might also like