From 373bb32332b117236720af0ff971769fc5930ba6 Mon Sep 17 00:00:00 2001 From: James McKenzie Date: Mon, 15 Dec 2014 12:05:41 +0000 Subject: fish --- .../cp210x-program/doc/45-cp210x-programming.rules | 9 ++ contrib/cp210x-program/doc/cp210x.txt | 107 +++++++++++++++++ contrib/cp210x-program/doc/index.html | 129 +++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 contrib/cp210x-program/doc/45-cp210x-programming.rules create mode 100644 contrib/cp210x-program/doc/cp210x.txt create mode 100644 contrib/cp210x-program/doc/index.html (limited to 'contrib/cp210x-program/doc') diff --git a/contrib/cp210x-program/doc/45-cp210x-programming.rules b/contrib/cp210x-program/doc/45-cp210x-programming.rules new file mode 100644 index 0000000..84c32b2 --- /dev/null +++ b/contrib/cp210x-program/doc/45-cp210x-programming.rules @@ -0,0 +1,9 @@ +# udev rules file for CP210x device to be programmable py +# cp210x-program + +SUBSYSTEM!="usb_device", GOTO="cp210x-programming_rules_end" + +SYSFS{idVendor}=="10C4", SYSFS{idProduct}=="EA60", MODE="0660", GROUP="plugdev" +SYSFS{idVendor}=="10C4", SYSFS{idProduct}=="EA61", MODE="0660", GROUP="plugdev" + +LABEL="cp210x-programming_rules_end" diff --git a/contrib/cp210x-program/doc/cp210x.txt b/contrib/cp210x-program/doc/cp210x.txt new file mode 100644 index 0000000..f9b2156 --- /dev/null +++ b/contrib/cp210x-program/doc/cp210x.txt @@ -0,0 +1,107 @@ + + +COMMAND: 0xFF (ACCESS EEPROM) +INDEX SIZE VALUE +0x3701 2 VENDOR ID +0x3702 2 PRODUCT ID +0x3703 - PRODUCT STRING +0x3704 - SERIAL NUMBER +0x3705 ? ? (bmAttribute?) +0x3706 1 MAX POWER (2mA) - +0x3707 2 BCD DEV VERSION - +0x3708 ? ? +0x3709 1024 EEPROM DUMP +0x370A 1 LOCK VALUE +0x370B 1 PART NUMBER + +COMMAND: 0x0F UNKNOWN + +HEXFILE: + +0x3808: 256 Bytes PRODUCT STRING (incl length and language) +0x3908: 128 Bytes SERIAL NUMBER (incl length and language) +0x3987: 1 Byte probably PART NUMBER +0x3988: 18 Byte DEVICE DESCRIPTOR +0x399A: 32 Byte CONFIG DESCRIPTOR +0x39C3: ? Byte VENDOR STRING +0x39FF: 1 Byte LOCK VALUE + +1201100100000040ad139999020001020301 + +02 +1201100100000040AD139999326401020301 + +090220000101008096 +0904000002FF000002 +07058102400000 +07050102400000 +000000000000000000 +1A03530069006C00690063006F006E0020004C00610062007300000000 +00000000000000000000000000000000 +000000000000000000000000000000FF + +:10360000FFF0FFFA010060E31600FFF0FFFA01008F +:1036100060E31600FFECFFF80100804F1200FFE4AA +:10362000FF40010050F80C00FFD6FF40010000CA27 +:103630000800FFD0FFEE010020A10700FFCCFFEC47 +:10364000010000080700FFA2FFDC010000E8030002 +:10365000FFA0FFDC010090D00300FF98FFD901001C +:1036600000840300FF64FFC5010000580200FF440E +:10367000FFB9010000F40100FF2CFF40010000C26F +:103680000100FEC8FF8B0100002C0100FE89FF73C2 +:10369000010000FA0000FE5FFF63010000E100008E +:1036A000FE53FF5F0100C0DA0000FE2BFF50010057 +:1036B00000C80000FD8FFF15010000960000FCBF50 +:1036C000FEC7010080700000FB1EFE2B0100004BB6 +:1036D0000000FA24FE0C0100803E0000F97DFE0C83 +:1036E000010040380000F63CFE0C0100802500007F +:1036F000F2FBFE0C0100201C0000EC78FE0C010027 +:10370000C0120000E890FE0C0100A00F0000D8F0ED +:10371000FE0C010060090000CBEBFE0C0100080765 +:103720000000B1E0FE0C0100B004000063C0FE0C1C +:10373000010058020000B1E0FE0C04002C01000062 +:103740000000000000000000000000000000000079 +:103750000000000000000000000000000000000069 +:103760000000000000000000000000000000000059 +:103770000000000000000000000000000000000049 +:103780000000000000000000000000000000000039 +:103790000000000000000000000000000000000029 +:1037A0000000000000000000000000000000000019 +:1037B0000000000000000000000000000000000009 +:1037C00000000000000000000000000000000000F9 +:1037D00000000000000000000000000000000000E9 +:1037E00000000000000000000000000000000000D9 +:1037F00000000000000000000000000000000002C7 +:1038000004030904000000002203500052004F008E +:10381000440055004300540020005300540052005F +:1038200049004E0047002100210065007200200081 +:1038300042007200690064006700650020004300D8 +:103840006F006E00740072006F006C006C00650009 +:1038500072000000000000000000000000000000F6 +:103860000000000000000000000000000000000058 +:103870000000000000000000000000000000000048 +:103880000000000000000000000000000000000038 +:103890000000000000000000000000000000000028 +:1038A0000000000000000000000000000000000018 +:1038B0000000000000000000000000000000000008 +:1038C00000000000000000000000000000000000F8 +:1038D00000000000000000000000000000000000E8 +:1038E00000000000000000000000000000000000D8 +:1038F00000000000000000000000000000000000C8 +:1039000000000000000000120331003100300030E0 +:1039100000300033003200380000000000000000DA +:103920000000000000000000000000000000000097 +:103930000000000000000000000000000000000087 +:103940000000000000000000000000000000000077 +:103950000000000000000000000000000000000067 +:103960000000000000000000000000000000000057 +:103970000000000000000000000000000000000047 +:1039800000000000000000021201100100000040D1 +:10399000AD1399993264010203010902200001016B +:1039A0000080960904000002FF0000020705810262 +:1039B0004000000705010240000000000000000078 +:1039C0000000001A03530069006C00690063006F77 +:1039D000006E0020004C00610062007300000000D7 +:1039E00000000000000000000000000000000000D7 +:1039F000000000000000000000000000000000FFC8 +:00000001FF diff --git a/contrib/cp210x-program/doc/index.html b/contrib/cp210x-program/doc/index.html new file mode 100644 index 0000000..1998469 --- /dev/null +++ b/contrib/cp210x-program/doc/index.html @@ -0,0 +1,129 @@ + + + + + +CP210x Programmer + + +

CP210x Programmer

+ +

+ ATTENTION: THIS VERSION OF cp210x-program IS NOT FULLY TESTED. +IT MAY RENDER YOUR CP210x USELESS OR DESTROY IT. +

+ + + +

+Be aware that the current version is only tested on CP2102. +

+ +

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

+ +

+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. +

+ + +
+
Version:
0.2
+
Author:
Johannes Hölzl <johannes.hoelzl@gmx.de>
+
+ +

Dependencies

+ + + +

+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. +

+ +

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
+
+ +

TODO

+ + + +

Development

+ + + +

Links

+ + + +

License

+ +

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

+ + -- cgit v1.2.3