On Thursday 21 May 2020 12:11:42 David Wright wrote:

> On Thu 21 May 2020 at 08:23:55 (-0400), Gene Heskett wrote:
> > Since updating to stretch, udev has been randomly swapping ttyUSB0
> > and ttyUSB1 and sometimes ttyUSB2 around, confusing the hell out of
> > heyu, a trs-80-coco3, and occasionally even nut.  Nut (apc ups) is
> > not on a usb-serial adapter, it just a usb cable but the other 2 are
> > on individually unique FTDI adaptors.
> >
> > What udev persistent file, and where is it, do I edit
>
> To give you a concrete example, I've attached a set of files that
> I use to generate stable mountpoints (USB sticks) and symlinks
> (drives) in /media when I insert known sticks or DVD-burners.
>
> The comments in the first file explain how to find out the relevant
> information for writing the others. It looks as if your serial numbers
> would be a good choice to concentrate on, just like my burners.
>
> Note that, because I'm lazy, I treat the LABELs, UUIDs and serial
> numbers as unique and distinct from each other, in one mixed namespace
> (the filenames in /etc/udev/rules.d/my-mountpoints/).
> The mountpoint or link is the contents of the file in that directory.
> Thus a 1GB USB that I acquired 2017-04-03 with USGS inscribed on it
> is FAT formatted with a "UUID" 2017-0403, and generates a mountpoint
> /media/usgs1g. The DVD-burner with the serial number KZ3E2DH0440
> generates a link /media/cdrom3, which makes it easy to distinguish
> two identical LG Slim Portables plugged in simultaneously.
>
> > and chattr +i to
> > effect a permanent cure for this apparently random device renaming?
>
> No. don't do that!
>
> > And whats the command to restart udev from a clean slate without
> > rebooting?
>
> # udevadm control -R
>
Yet another way, thats at least 2 different ways. Do I dare run that as 
root right now? Did, date of /dev/ttyUSB0 updated, heyu works but has to 
restart the relay before I can query status, everytime, relay once 
started should drop into the background noise and run till a reboot, not 
exit between sessions.  This might be a separate problem though.


> > These are the ttyUSB ports that need persistent names:
> >
> > root@coyote:rules.d$ usb-devices|grep -C4 SERIAL
> > T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
> > D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> > P:  Vendor=0403 ProdID=6001 Rev=04.00
> > S:  Manufacturer=FTDI
> > S:  Product=USB HS SERIAL CONVERTER
> > S:  SerialNumber=FTDHG45D
> > C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=44mA
> > I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff
> > Driver=ftdi_sio
> >
> > --
> > T:  Bus=01 Lev=02 Prnt=04 Port=02 Cnt=02 Dev#=  7 Spd=12  MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> > P:  Vendor=0403 ProdID=6001 Rev=06.00
> > S:  Manufacturer=FTDI
> > S:  Product=USB FAST SERIAL ADAPTER
> > S:  SerialNumber=FTOOS09N
> > C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
> > I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff
> > Driver=ftdi_sio
>
> Cheers,
> David.
Stay well David

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply via email to