×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Very erratic behaviour of SX-Maxi-Filterwheel

  • Posts: 268
  • Thank you received: 72
Hi

This is my second try to get attending from the forum. Yesterday my writing was puffed away. (?)

The SX-Driver has some big issues with the SX-Maxi-Filterwheel: I can't get a reliable connection via USB. After connecting th SX-Driver keeps telling me, that the connection isn't writeable. After a dozen trials (disconnecting an reconnecting physically) sometimes the connection can write to the wheel suddenly. I have no clue when and why this happens.

I tried to analyze the USB-Connection and found out, that there are several quirks in the list of properties as you can see in the attachement (a log file with the results of "lsusb -v -s001:00x", before, during an after the failure). After hours of trying I found out, that I have to wait about 10 sec after the physical connection of the USB-plug. After this time starting INDI and connecting with the userinterface of "sx-indi" I manage to get a connection that is writeable!
Even stranger is the following: If I want to check the working connection in a terminal via "lsusb - v- -s001:00x" the connection failes immediately again and the writing commands aren't accepted anymore! Moreover "udevamd" reports the problem too. It seems the bug is right in the connection itself!

I'm willing to track the problem down, but I don't know where to start. Is it an issue of the SX-driver or of the library itself? I'm very grateful if someone can show me the direction.

Antonio

Ubuntu 16.04LTS
KStars 2.7.7
Libindi 1.4
(updated via ppa:mutlaqja/ppa)
Last edit: 6 years 9 months ago by Toni Schriber. Reason: Issue in udev/usb
6 years 10 months ago #16790
Attachments:

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

  • Posts: 712
  • Thank you received: 174
Hi Antonio, is it connected directly or to USB hub? It looks like hardware (e.g. cable or powering), not driver issue... Peter
6 years 10 months ago #16798

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

  • Posts: 268
  • Thank you received: 72
Hi Peter

... I forgot to mention, that I tried on three different computers with three different settings The sequence of errors is always the same and exactly reproducible on all settings (different sockets, with hub, with direct cable, ....). I always had some problems with the SX-Maxi-Filterwheel in the past, but now it is almost unusable!

Of course I tried the wheel in Windows (with APT) on ASCOM and it works flawlessly!
So I suppose there has to be a problem with the SX-Driver or the basic routines of the INDI-Library itself. I have some programming knowledge, but never took a look inside INDI. That's why it would be very nice, if somebody could give me a hint, where and how to start the debugging.

Greetings
Antonio
Last edit: 6 years 10 months ago by Toni Schriber.
6 years 10 months ago #16821

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

  • Posts: 268
  • Thank you received: 72
Hi Peter

It's me again.

The good news are that "libindi" ist ok! Further investigations led me to the conclusion, that the issue is due to quirks in the basics of "udev" & "usb".
The facts are the following:
The missing information of the "report descriptor" is the crucial point. Without the knowledge of the structure of this descriptor it is not possible to write to the device. There are indeed many problems with "udev" concerning these informations, as my inquiries showed: In the web, you can find hundreds of messages with complains about faulty return values of this "descriptor".
I found out, that I can get a stable connection ("lsusb" is indeed gving back a correct "report descriptor"), if - after the first insertion of the USB-plug - I "unbind" the device and "bind" it again immediately ("echo 1-5:1.0 > /sys/bus/drivers/usbhid/unbind" resp. "echo .... /bind"). After this procedure the Maxi-Filterwheel can be activated without any problems! Moreover there are no more problems as long as the wheel remains physically connected.
I very curious about the reasons inducing this strange characteristics of *udev". Writing a "udev-rule" to overcome the this issue is a bit unsatisfactory.
Is there really nobody out there undergoing similar problems with SX-Filterwheels or other devices?

Sincerley
Antonio
Last edit: 6 years 9 months ago by Toni Schriber.
6 years 9 months ago #17018

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

Time to create page: 0.611 seconds