3

I have a FTDI Chip TTL-232RG I would like to rename to something else, so when I plug it in to any computer, regardless of the distro, it would show up under /dev/tty as the new name.

Is this possible?

If needed here is the datasheet for the USB cable.

jonas
  • 133
  • 6
  • 1
    It depends on what USB device it is. I don't know if/how it is possible with the device you ask about, but on a USB pendrive with a partition and file system you can set a *label* of the file system, that will be seen by Linux as well as other operating systems (that can see the file system). – sudodus Nov 26 '21 at 15:31

2 Answers2

2

It, most certainly, is possible to change both the description and serial number (which is used for the name listed in /dev) in the EEPROM of the FTDI chip - at least on OS X - which should also show up in Ubuntu.

Note: I've not been able to check it as my Ubuntu box has just suddenly died (PSU failure)..!

This method uses an application for OS X, so there is probably a similar application for Ubuntu - I've just not found one yet. There is also an "official" tool (for Windows) on the FTDI website - There is even one for FreeBSD, but sadly there doesn't appear to be one for Ubuntu.

On OS X

From Pirate Rename – Get a nicely named serial device and using Bus Pirate:

Original description and serial number

Original description and serial number

Modified description and serial number:

Modified description and serial number

Once saved, the FTDI device should now show up as

  • On OS X

    /dev/tty.usbserial-PirateV3
    
  • On Ubuntu

    <Unable to check currently>
    

On Windows

One of the Windows utilities on the FTDI utilities webpage:

  • FTD2XXST - EEPROM Programmer and Test Utility for FT232/FT245 Devices, or;
  • FT_PROG 3.12.11.594 - EEPROM Programming Utility

You may see an error, such as

Program execution is not possible because FTD2XX.dll is not found

In which case you are missing a driver. You can get the required DLL from the FTDI drivers page. Put the .dll file in the same directory as the application, it should find it (hopefully).

Greenonline
  • 2,030
  • 8
  • 20
  • 27
  • 2
    I think you need to show some kind of applicability to Ubuntu for this to be a useful answer here. – Organic Marble Nov 26 '21 at 17:06
  • 1
    Yes I wholeheartedly agree, it is just terribly unfortunate that: (a) I can't currently check that the modified EEPROM (when modified from OSX) actually shows up in Ubuntu (b) I really can't find an equivalent application for Ubuntu (even though they exist for OSX, Windows and Free BSD). However, the other answer states that you can't change the serial number or description, when in fact you *can* (and it's quite easy)... just not on Ubuntu (apparently)... :-) – Greenonline Nov 26 '21 at 17:14
  • @Greenonline, Please borrow a computer (and run Ubuntu live or persistent live from a USB drive) in order to check if Ubuntu can read this. We can't wait :-P – sudodus Nov 27 '21 at 05:30
  • Sadly, I can't get this to run on my Mac, since its an M1 and the Bus Pirate software can't run on my Windows vm either.. – jonas Nov 27 '21 at 14:21
  • Also I still can't open the pirate renamer in Windows, after installing FTD2XX.dll, the program just opens in a blink and instantly closes again – jonas Nov 27 '21 at 16:39
  • Okay. Will do, thanks very much. Also the pirate renamer has a folder which says Windows and an exe file inside, so I just assumed they made it for each OS, but again thanks – jonas Nov 27 '21 at 16:43
  • Ah, ok, maybe it should work on windows, I hadn't seen that or just ignored it. I can't check the Windows app as (like I said) my dual boot windows/ubuntu box lost its PSU last night. :-( I'll go over to Super User to see the new question. – Greenonline Nov 27 '21 at 16:45
0

There is no way to set a name for a device in the device itself. The name is generated by the operating system.

Specifically, in current versions of Ubuntu (and many other distros), the /dev directory is dynamic and is maintained by udev. You can use attributes of the device (like serial number) to identify the device in udev and select a name.

To make this "permanent" you would create a udev config file and drop it in the udev config directory on each installation you need it on.

There are many guides online for this, including writing udev rule for USB device

user10489
  • 3,564
  • 2
  • 5
  • 22