Uniquely identifying multiple MC7304 for udev / USB

Hi,

I have a computer with 2x MC7304. They are assigned seemingly random /dev/ttyUSBx allocations at startup.

Now I know I can write udev rules to force the /dev/ttyUSBx to a particular device but I need some USB data from the device with which to use in the rule.

The serial number is an ideal candidate but unfortunately the serial numbers are all the same.

Is there any way I can rewrite the serial number? I saw one command for setting a CUSTOM parameter USBSERIALENABLE but it does not seem available on my device.

thanks

Maybe just do a simple match on the USB port number? They should be static, based on the slot.

There are probably better ways, but this should match modems on port 4 and 5 and create static symlinks for the tty devices:

SUBSYSTEM=="usb",DEVPATH=="*-4",TAG="modem1"
SUBSYSTEM=="usb",DEVPATH=="*-5",TAG="modem2"
SUBSYSTEM=="tty",TAGS=="modem1",SYMLINK="modem1-%n"
SUBSYSTEM=="tty",TAGS=="modem2",SYMLINK="modem2-%n"

Thanks,

I’m not convinced that the devices always come up on the same ttyUSBx. They mostly do but I have seem them change. I read that it is possible with some versions to assign the IMEI as the serial number, which would mean they are always uniquely identifiable.

Yes, the ttyUSBx device numbers will change.

I’m talking about the numbers of the USB ports assoiciated with the mini-PCIe slots you are using. They are static. Defined by the board designer.

Yes, this is often supported and very useful. Don’t know how to enable it on the MC7304, though.

Thanks,

I think I understand now. I have implemented your suggestions and will observe over the next few weeks.