×

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

Bi-monthly release with minor bug fixes and improvements

USB subsystem crash with iPolar in CEM40 on RaspberryPi

  • Posts: 40
  • Thank you received: 3
Hey,

I got a CEM40 and overall the mount works fine on linux but there are some issues. While I am able to run a session, and I was even able to run a full night with limited issues, I have had the whole USB subsystem crash on my, and have found to be able to do is consistently.

I am using the 2021 version of the CEM40 with a single USB cable which connects to a USB2.0 HUB, the CEM40 itself, and the iPolar. It only works when connected to my powered USB hub, connecting to the USB3.0 or 2.0 ports directly does not work.
I am able to work for a while but then sometimes the USB subsystem will crash, and all USB devices disconnect. I have run it with just the HUB + the CEM40 and have it crash, and I ran the HUB for 6 months with zero issues before getting the CEM.

When the subsystem crashes all devices except the root hubs will no longer be visible with lsusb, and dmesg reports the following :
[ 6035.747938] usb 1-1.2: new high-speed USB device number 3 using xhci_hcd
[ 6035.882081] usb 1-1.2: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=92.26
[ 6035.882098] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6035.882111] usb 1-1.2: Product: USB2.0 Hub
[ 6035.882125] usb 1-1.2: Manufacturer: GenesysLogic
[ 6035.988356] usb 2-2.1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[ 6036.021349] usb 2-2.1: New USB device found, idVendor=05e3, idProduct=0616, bcdDevice=92.26
[ 6036.021364] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6036.021375] usb 2-2.1: Product: USB3.0 Hub
[ 6036.021386] usb 2-2.1: Manufacturer: GenesysLogic
[ 6036.207930] usb 1-1.2.1: new high-speed USB device number 4 using xhci_hcd
[ 6036.341031] usb 1-1.2.1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=92.26
[ 6036.341055] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6036.341073] usb 1-1.2.1: Product: USB2.0 Hub
[ 6036.341090] usb 1-1.2.1: Manufacturer: GenesysLogic
[ 6036.677955] usb 1-1.2.1.1: new high-speed USB device number 5 using xhci_hcd
[ 6036.808640] usb 1-1.2.1.1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.00
[ 6036.808662] usb 1-1.2.1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 6036.808679] usb 1-1.2.1.1: Product: USB 2.0 Hub [MTT]
[ 6037.237932] usb 1-1.2.1.1.3: new high-speed USB device number 6 using xhci_hcd
[ 6037.506719] usb 1-1.2.1.1.3: New USB device found, idVendor=1233, idProduct=1455, bcdDevice= 1.00
[ 6037.506729] usb 1-1.2.1.1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 6037.506736] usb 1-1.2.1.1.3: Product: iOptron iPolar
[ 6037.506743] usb 1-1.2.1.1.3: Manufacturer: iOptron iPolar
[ 6037.564768] input: iOptron iPolar: iOptron iPolar as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.1/1-1.2.1.1/1-1.2.1.1.3/1-1.2.1.1.3:1.0/input/input3
[ 6037.767969] usb 1-1.2.1.1.4: new full-speed USB device number 7 using xhci_hcd
[ 6038.015998] usb 1-1.2.1.1.4: New USB device found, idVendor=0403, idProduct=6015, bcdDevice=10.00
[ 6038.016016] usb 1-1.2.1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6038.016029] usb 1-1.2.1.1.4: Product: FT230X Basic UART
[ 6038.016043] usb 1-1.2.1.1.4: Manufacturer: FTDI
[ 6038.016055] usb 1-1.2.1.1.4: SerialNumber: D3091EXI
[ 6038.026066] usb 1-1.2.1.1.4: Detected FT-X
[ 6038.031436] usb 1-1.2.1.1.4: FTDI USB Serial Device converter now attached to ttyUSB0
[ 6201.049896] usb 1-1.2: USB disconnect, device number 3
[ 6201.049921] usb 1-1.2.1: USB disconnect, device number 4
[ 6201.049942] usb 1-1.2.1.1: USB disconnect, device number 5
[ 6201.049962] usb 1-1.2.1.1.3: USB disconnect, device number 6
[ 6201.157294] usb 1-1.2.1.1.4: USB disconnect, device number 7
[ 6201.460561] usb 1-1.2: new high-speed USB device number 8 using xhci_hcd
[ 6201.560765] usb 1-1.2: device descriptor read/64, error -71
[ 6201.780821] usb 1-1.2: device descriptor read/64, error -71
[ 6202.000620] usb 1-1.2: new high-speed USB device number 9 using xhci_hcd
[ 6202.100845] usb 1-1.2: device descriptor read/64, error -71
[ 6202.320842] usb 1-1.2: device descriptor read/64, error -71
[ 6202.441260] usb 1-1-port2: attempt power cycle

