Register    Login    Forum    Search    FAQ

Board index » Software » Linux




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post Posted: Fri Mar 03, 2017 11:26 am 
Offline

Joined: Fri Mar 03, 2017 10:25 am
Posts: 7
Is anybody using successfully an ASI120MM on linux?

I have a Raspberry Pi 3 with Raspbian Jessie, kernel 4.9.13-v7+, INDI 1.4.1 (compiled from github, sha id 32d5623332dad10a64c6db206c4d7d787cd04da1), which includes the SDK v.0.6.0110 into the indi-asi driver.

Running indiserver on the RPi3 with indi-asi, and performing a simple test like hitting "Framing" in Focus tab (just a sequence of images), Exp=1s, Bin 1x1, the camera seems to work well for a few minutes, then got stuck (waiting forever at 'StartExposure->setexp : 1.000s' as seen in indi-asi driver debug log). In dmesg, I see these messages:

[27070.448662] usb 1-1.4: new high-speed USB device number 5 using dwc_otg
[27070.699494] usb 1-1.4: New USB device found, idVendor=03c3, idProduct=120a
[27070.699506] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[27070.699514] usb 1-1.4: Product: ASI120MM
[27070.699522] usb 1-1.4: Manufacturer: ZWOptical company
[27070.699529] usb 1-1.4: SerialNumber: 00000
[48180.056128] usb 1-1.4: reset high-speed USB device number 5 using dwc_otg
[48181.566120] usb 1-1.4: reset high-speed USB device number 5 using dwc_otg
[48183.306141] usb 1-1.4: reset high-speed USB device number 5 using dwc_otg
... ("reset" message repeats on each exposure)

To recover, I need to pull out the USB cable and reconnect again.


