8000 GitHub - DiUS/cp210x-cfg: CLI utility for programming CP210x USB<->UART bridges · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2FGitHub.com%2FDiUS%2Fcp210x-cfg","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E\u0026source=header-repo\u0026source_repo=DiUS%2Fcp210x-cfg","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://GitHub.com/DiUS/cp210x-cfg\",\"user_id\":null}}","auth_hydro_click_hmac":"4b0735722dce39810e2bac015069f874afd3c287d3128c0d73beb5c45ad72dd1"}}

About

CLI utility for programming CP210x USB<->UART bridges

Resources

Stars

115 stars

Watchers

14 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cp210x-cfg

CLI utility for programming CP210x USB<->UART bridges

Intended as a scriptable alternative to the official Silicon Labs CP21xx Customization Utility.

Tested with CP2102 and CP2105 chips.

Supported fields that can be programmed:

  • Vendor ID
  • Product ID
  • Product Name string
  • Serial string
  • Buffer flush bitmap
  • SCI/ECI gpio/modem mode

CAUTION

Programming a CP210x config field is a write-once operation. It's perfectly possible to write bad values. The consequences are yours, and yours alone.

Suffice to say that I've got a couple of modules which have a VID/PID of 0000:0000. Don't do that. If you happen to screw up the VID/PID anyway, in Linux you can sort-of work around it by registering the new VID/PID combo with the cp210x driver like so:

echo 0000 0000 | sudo tee /sys/bus/usb-serial/drivers/cp210x/new_id

Consider yourself forewarned, and forearmed.

Examples

####Showing the built-in help message (may differ from below)

$ ./cp210x-cfg -h
Syntax:
cp210x-cfg [-h ] |
           [-m vid:pid] [-d bus:dev]
           [ -l | [-V vid] [-P pid] [-F flush] [-M mode] [-N name] [-S serial]]

  -h            This help
  -m vid:pid    Find and use first device with vid:pid
  -d bus:dev    Find and use device at bus:dev
  -l            List all CP210x devices connected
  -V vid        Program the given Vendor ID
  -P pid        Program the given Product ID
  -F flush      Program the given buffer flush bitmap (CP2105 only)
  -M mode       Program the given SCI/ECI mode (CP2105 only)
  -N name       Program the given product name string
  -S serial     Program the given serial string

Unless the -d option is used, the first found CP210x device is used.
If no programming options are used, the current values are printed.

Switching a CP2105 into modem mode

$ sudo ./cp210x-cfg -d 4.113 -M 0
ID 10c4:ea70 @ bus 004, dev 113: CP2105 Dual USB to UART Bridge Controller
Model: CP2105
Vendor ID: 10c4
Product ID: ea70
Name: CP2105 Dual USB to UART Bridge Controller
Serial: 007079CC
Flush buffers: 33
SCI/ECI mode: 0000

About

CLI utility for programming CP210x USB<->UART bridges

Resources

Stars

115 stars

Watchers

14 watching

Forks

Releases

Packages

Contributors

Languages

0