USB disconnect, device number 3 is the start of the error.

I can run the following commands twice to get the devices to re-connect :
sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:00:00.0/remove"
sudo sh -c "echo 1 > /sys/bus/pci/rescan"

I can also get it to crash 100% of the time when trying to use the iPolar driver, or even when trying to stream from the iPolar in vlc using the video4linux drivers, so I wonder if it is a compatibility issue.

I have ordered a usb multimeter to test if this is an issue with the HUB shutting the iPolar down for drawing too much power, but wanted to ask if anyone else has had this issue?
Last edit: 1 year 6 months ago by radon199. Reason: remove quotes
1 year 6 months ago #85840

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

  • Posts: 40
  • Thank you received: 3
I think this a dead iPolar.

I plugged my mount into my Windows PC and while the PC can see iPolar the iPolar app just gets into a loop where it says it is connected and initializing, but then fails. I suspect the iPolar is defective, and the random failures I sometimes have are the result of the iPolar sending an unfriendly USB response that causes the subsystem to crash.

I am going to try and get the iPolar replaced.
1 year 6 months ago #86068

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

  • Posts: 40
  • Thank you received: 3
I disconnected the iPolar and still had issues.

Has anyone else had issues with random dissconnects? A disconnect would be fine but this not only takes out the CEM40 but the entire USB subsystem. I have a script which allows me to reset it without rebooting the Pi, but it does require me to restart my EKOS session, which means I lose my guide calibration and previous focus FWHM. I would like to find a way to reconnect without needed to shut down EKOS/INDI.
1 year 6 months ago #86137

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

  • Posts: 42
  • Thank you received: 2
Are you able to just disconnect/connect the camera in INDI instead of shutting down all of Ekos?
1 year 6 months ago #86145

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

  • Posts: 40
  • Thank you received: 3
Simply sending a disconnect and then reconnect didn't work, even after resetting the USB subsystem and being able to see all the USB devices with lsusb.

Unfortunately I was debugging INDI and when I attempted to restart the server Kstars crashed, so I wasn't able to see if restarting the indi server while Ekos is active is a valid workflow.

I will try again when not debugging.
1 year 6 months ago #86157

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

  • Posts: 40
  • Thank you received: 3
I logged debug info for the iOptronV3 driver and this is the error. I am not sure how to debug multiple INDI drivers at the same time, as I am not sure what happens first, the ASI CCD failing to expose, or the CEM40 not returning to the command. I will debug the ASI driver next.