Interestingly, if I roll back the SDK embedded in indi-asi driver from v0.6.0110 to v0.4.0929 (replacing the libASICamera2 library embedded in indi-asi with the one extracted fromhttp://astronomy-imaging-camera.com ... 4.0929.tar), the "reset" dmesg messages are gone, and the camera operates for a longer period, but sadly (after say 1 hour, sometimes more), it also gets stuck. The SDK versions in between behaves like 0.6.0110 ("reset" messages on dmesg).

On a laptop with Kubuntu 16.04.4 (x64) running indiserver, I can connect to the indi_asi driver with Ekos, but exposures always fail no matter the version of the SDK, showing "ASIGetExpStatus failed (0). Restarting exposure... " and then "Exposure failed after 3 attempts".

The camera has been tested on SharpCap in Windows and seems to be ok, so I'm discarding hardware failures.

Anyone got this working? If so, can you report your exact versions (OS/platform, kernel, INDI, etc)?

As I can see in the forum, ZWO is recommending the USB3.0 (-S suffix versions). Any report of these working on a RPi3?

ZWO: I see you blame the hw performance of the USB2.0 cameras to explain why these won't work reliably on Linux (viewtopic.php?f=17&t=6668#p11640). Then why do they work on Windows? (same camera, same computer). It would be great if you fix the linux SDK.

Thanks in advance
Sergio


Top 
 Profile  
Reply with quote  
 Post Posted: Fri Mar 03, 2017 2:29 pm 
Offline

Joined: Tue Sep 17, 2013 4:50 pm
Posts: 77
Have you tried to adjust USB bandwidth to something fixed instead of auto? I found it critical for smoothly running the ASI1600 under Linux (even on a beefy laptop) together with the ASI120.


Top 
 Profile  
Reply with quote  
 Post Posted: Fri Mar 03, 2017 11:53 pm 
Offline

Joined: Fri Mar 03, 2017 10:25 am
Posts: 7
Thanks for your answer.

The bandwidth was set to 40, which is the lowest value allowed in the INDI driver. 'Auto' setting is disabled.

I forgot to mention that in first place I had to flash the camera with the "compatible" firmware, as the RPi3 complained about the USB packet size of the stock firmware.


Top 
 Profile  
Reply with quote  
 Post Posted: Sat Mar 04, 2017 3:09 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 188
It is normal that print reset message, can it work with compatible firmware?

_________________
ZWO software engineer
Location:lon=120.6 lat=31.3
SuZhou China


Top 
 Profile  
Reply with quote  
 Post Posted: Sat Mar 04, 2017 10:02 am 
Offline

Joined: Tue Sep 17, 2013 4:50 pm
Posts: 77
Ah, I see. With the compatible firmware I've never ever got a good frame in 16 bit even on a i7 laptop :-( I use the old ASI Camera for guiding so 8 bit is OK and it works. I think the limitation about maxPacketSize is because of BadUSB attacks. Here is a patch to work around it (but then, I decided to go with compatible firmware mode to avoid the hassle of recompiling my kernels because I use it only for guiding):

diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index a2d90ac..107635d 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -349,10 +349,12 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, int inum,
j = maxpacket_maxes[usb_endpoint_type(&endpoint->desc)];

if (maxp > j) {
- dev_warn(ddev, "config %d interface %d altsetting %d endpoint 0x%X has invalid maxpacket %d, setting to %d\n",
+ dev_warn(ddev, "config %d interface %d altsetting %d endpoint 0x%X has invalid maxpacket %d, setting to %d (IGNORED!)\n",
cfgno, inum, asnum, d->bEndpointAddress, maxp, j);
+#if 0
maxp = j;
endpoint->desc.wMaxPacketSize = cpu_to_le16(i | maxp);
+#endif
}

/*


Top 
 Profile  
Reply with quote  
 Post Posted: Sat Mar 04, 2017 3:29 pm 
Offline

Joined: Fri Mar 03, 2017 10:25 am
Posts: 7
Thanks Yang. I made all my tests with the compatible firmware; with the stock firmware the ASI120MM is not usable on a RPi3 (Rasbian Jessie at least). ZWO recommends the USB3.0 cameras for linux, do you have any success report on a RPi3?

Yang, when you say that reset messages are normal, do you mean your SDK is requesting a device reset to the USB subsystem (via libusb or something) at each exposure?

Thanks chripell... that's pretty advanced stuff for me. If I understood correctly, you're currently ok with the compatible firmware, bandwidth set to a low, fixed value, and 8 bits per pixel.


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Mar 06, 2017 2:58 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 188
> with the stock firmware the ASI120MM is not usable on a RPi3 (Rasbian Jessie at least).ZWO
> recommends the USB3.0 cameras for linux, do you have any success report on a RPi3?
I have tested 120MM on Pi3(2016-11-25-raspbian-jessie) with the "compatible" firmware and frame works normally , I connect camera through INDIGO server.
a customer use ASI071 on Pi3 successfully with TheSkyX.


>Yang, when you say that reset messages are normal, do you mean your SDK is requesting a device >reset to the USB subsystem (via libusb or something) at each exposure?
yes

_________________
ZWO software engineer
Location:lon=120.6 lat=31.3
SuZhou China


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Mar 06, 2017 11:49 am 
Offline

Joined: Fri Mar 03, 2017 10:25 am
Posts: 7
Hi Yang,

the 120MM does connect and send exposures to the RPi3/INDI, the problem is that is not stable (at least on Jessie). Have it running for a while, see what happens. Sometimes breaks after 5 minutes, sometimes after 90 minutes.

Thanks!


Top 
 Profile  
Reply with quote  
 Post Posted: Mon Mar 06, 2017 9:04 pm 
Offline

Joined: Tue Sep 17, 2013 4:50 pm
Posts: 77
sergiod wrote:
Thanks chripell... that's pretty advanced stuff for me. If I understood correctly, you're currently ok with the compatible firmware, bandwidth set to a low, fixed value, and 8 bits per pixel.


Exactly as you said, but on an i7 laptop. I use the ASI120MM together with an ASI1600MC. The ASI1200MM is set at 1s exposure for OpenPHD. Consider the USB host controller of embedded SOCs can be pretty shitty.

Also, by no means I would consider an USB reset a normal thing :-) It means that the host driver has detected an error condition ad is trying to recover. Maybe the recovery succeeds but well, but it is a last resort, not a normal situation, see http://superuser.com/questions/668911/w ... ice-resets for example.


Top 
 Profile  
Reply with quote  
 Post Posted: Tue Apr 11, 2017 7:30 pm 
Offline

Joined: Tue Apr 11, 2017 5:54 pm
Posts: 8
Location: Dubai, United Arab Emirates
I use chained RPI 3's running headless Ubuntu Mate. Allowed me to install Ekos on each via the ppa. You could check to see if the USB max output current is set to 1.2A, some may be set to 0.6A which is too low for the ASI120MM. If you have other USB powered devices shwring the current on the same RPI you may need to add a powered hub to provide the ASI120MM with enough current.

_________________
190mm f5.3 Maksutov Newtonian, NEQ6 Pro, ZWO ASI1600MM-COOLED, EFW7, ASI120MM, WO f4 50mm Guider, KDE Neon, KStars, Ekos, Chained Raspberry Pi 3's, Pixinsight.


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 10 posts ] 

Board index » Software » Linux


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: