×

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

Bi-monthly release with minor bug fixes and improvements

USB-Focus-V3 connexion problem

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic USB-Focus-V3 connexion problem

After some restarts the problem came once again. Maybe the problem is that some other device occupy the port.

Someone gave this information, setup a rule.

And this:
SUBSYSTEM=="tty", ATTRS{product}=="USB_Focus", SYMLINK+="focuser", ENV{ID_MM_DEVICE_IGNORE}="1"

Is there a file I shall open and add this string to ?

As you see I know almost nothing about Linux world.

/Lars
4 years 1 month ago #50312

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

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic USB-Focus-V3 connexion problem

Update:
I found a file with the name '99-com.rules'

In this file I found:

SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
SUBSYSTEM=="argon-*", GROUP="video", MODE="0660"
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
echo 0;\
elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
echo 0; \
elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi \
'", SYMLINK+="serial%c"

Is it here I shall place my rules for the focuser:
SUBSYSTEM=="tty", ATTRS{product}=="USB_Focus", SYMLINK+="focuser", ENV{ID_MM_DEVICE_IGNORE}="1"

??

When I try to edit the file I can't save it, can't get access to it.

/Lars
4 years 1 month ago #50314

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

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic USB-Focus-V3 connexion problem

Now when I know how to log in as root adminstrator I could edit the '99-com.rules' file.

Content of file:

SUBSYSTEM=="tty", ATTRS{product}=="USB_Focus", SYMLINK+="focuser", ENV{ID_MM_DEVICE_IGNORE}="1" (my new row)
SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
SUBSYSTEM=="argon-*", GROUP="video", MODE="0660"
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
echo 0;\
elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
echo 0; \
elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi \
'", SYMLINK+="serial%c"


The first row is my new rule I got from this page.

It still doesn't connect, maybe I have wrong name id of the focuser, this is the response from INDI control panel:
2020-03-02T11:58:56: [INFO] Error retrieving data from USBFocusV3, please ensure controller is powered and the port is correct.
2020-03-02T11:58:56: [ERROR] No valid resync response.

I think there are commands to find the name of the connected device, if I find it I rewrite the rules if it's different, correct ?

Just have to find the command to get the names.

/Lars
4 years 1 month ago #50329

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

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic USB-Focus-V3 connexion problem

This is what I get with the command:

astroberry@astroberry:~ $ lsusb
Bus 001 Device 012: ID 0461:0033 Primax Electronics, Ltd
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I have only the focuser connected, the other USB ports are empty.

The 'Primax Electronics, Ltd' is the focuser.
Strange I thought the name should be USB_Focuser.

Should I change the rule with this name ?

/Lars
4 years 1 month ago #50331

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

  • Posts: 210
  • Thank you received: 104
Hi,

0461:0033 is the usbfocus but here it show the manufacturer of the usb chip in the device.
You must not change the file 99-com.rules because it will likely be replaced by a system update.

Create a new file in /etc/udev/rules.d/ . For example named it 80-usbfocuser.rules
In this file I have:
ATTRS{idVendor}=="0461", ATTRS{idProduct}=="0033", ENV{ID_MM_DEVICE_IGNORE}="1", SYMLINK+="usbfocus"

This make ModemManager to ignore this device and it also create a symbolic link /dev/usbfocus to the actual /dev/ttyACM0. The interest is you can always configure /dev/usbfocus in INDI and it work even if you re-plug the device and the ttyACM number change.

Patrick
4 years 1 month ago #50333

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

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic USB-Focus-V3 connexion problem

Hi Patrick,
Thanks, I have now restored the 99-com.rules file and create a new 80-usbfocuser.rules file according to your instructions.

But still there is another device that block the connection;

2020-03-02T13:49:06: [WARNING] Port /dev/ttyACM0 is already used by another driver or process.
2020-03-02T13:49:03: [WARNING] Port /dev/ttyACM0 is already used by another driver or process.
2020-03-02T13:48:47: [INFO] Scan complete. Found 1 port(s).
2020-03-02T13:48:11: [ERROR] Failed to connect to port (/dev/ttyUSB0). Error: Port failure Error: No such file or directory. Check if device is connected to this port.

Can I in some way see what device that is connected to ACM0 ?

I have reinstalled the Astroberry, this time I didn't do the command:

sudo apt remove modemmanager

What I understand it's not needed now with the 80-usbfocuser.rules, or I'm wrong ?

/Lars
4 years 1 month ago #50337

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

  • Posts: 210
  • Thank you received: 104
The rule just set the environment variable ID_MM_DEVICE_IGNORE=1
Normally this must make ModemManager to not take the device but it is possible your version of ModemManager do not obey to this variable.
Removing with "sudo apt remove modemmanager" is probably a safer solution.
4 years 1 month ago #50346

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

  • Posts: 145
  • Thank you received: 7

Replied by Lars on topic USB-Focus-V3 connexion problem

Hi Patrick,
I did the 'sudo apt remove modemmanager' and now it works. I still keep the '80-usbfocuser.rules' file.

I noticed if I pull out the USB cable for focuser it isn't just to connect it again, have to wait for a while and then it's possible to connect.

Lot of thanks Patrick !

Now I see your full name, you must be the clever man behind CdC that I have used so many years. Lot of maths and physics behind it.

Now I shall look once again on the Canon 6D connection that I have in another thread.

/Lars
4 years 1 month ago #50354

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

Time to create page: 0.260 seconds