T22:02:59.795 PDT DEBG ][ org.kde.kstars.indi] - Image received. Mode: "Guide" Size: 1237440
[2022-09-07T22:03:01.151 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[SCOPE] RES <+2073037511691336011> "
[2022-09-07T22:03:01.181 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:GLS#> "
[2022-09-07T22:03:01.182 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] RES <-4432800050135700210931> "
[2022-09-07T22:03:01.182 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[SCOPE] CMD <:GEP#> "
[2022-09-07T22:03:01.182 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[SCOPE] RES <+2073037511691342011> "
[2022-09-07T22:03:01.182 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:ZE00080#> "
[2022-09-07T22:03:01.852 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:GLS#> "
[2022-09-07T22:03:01.876 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] RES <-4432800050135700210931> "
[2022-09-07T22:03:01.877 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[SCOPE] CMD <:GEP#> "
[2022-09-07T22:03:04.831 PDT INFO ][ org.kde.kstars.indi] - ZWO CCD ASI120MM Mini : "[ERROR] Exposure failed after 3 attempts. "
[2022-09-07T22:03:04.831 PDT INFO ][ org.kde.kstars.ekos.guide] - "Exposure failed. Restarting exposure..."
[2022-09-07T22:03:06.879 PDT INFO ][ org.kde.kstars.indi] - iOptronV3 : "[ERROR] Read Command Error: Timeout error "
[2022-09-07T22:03:07.479 PDT DEBG ][ org.kde.kstars.ekos.mount] - Mount status changed from "Tracking" to "Error"
[2022-09-07T22:03:07.882 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:GLS#> "
[2022-09-07T22:03:08.446 PDT INFO ][ org.kde.kstars.indi] - ZWO CCD ASI120MM Mini : "[ERROR] Exposure failed after 3 attempts. "
[2022-09-07T22:03:08.446 PDT INFO ][ org.kde.kstars.ekos.guide] - "Exposure failed. Restarting exposure..."
[2022-09-07T22:03:11.459 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] RES <> "
[2022-09-07T22:03:11.466 PDT INFO ][ org.kde.kstars.indi] - iOptronV3 : "[ERROR] bool IOPv3::Driver::getStatus(IOPv3::IOPInfo*): Expected 23 bytes but received 0. "
[2022-09-07T22:03:11.467 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[SCOPE] CMD <:GEP#> "
[2022-09-07T22:03:11.482 PDT INFO ][ org.kde.kstars.indi] - iOptronV3 : "[ERROR] Write Command Error: Write Error: Input/output error "
[2022-09-07T22:03:12.067 PDT INFO ][ org.kde.kstars.indi] - ZWO CCD ASI120MM Mini : "[ERROR] Exposure failed after 3 attempts. "
[2022-09-07T22:03:12.067 PDT INFO ][ org.kde.kstars.ekos.guide] - "Exposure failed. Restarting exposure..."
[2022-09-07T22:03:12.457 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:GLS#> "
[2022-09-07T22:03:12.459 PDT INFO ][ org.kde.kstars.indi] - iOptronV3 : "[ERROR] Write Command Error: Write Error: Input/output error "
[2022-09-07T22:03:12.459 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[SCOPE] CMD <:GEP#> "
[2022-09-07T22:03:12.461 PDT INFO ][ org.kde.kstars.indi] - iOptronV3 : "[ERROR] Write Command Error: Write Error: Input/output error "
[2022-09-07T22:03:13.458 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:GLS#> "
[2022-09-07T22:03:13.460 PDT INFO ][ org.kde.kstars.indi] - iOptronV3 : "[ERROR] Write Command Error: Write Error: Input/output error "

The only part that is weird is this : [2022-09-07T22:03:01.182 PDT DEBG ][ org.kde.kstars.indi] - iOptronV3 : "[DEBUG] CMD <:ZE00080#> "

The driver has this as a guide command, but I can't find it in the RS-232 command set, that instead appears to be expecting motion commands to be prefixed with :M
1 year 6 months ago #86158

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

:ZXXXX is new pulse command added on Jan 4th, 2021 for revision 3.10

Is the firmware up to date?
1 year 6 months ago #86161

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

  • Posts: 40
  • Thank you received: 3
Thanks. I had the wrong PDF saved… I am running the latest firmware for both hand controller and mount, which is what it came with.
1 year 6 months ago #86163

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

  • Posts: 8
  • Thank you received: 0
Hello,
It's strange, it looks like my problem with a Svbony SV205 camera when it is connected in USB3, I also have a total crash of the USB ports of the Raspberry Pi 4.
1 year 6 months ago #86165

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

  • Posts: 5
  • Thank you received: 0
I recently got my new HEM27 with iPolar and encountered similar issue. As I know RPi itself has very limited current supplied for its alll USB ports. Before I got a "powered" USB hub, my USB devices that connect to my HEM27, then to RPi, were quite unstable on the connection. Then I noticed the message below in dmesg,
attempt power cycle
Cannot enable. Maybe the USB cable is bad?
That reminds me that RPi is weak on the USB ports. So I got a powered USB hub, then connected HEM27 USB that integrated all USB rigs. Now my RPi is quite stable to communicate all USB devices on my mount.

Lucian
1 year 2 months ago #89668

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

  • Posts: 40
  • Thank you received: 3
I have not encountered this issue since putting the CEM40 on a dedicated, unpowered, usb hub. I had the CEM40 going through a USB3.0 powered 12v hub, the same hub all my other gear was going through, and encountered this issue constantly, to the point of it not really being usable. I tried many different cables but it was always the same result.

I couldn't put the CEM40 directly into the Pi because the USB controller used in the CEM40 is not compatible with linux. I instead got a cheap USB2.0 unpowered hub off Amazon and connected it through that as this gets around the non-compatible controller issue, and since then I have zero subsystem crashes. It appears that something with that powered hub was not happy with the CEM40, and it caused the whole thing to go down.

If you have a similar issue the cheap USB2.0 hub is a good bet and doesn't cost much more than a new cable to try.
1 year 1 week ago #91341

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

Time to create page: 1.458 seconds