> Usage pattern is like
> * (open device)
> * ftdi_eeprom_initdefaults(ftdi, "My_MANU","MY_DESC","MY_Serial")
> with libftdi setting values according to ftdi->type
> * change ftdi->eeprom->xx items according to local needs
> * ftdi_erase_eeprom()
This is wrong for the FT232R. For that, you always read the existing
eeprom data first, *then* make changes. Never start with a blank
eeprom or you'll lose the unique serial number that FTDI puts in each
FT232R, which is stored *after* the regular eeprom data! This number
is separate from the MY_Serial in your email, although FTDI puts a
unique one of those in also, which your use pattern would lose.
Here's a dump from a factory-defaults FT232R chip. Note the extra
data after 0x80 and the pre-existing usb serial number:
Dev 0: Filename "102", Manf "FTDI", Desc "FT232R USB UART", Ser# "A600dOgq"
00 : 00 40 03 04 01 60 00 06 a0 2d 08 00 00 00 98 0a : .@...`.. .-......
: 00
10 : a2 20 c2 12 23 10 05 00 0a 03 46 00 54 00 44 00 : ....#... ..F.T.D.
: 10
20 : 49 00 20 03 46 00 54 00 32 00 33 00 32 00 52 00 : I...F.T. 2.3.2.R.
: 20
30 : 20 00 55 00 53 00 42 00 20 00 55 00 41 00 52 00 : ..U.S.B. ..U.A.R.
: 30
40 : 54 00 12 03 41 00 36 00 30 00 30 00 64 00 4f 00 : T...A.6. 0.0.d.O.
: 40
50 : 67 00 71 00 00 00 00 00 00 00 00 00 00 00 00 00 : g.q..... ........
: 50
60 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 : ........ ........
: 60
70 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 94 : ........ ........
: 70
80 : 31 04 ce fb 00 00 cb 38 32 60 42 00 00 00 00 00 : 1......8 2`B.....
: 80
90 : 00 00 00 00 00 00 00 00 36 41 5a 53 4c 32 33 45 : ........ 6AZSL23E
: 90
a0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff : ........ ........
: a0
b0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff : ........ ........
: b0
c0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff : ........ ........
: c0
d0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff : ........ ........
: d0
e0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff : ........ ........
: e0
f0 : ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff : ........ ........
: f0
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|