×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Persistent serial port mapping not working

  • Posts: 643
  • Thank you received: 62
Hi!
I'm trying to get a persistent serial port mapping for my three usb-serial devices, following the turorial- I can make it work nicely for 2 out of my 3 devices. But I guess I need some help with the third - it is not quite identical, so should I treat it differently? Its my focuser (home made, Arduino)

When I connect it, dmesg says:
[ 237.028014] usb 1-1.3.1: new full-speed USB device number 10 using dwc_otg
[ 237.151224] usb 1-1.3.1: New USB device found, idVendor=1a86, idProduct=7523
[ 237.151249] usb 1-1.3.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 237.151262] usb 1-1.3.1: Product: USB2.0-Serial
[ 237.152383] ch341 1-1.3.1:1.0: ch341-uart converter detected

And:
pi@raspberry:/lib/udev/rules.s$ udevadm info -a -n /dev/ttyUSB2 | grep '{serial}' | head -n1
ATTRS{serial}=="3f980000.usb"

I have the following in my /lib/udev/rules.s/99-observatory.rules file:
# Focuser

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", ATTRS{serial}=="3f980000.usb", MODE="0666", SYMLINK+="focuser"

But no /dev/focuser is created. What do I do wrong?

Magnus
Last edit: 7 years 7 months ago by Magnus Larsson.
7 years 7 months ago #9973

Please Log in or Create an account to join the conversation.

If the VID:PID combination is unique (the other 2 devices have different VID:PIDs), no need to add the addition "serial" stuff.
7 years 7 months ago #9974

Please Log in or Create an account to join the conversation.

  • Posts: 643
  • Thank you received: 62
Hi!

So I change the lines to:

# Focuser

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE="0666", SYMLINK+="focuser"

dmesg still says:
[ 472.580964] usb 1-1.3.1: new full-speed USB device number 19 using dwc_otg
[ 472.704110] usb 1-1.3.1: New USB device found, idVendor=1a86, idProduct=7523
[ 472.704131] usb 1-1.3.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 472.704144] usb 1-1.3.1: Product: USB2.0-Serial
[ 472.705138] ch341 1-1.3.1:1.0: ch341-uart converter detected
[ 472.709122] usb 1-1.3.1: ch341-uart converter now attached to ttyUSB2

so 2 of my 3 devices have dedicated nodes:
pi@raspberry:~$ ls -l /dev | grep USB
lrwxrwxrwx 1 root root 7 sep 5 14:07 mount -> ttyUSB0
lrwxrwxrwx 1 root root 7 sep 5 14:07 shutter -> ttyUSB1
crw-rw-rw- 1 root dialout 188, 0 sep 5 14:07 ttyUSB0
crw-rw-rw- 1 root dialout 188, 1 sep 5 14:07 ttyUSB1
crw-rw---- 1 root dialout 188, 2 sep 5 14:07 ttyUSB2

What's wrong with my rules-file.....?

Magnus
7 years 7 months ago #9986

Please Log in or Create an account to join the conversation.

what is the rule filename? I presume you restarted your Pi after the change to the rules file? Your other devices have different VID:PIDs? All of this in one file or multiple files?
7 years 7 months ago #9990

Please Log in or Create an account to join the conversation.

  • Posts: 643
  • Thank you received: 62
Hi!
Here's the file:

pi@raspberry:/lib/udev/rules.s$ cat /lib/udev/rules.s/99-observatory.rules
# Gemini Mount

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTCC5RMS", MODE="0666", SYMLINK+="mount"

# Canon DSLR shutter release

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="FTZ3D6YP", MODE="0666", SYMLINK+="shutter"

# Focuser

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE="0666", SYMLINK+="focuser"


Yes, I've restarted numerous times. Two first works nicely, devices are created.

Magnus
7 years 7 months ago #9997

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
The file itself seems OK. Custom rules are supposed to be located in /etc/udev/rules.d/
7 years 7 months ago #9999

Please Log in or Create an account to join the conversation.

  • Posts: 643
  • Thank you received: 62
Hi!

Yes, that's a bit confusing. I don't understand the difference between rules.s and rules.d. But the tutorial actually says rules.s... :)

Let me try placing it in rules.d.

Magnus
7 years 7 months ago #10000

Please Log in or Create an account to join the conversation.

  • Posts: 643
  • Thank you received: 62
Bingo!
Now it's working, with the file in rules.d instead.
Magnus
7 years 7 months ago #10002

Please Log in or Create an account to join the conversation.

/me quietly fixes the typo in the tutorial! Glad it's working for you now. I actually plan to make this udev rules mess a thing of the past, I will _try_ to make an addon to INDI Web Manager where you get to assign the names via the web GUI. Don't hold your breath though, this might take a while.
Last edit: 7 years 7 months ago by Jasem Mutlaq.
7 years 7 months ago #10004

Please Log in or Create an account to join the conversation.

Time to create page: 0.231 seconds