Welcome, Guest
Username: Password: Remember me
14 Nov 2018
Glad to announce of release of INDI Library v1.7.5 on 2018-11-14. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
Read More...
  • Page:
  • 1

TOPIC: Help communicating with focuser

Help communicating with focuser 10 months 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.

Mach1, ES80 x0.8, ASI071, ASI120 OAG, focusPro
Last Edit: by oleg.

Help communicating with focuser 10 months 18 hours ago #22481

  • pch
  • pch's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 75
  • Thank you received: 48
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 10 months 12 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.

Mach1, ES80 x0.8, ASI071, ASI120 OAG, focusPro

Help communicating with focuser 10 months 11 hours ago #22486

  • pch
  • pch's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 75
  • Thank you received: 48
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 10 months 10 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.

Mach1, ES80 x0.8, ASI071, ASI120 OAG, focusPro
Last Edit: by wotalota. Reason: update

Help communicating with focuser 10 months 1 hour 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.

Mach1, ES80 x0.8, ASI071, ASI120 OAG, focusPro

Help communicating with focuser 7 months 1 day ago #25168

Hello,

Since I moved from Raspbian to Ubuntu Mate, it appears I have a similar issue.
I added the rules to prevent ModemManager from grabbing the device.
However, I am still getting the error.

Syslog says:
Apr 16 23:00:04 florian-astro kernel: [ 3.387535] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
Apr 16 23:00:04 florian-astro kernel: [ 3.388559] usbcore: registered new interface driver cdc_acm
Apr 16 23:00:04 florian-astro kernel: [ 3.388571] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

florian@florian-astro:/dev$ sudo lsof /dev/ttyACM0
[sudo] password for florian:
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.

How did you solve the issue (if you did) ?

Thanks
Regards,
Florian

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

Help communicating with focuser 7 months 1 day ago #25172

I never did solve it. Sent them a few email asking for advice including logs showing failing mid test under Windows using their test program. Asked for a RMA to return it but no response to that. I really was left thinking the device might be defective but since you're having a similar issue perhaps it is worth trying again. I put mine in a bag out of sight. Instead I built a controller with a stepping motor using Robert Brown's 1st gen Arduino focusPro for linux , excellent project and support.
If you are able to, downloading and run their Windows test program might show something, I could pull mine out and compare with you.
Regards
Tom

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

Mach1, ES80 x0.8, ASI071, ASI120 OAG, focusPro

Help communicating with focuser 7 months 22 hours ago #25195

  • jpaana
  • jpaana's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 97
  • Karma: 3
  • Thank you received: 36
USB_FocusV3 device is a bit problematic from communication protocol point of view as it doesn't have start-command sync characters like most others and relies on the fact that all commands are six characters long so it gets out of sync if someone writes anything to it before the INDI driver sends SWHOIS command. I had the same issue with ModemManager writing some AT-commands to the port even if it was supposed to ignore it with the udev-rule and only removing ModemManager altogether stopped that. In my own version of the driver I added some hacky code to send space characters to the device until it gives an error to achieve sync if the initial command failed, but that is not really a good solution either. You can also do that manually with minicom or similar if you want to try.
The following user(s) said Thank You: fsignoret

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

Help communicating with focuser 6 months 4 weeks ago #25229

Hello,

Thank you all, I disabled ModemManager and the issue is gone. B)

Clear skies,
Florian

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

  • Page:
  • 1
Time to create page: 0.157 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