richardeoin / ftx-prog

A Linux command-line alternative to the FTDI FTProg utility for FTDI's FT-X series
GNU General Public License v2.0
122 stars 47 forks source link

Is FT232R supported? #23

Open bitdivine opened 3 years ago

bitdivine commented 3 years ago

Greetings,

Apologies in advance for a newbie question. Does this work for all FT devices?

I tried commands such as the following with a couple of FTDI devices:

sudo ./ftx_prog --old-vid 0x0403 --old-pid 0x6001 --ignore-crc-error --new-pid 0x1066

sudo ./ftx_prog --old-vid 0x0403 --old-pid 0x6001 --ignore-crc-error --manufacturer Testing123

The one device is a DeLock serial to USB converter, chip unknown. The other is an optical sensor that has, I believe, an RS232R inside it. I'm not 100% sure about the chip. Neither change is persisted.

If I read correctly the manufacturer string is stored only if there is an external EEPROM, however the pid changes should have been persisted.

bitdivine commented 3 years ago

Update: By dumping the eeprom with --save I can see that changing the power level changes one byte, so power==byte x 2ma. Changing other values doesn't change the eeprom. Loading a file with e.g. "F T D I" (a string that happens to be visible in the file) changed to "T E S T" changes nothing.

A curiosity: When changing the power, the power reported by this program changed, e.g.:

max@swift:~/projects/flashing-fun/ftx-prog (0)$ sudo ./ftx_prog  --old-vid 0x0403 --old-pid 0x6001 --ignore-crc-error --dump

ftx_prog: version 0.3
    Maximum Current Supported from USB = 500mA

However the MaxPower seen by lsusb was unchanged:

$ lsusb -v -d 0403:6001 2>/dev/null | grep -i maxpower
    MaxPower               90mA

The hypothesis that Linux sees Min(max port power, max device power) can be rejected as if I drop the power level of the device to 50mA, lsusb reports the same value as before (90mA).