FreeCalypso > hg > fc-usbser-tools
annotate doc/CP2102-EEPROM-tools @ 106:de3b299561b3
udev: add rules file that works on my system
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 05 Oct 2023 01:08:28 +0000 |
parents | 4f72e09fb698 |
children |
rev | line source |
---|---|
101
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 The present package includes a set of command line tools for reading and |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 modifying the EEPROM content of Silabs CP2102 USB-serial adapters. These tools |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 have been developed because: |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 * CP2102 adapters hold significance in FreeCalypso family of projects: it is |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 the most common USB-serial chip in cables that connect from USB to the headset |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 jack serial port of Motorola C1xx and Openmoko GTA01/02 phones, and the same |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 chip also appears inside the legendary Pirelli DP-L10 phone. |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 * Classic CP2102 (as opposed to CP2102N) requires EEPROM reprogramming to switch |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 between 230400/460800/921600 and 203125/406250/812500 baud rates. |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 * The original Python tools that were once popularized via OsmocomBB wiki are |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 an enormous pain for those of us who aren't interested in Python view of the |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 world, plus dependency hell. |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 The present tools support only classic CP2102, not CP2102N or CP2105. The |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 latter chips aren't supported because: |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 * CP2102N does not remap baud rates like classic CP2102, hence the primary |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 reason for having to delve into EEPROM configuration is eliminated; |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 * CP2105 cannot be casually programmed at all because it is OTP, and I am not |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 in the business of designing ZIF socket fixtures for tiny QFN packages and |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 burning through sacrificial chips. |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 Basic usage |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 =========== |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 If have a CP2102-25 USB to headset jack cable from Sysmocom, or some other |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 CP2102 adapter at the default USB ID 10C4:EA60, you can check its current baud |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 rate configuration by running: |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 cp2102-read-baudtab |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 Without any options, this command will look for a connected CP2102 device at |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 the default USB ID, read out its EEPROM and dump its 32-entry baud rate table. |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 Looking at this printed table, you can immediately tell if your adapter is |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 currently configured for 230400/460800/921600 or for 203125/406250/812500 baud. |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 To program the EEPROM for GSM baud rates (203125/406250/812500 bps), run this |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 command: |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 cp2102-update-eeprom -b gsm |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 To program the EEPROM for "standard" baud rates (230400/460800/921600 bps), run |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 this command: |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 cp2102-update-eeprom -b std |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 After this programming operation, unplug and replug the USB device - see |
ba741a1af0e3
doc/CP2102-EEPROM-tools: article started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 Replug-after-EEPROM-write article for more info. |
102
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
53 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
54 More detailed theory |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
55 ==================== |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
56 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
57 FreeCalypso CP2102 EEPROM tools are built on a different principle than our FTDI |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
58 EEPROM tools. In the case of FTDI chips, our tools are designed to generate |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
59 EEPROM images de novo - this approach is necessary because in the case of |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
60 FT2232x and other FTDI chips that use external EEPROMs, those EEPROMs start out |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
61 blank. The internal EEPROM of CP2102 is different - this EEPROM already holds |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
62 a valid image as the chip leaves Silabs, and valid EEPROM content is required |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
63 for this chip to function - thus there is no use case for constructing CP2102 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
64 EEPROM images de novo. Instead we provide the following tools for CP2102: |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
65 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
66 * cp2102-read-eeprom reads the full EEPROM content out of the chip and saves it |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
67 in an Intel HEX file. The file format has been copied from Python-language |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
68 cp210x-program-1.0 and is suspected (without certain proof) of also being the |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
69 format used by Silabs' own tools. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
70 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
71 * cp2102-write-eeprom programs the chip's EEPROM with a new image read from an |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
72 Intel HEX file. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
73 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
74 * cp2102-decode-baudtab and cp2102-decode-ee-desc read Intel HEX images of |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
75 EEPROMs and decode portions of interest: the baud rate table and USB |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
76 descriptors, respectively. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
77 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
78 * cp2102-patch-ee-image reads an Intel HEX EEPROM image, applies a set of |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
79 patches to it, and writes out a new Intel HEX EEPROM image. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
80 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
81 * cp2102-update-eeprom applies a set of EEPROM patches directly in place: reads |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
82 current EEPROM content from a physical chip, applies the desired patches and |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
83 writes the new EEPROM image into the hardware. This utility replaces the |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
84 cumbersome sequence of cp2102-read-eeprom, cp2102-patch-ee-image and |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
85 cp2102-write-eeprom for most common workflows. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
86 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
87 * cp2102-read-baudtab combines the steps of cp2102-read-eeprom and |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
88 cp2102-decode-baudtab into a single command that works without intermediate |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
89 files - an easy utility for the common use case of checking the current baud |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
90 rate table programming. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
91 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
92 Selecting the device to operate on |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
93 ================================== |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
94 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
95 By default our CP2102 tools look for USB ID 10C4:EA60, which is the default ID |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
96 code for CP2102; if there is more than one USB device with this ID, the tool |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
97 hits the first matching device it finds. If you need to operate on a CP2102 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
98 chip whose ID code has been changed away from the default, or if you need to |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
99 select one of several USB devices with the same ID code, you can pass a device |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
100 selector string (see FTDI-EEPROM-tools article - we've implemented the same |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
101 mechanism for CP2102, even though it originates from libftdi) with -d option. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
102 For example, to read the baud rate table from the CP2102 inside a Pirelli DP-L10 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
103 phone, run this command: |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
104 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
105 cp2102-read-baudtab -d i:0x0489:0xE003 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
106 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
107 EEPROM patch language |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
108 ===================== |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
109 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
110 The "canonical" use case for patching CP2102 EEPROM config would be designing a |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
111 new custom hw gadget that contains a CP2102 chip and configuring that USB |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
112 interface chip with custom ID strings, or perhaps a custom VID:PID code or other |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
113 USB descriptor changes. However, it is now 2023, and we (FreeCalypso) are not |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
114 planning on building any new hw with CP2102 chips - thus in the present time |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
115 the only real use case for CP2102 EEPROM manipulation is programming the baud |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
116 rate table on already existing CP2102-based cables and adapters (particularly |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
117 those sold by Sysmocom) to switch between 230400/460800/921600 baud and |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
118 203125/406250/812500 baud configs, or perhaps configure other non-standard baud |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
119 rates for various hacking applications. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
120 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
121 Nonetheless and for the sake of completeness, our cp2102-update-eeprom and |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
122 cp2102-patch-ee-image tools allow any part of the EEPROM structure to be |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
123 patched: the baud rate table can be replaced in whole or in part, any bytes in |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
124 any of the USB descriptors can be patched, and new textual ID strings can be |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
125 set. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
126 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
127 Given the lack of real-life use cases beyond switching between two possible baud |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
128 rate tables of interest as described earlier in this article, the full EEPROM |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
129 patching mechanism is not currently documented in detail - read the source code |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
130 if you are interested. |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
131 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
132 Checking CP2102 chip version |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
133 ============================ |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
134 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
135 To check if your CP2102 adapter is really classic CP2102 or CP2102N or some |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
136 other CP210x, run this command: |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
137 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
138 cp2102-read-partno |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
139 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
140 The result should be 0x02 on classic CP2102 or various codes (0x20, 0x21 or 0x22 |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
141 depending on QFN package variant) on CP2102N. Note that at least on classic |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
142 CP2102 this byte is stored in the EEPROM and can be modified - but hopefully no |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
143 sane person will patch the EEPROM on a classic CP2102 to make it pretend to be |
4f72e09fb698
doc/CP2102-EEPROM-tools: complete for now
Mychaela Falconia <falcon@freecalypso.org>
parents:
101
diff
changeset
|
144 CP2102N. |