Git Product home page Git Product logo

cp210x-program's Introduction

cp210x-program

The goal of this library is to provide access to the EEPROM of an Silabs CP210x under Linux.

Warning

THIS VERSION OF cp210x-program IS NOT FULLY TESTED. IT MAY RENDER YOUR CP210x USELESS OR DESTROY IT. Be aware that the original (and current) version was only tested on CP2102.

The CP210x is an USB-to-serial chip used in a lot of USB devices (similar to FTDIs and PL2303). The CP210x has a EEPROM on the chip which can be programmed via USB. Silabs provides already a library and gui programm to program this EEPROM, but only for windows.

This project uses results from monitoring the USB bus when the windows library programms an CP210x. The windows library was not disassembled for this protocol analysis.

When the programm is finished, a later goal would be to provide a library which can be used to access further functions of the CP210x like the general IO pins of the CP2103. The goal is not to provide an tty driver, such driver exists already for linux and BSD.

Dependencies

  • Python >= 3
  • PyUSB

Since libusb is available on most Linux, Mac OS X and FreeBSD cp210x-program should run flawlessly on these platforms. Currently it is only tested on Linux 2.6 (Ubuntu).

If cp210x-program should run as non-root user, add the udev rule found in doc/45-cp210x-programming.rules to /etc/udev/rules.d. When devices with already programmed IDs are reprogrammed at this IDs to 45-cp210x-programming.rules.

Install deps on Ubuntu:

$ sudo apt install python3-usb

Usage

Read EEPROM content into hexfile:

$ cp210x-program --read-cp210x -f eeprom-content.hex

Show EEPROM content from device 002 on bus 001:

$ cp210x-program --read-cp210x -m 001/002

Write some data to device with vendor id 0x10C4 and product id 0xEA62:

$ cp210x-program --write-cp210x -m 10C4:EA62 \
               --set-product-string="Product String" \
               --set-max-power=100 \
               --set-bus-powered=no

Write default data to device:

$ cp210x-program --write-cp210x -F testdata/cp2102-orig.hex

This is for example required when the baud rate table is corrupted and the CP210x always uses 500kBit/sec as baudrate.

TODO

  • Test on other than CP2102
  • Implement CP2103 GIOP settings
  • Implement GUI

http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Interface/en/an144.pdf http://www.silabs.com/public/documents/software_doc/othersoftware/Microcontrollers/Interface/en/an144sw.zip

  • AN205 CP210x Baudrate Guide:

http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Interface/en/an205.pdf http://www.silabs.com/public/documents/software_doc/othersoftware/Microcontrollers/en/AN205SW.zip

  • AN223 Port Configuration and GPIO for CP210x

http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/Interface/en/an223.pdf http://www.silabs.com/public/documents/software_doc/othersoftware/Microcontrollers/Interface/en/AN223SW.zip

License

The python package 'cp210x' and the python script 'cp210x-program' are provided under the terms of the GNU LGPL. See LICENSE.

cp210x-program's People

Contributors

hedda avatar hramrach avatar johoelzl avatar laf0rge avatar sarnold avatar sjlc avatar twischer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.