Ed Lee replied to the topic 'Another GPSD port problem - Solved' in the forum. 2 years ago

I think I've found and fixed this issue now. I'm just updating here for future reference.
The cause of my problems was udev rules. Probably my lack of understanding of precedence and priorities with how the rules are applied. No matter what I wrote as a rule I can't force the ttyUSB0 / ttyUSB1 allocation to be consistent. I think there are complex system defined rules that override what I was specifying.
I've overcome this by changing my udev rules to create a consistent symlink (a bit like a shortcut in Windows speak) to each device regardless of which ttyUSB# the system allocates.
My udev rules to do this are:
I used the KERNELS=="1-1.3:1.0 as I have hard wired the OnStep controller to a specific USB port on my Pi and this identifies the device by which port it is connected to. As my OnStep controller uses a CP2102 for the serial interface I could have used:
...but this would prevent me using any other CP2101 devices at the same time and you never know what toy's next.
And for the my GPS dongle, which uses a PL2303 internally the rule is:This does suffer the drawback that I can't use another PL2303 connected device at the same time but I'll have to live with that. The GPS dongle could be plugged into any available port on the Pi or (more likely) my external hub, each of which will get a different KERNELS=="1-2.3:1.0" style bus address so that identification scheme can't be used in this case.
I then set the OnStep connection port in Indi to /dev/OnStep and the /etc/default/gpsd to:
This works for me. The OnStep controller comes up at ttyUSB0 most of the time but about one boot in five it's ttyUSB1. This no longer matters as I always get the (symlinked) ports required.

Read More...