Welcome, Guest
Username: Password: Remember me
02 Jan 2018
INDI development team is happy to announce the release of INDI Library v1.6.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers.
Read More...
  • Page:
  • 1

TOPIC: Help communicating with focuser

Help communicating with focuser 1 month 1 day ago #22475

Just received a USB Focuser and am having difficulty communicating with it, any ideas on what I can try?
It is a local KStars/indilib on a Intel NUC box running Fedora 27.
The focuser has the power cord connected although it didn't make any difference.
The USB 2 connection cable has been changed and I have tried with the different connection speeds.
I do not know how to associate the USB port with the lsusb Bus/Device id but it appears to change between /dev/ttyACM0 and ACM1 as I change the usb connection between the box and the powered hub.
The information in the INDI Control Panel seems reasonable and I've added myself to the dialout group and tried running under root.
From the debug log it connects to the focuser but fails the handshake.

Tpm

Warning: Spoiler! [ Click to expand ]

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

Last Edit: by oleg.

Help communicating with focuser 1 month 1 day ago #22481

  • pch
  • pch's Avatar
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 53
  • Thank you received: 35
A possible problem is ModemManager trying to use the device and prevent other connection.
To avoid that add the following rule in /etc/udev/rules.d/80-usbfocuser.rules :
# no modemmanager for usbfocus
ATTRS{idVendor}=="0461", ATTRS{idProduct}=="0033", ENV{ID_MM_DEVICE_IGNORE}="1"
The following user(s) said Thank You: wotalota

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

Help communicating with focuser 1 month 18 hours ago #22485

Thank you.
I created the entry and rebooted with the same results. Confirmed that the
connection does seem to be on ttyACM0 as indicated in the INDI Control Panel and
as shown below. I want to look into if I can associate the cdc_acm driver in the
dmesg log with the control panel's Exec: indi_usbfocusv3_focus. If that seems okay
might try locating some kind of diagnostic to see if that provides any insight as to
whether or not the focuser is responsive.

[root@chai tg]# dmesg -C

[tg@chai ~]$ dmesg |grep tty
[tg@chai ~]$ dmesg |grep usb

Plug in ASI071 camera:

[tg@chai ~]$ dmesg |grep tty
[tg@chai ~]$ dmesg |grep usb
[ 457.597776] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[ 457.726127] usb 1-2: New USB device found, idVendor=04b4, idProduct=6572
[ 457.726133] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 457.726138] usb 1-2: Product: USB2.0 Hub
[ 458.217790] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ 458.231163] usb 2-2: New USB device found, idVendor=03c3, idProduct=071b
[ 458.231169] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 458.231173] usb 2-2: Product: ASI071MC Pro
[ 458.231176] usb 2-2: Manufacturer: ZWO

Plug in USB Focuser:

[tg@chai ~]$ dmesg |grep tty
[ 483.893829] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

[tg@chai ~]$ dmesg |grep usb
[ 457.597776] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[ 457.726127] usb 1-2: New USB device found, idVendor=04b4, idProduct=6572
[ 457.726133] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 457.726138] usb 1-2: Product: USB2.0 Hub
[ 458.217790] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ 458.231163] usb 2-2: New USB device found, idVendor=03c3, idProduct=071b
[ 458.231169] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 458.231173] usb 2-2: Product: ASI071MC Pro
[ 458.231176] usb 2-2: Manufacturer: ZWO

[ 483.714576] usb 1-1: new full-speed USB device number 10 using xhci_hcd
[ 483.842751] usb 1-1: New USB device found, idVendor=0461, idProduct=0033
[ 483.842757] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 483.842761] usb 1-1: Product: USB_Focus
[ 483.842764] usb 1-1: Manufacturer: USB̔USB_F
[ 483.894344] usbcore: registered new interface driver cdc_acm

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

Help communicating with focuser 1 month 17 hours ago #22486

  • pch
  • pch's Avatar
  • Away
  • Senior Boarder
  • Senior Boarder
  • Posts: 53
  • Thank you received: 35
I try to remove my udev rule and plug the usb_focus V3, I get the exact same error as you with timeout after CMD: SWHOIS.

Maybe you have on your system another software than ModemManager that try to open the device.

You can look for message in /var/log/messages , for example without the udev rule I get the following:
ModemManager[1476]: <warn> Could not grab port (tty/ttyACM0)

You can also run the following command as root just after you plug the usb cable to check if a process take the device:
lsof /dev/ttyACM0

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ModemMana 1476 root 9u CHR 166,0 0t0 762 /dev/ttyACM0

Also instead of rebooting you can use the following command as root after you modify the udev rule:
udevadm control --reload-rules

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

Help communicating with focuser 1 month 16 hours ago #22490

You are correct. This morning the reboot was around 10AM, prior to that there were ModemManager messages but not after making the rules.d change. ModemManager might also have been having trouble grabbing the device.
Jan 16 14:35:42 chai ModemManager[762]: <warn> Could not grab port (tty/ttyACM1): 'Cannot add port 'tty/ttyACM1', unhandled serial type'
Jan 16 14:38:16 chai ModemManager[762]: <info> (tty/ttyACM1): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb1/1-1
Another party is:
Jan 17 10:14:29 chai kernel: cdc_acm 1-1:1.0: ttyACM0: USB ACM device
Jan 17 10:14:29 chai /usr/libexec/gdm-x-session[2850]: (II) config/udev: Adding input device (unnamed) (/dev/ttyACM0)

lsof indicates it might be related to the gnome virtual file system:
[root@chai tg]# lsof /dev/ttyACM0
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
While issuing lsof as user provides no output, no error
df -h
tmpfs 787M 16K 787M 1% /run/user/42
tmpfs 787M 104K 787M 1% /run/user/1000

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

Last Edit: by wotalota. Reason: update

Help communicating with focuser 1 month 7 hours ago #22504

Looking to see if getting cdc_acm to unbind from ttyACM0 after connecting would be an approach. Have not yet found a working method, will pick up again later.

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

  • Page:
  • 1
Time to create page: 0.137 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica