Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 4 weeks ago

So I've been able to take home the camera to try some more things. It really just is the timeout the whole time that was the issue. Unbinned it takes 14 seconds to transfer the image with the original chunk size. The timeout was 10s. I will make a pull request to increase the BULK_DATA_TIMEOUT to 20s.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 1 month ago

On my drive home I was thinking, maybe it isn't about chunk since, maybe this older model is just slower and needs a much much longer timeout. Next time I'll try increasing BULK_DATA_TIMEOUT.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 1 month ago

Thank you for the help so far. I've had some success but lets see if I can explain it. In sxccd.cpp I change the resolution but that did not solve the issue. I thought maybe I get a timeout in the read because it is trying to still get too much pixels, so I wanted to see which pixel would it timeout on. So I modified the size of each fetch of data and added that info to the debug log. What I discovered is that pretty much any resolution can work. If it is bigger than the actual size, the data will just be zero for those pixels. What was causing the problem is the chunk size in the usb read.

By default it tries to get all the data in one read. I've found that I can't reliable get the image data if the read chunk size is too big. The size that works for me is pretty darn small actually and I'd assume makes transfers take longer than it normally would (A guess).

1024 I still get time outs toward the end. The value I've been able to reliably use is 512. It also seems like values that are not a power of 2 cause a LIBUSB_ERROR_OVERFLOW. In any case, I'm really happy we've gotten this to work. I'm not sure how many of these older cameras are out there, so not sure if it is worth a patch or a config parameter where you can specify smaller chunk size or something. What do you guys think? Should I also post this as a git issue?

Just in case I also tried commenting out the debug statement in case it was a timing issue, but 512 still works with the debug statement commented out. And size 512 with that debug statement is a lot of statements!

Below is my diff:

diff --git a/indi-sx/sxccdusb.cpp b/indi-sx/sxccdusb.cpp
index 8f08b78..4f89b64 100644
--- a/indi-sx/sxccdusb.cpp
+++ b/indi-sx/sxccdusb.cpp
@@ -736,11 +736,12 @@ int sxReadPixels(HANDLE sxHandle, void *pixels, unsigned long count)
     while (read < count && rc >= 0)
     {
         int size = count - read;
+        size=512;
         if (size > CHUNK_SIZE)
             size = CHUNK_SIZE;
         rc = libusb_bulk_transfer(sxHandle, BULK_IN, (unsigned char *)pixels + read, size, &transferred,
                                   BULK_DATA_TIMEOUT);
-        DEBUG(log(true, "sxReadPixels: libusb_control_transfer -> %s\n", rc < 0 ? libusb_error_name(rc) : "OK"));
+        DEBUG(log(true, "sxReadPixels: libusb_control_transfer -> %s, %lu/%lu t%lu\n", rc < 0 ? libusb_error_name(rc) : "OK", read, count, transferred));
         if (transferred >= 0)
         {
             read += transferred;


Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 1 month ago

I agree. If I was using a SXVR I bet there would be no problem.

Yes the PID it shows is 0x325 which I think is the same as the SXVR according to here:
www.sxccd.com/80-support

lsusb with the SXV-M25C
===============================================================
Bus 001 Device 005: ID 1278:0325 Starlight Xpress SXV-M25C
===============================================================

Interesting that in the linux usbids file PID 0325 is the SXV-M25C not SXVR-M25C. I guess because it was first.

Looks like maybe my next step will be to try to get my own build going and understand the driver more.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 1 month ago

Yeah. I'm not sure what all is the difference between the two cameras but I guess they are slightly incompatible. That would be easy if it is just width and height issue. Can maybe just add a overwrite flag that one can toggle. If I can figure out how to make indi use my own build of the sx driver I could try it. It would be a lot easier if I can take the camera home. The club really didn't want anyone leaving the observatory with it, but maybe I can ask for an exception to play with it for a week during next full moon.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 1 month ago

On windows with the Starlight software says the resolution of the camera is 3000x2000, however the fits images it saves are 3040x2024

  • 3000x2000 - Nope
  • 3032x2016 - Nope
  • 3046x2016 - Nope, does not let me says it is out of bounds.
  • 3040x2024 - Nope, does not let me says it is out of bounds.

sx_ccd_test output:
sx_ccd_test version 1.13

sxList: 'SXVR-M25C' #1 [0x1278, 0x325] found
sxList() -> 1

testing SXVR-M25C -----------------------------------

sxOpen: libusb_open -> OK
sxOpen: libusb_get_config_descriptor -> OK
sxOpen: libusb_claim_interface(1) -> OK
sxOpen() -> 1

sxGetCameraModel: libusb_control_transfer -> OK
sxGetCameraModel: libusb_control_transfer -> OK
sxGetCameraModel: NON-INTERLACED MONO model 25
sxGetCameraModel() -> 89

sxGetCameraParams: libusb_control_transfer -> OK
sxGetCameraParams: libusb_control_transfer -> OK
sxGetCameraParams: chip size: 3000 x 2000 x 16, pixel size: 7.80 x 7.80, matrix type: fff
sxGetCameraParams: capabilities: STAR2K
sxGetCameraParams: serial ports: 2
sxGetCameraParams(..., 0,...) -> 1

sxSetTimer: libusb_control_transfer -> OK
sxSetTimer(900) -> 1

sxGetTimer: libusb_control_transfer -> OK
sxGetTimer: libusb_control_transfer -> OK
sxGetTimer() -> 900

sxGetTimer: libusb_control_transfer -> OK
sxGetTimer: libusb_control_transfer -> OK
sxGetTimer() -> 0

sxClearPixels: libusb_control_transfer -> OK
sxClearPixels(..., 0) -> 1

sxLatchPixels: libusb_control_transfer -> OK
sxLatchPixels(..., 0, ...) -> 1

sxReadPixels: libusb_control_transfer -> OK
sxReadPixels() -> 1

1787 1795 1819 1834 1802 1788 1833 1798 1822 1799 
1815 1805 1787 1829 1802 1821 1811 1795 1810 1849 
1829 1789 1855 1813 1829 1807 1795 1827 1831 1823 
1837 1810 1819 1823 1819 1808 1815 1790 1841 1807 
1793 1807 1832 1811 1797 1839 1818 1813 1821 1810 
1812 1821 1843 1791 1825 1831 1850 1830 1817 1819 
1841 1826 1817 1818 1807 1795 1829 1830 1803 1819 
1789 1791 1795 1807 1835 1838 1801 1811 1828 1815 
1820 1819 1831 1823 1815 1817 1807 1790 1787 1797 
1815 1808 1838 1791 1795 1789 1827 1806 1803 1779 

sxClose: libusb_close
sxClose() 


Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 2 months ago

Someone else in the astronomy club has already used it on windows using the SXR-M25C software from Starlight Express's website.

INDI thinks it is 3000x2000 I guess, from log:
"2019-09-24T03:02:26: Driver indi_sx_ccd: sxGetCameraParams: chip size: 3000 x 2000 x 16, pixel size: 7.80 x 7.80, matrix type: fff"

I would have thought INDI would handle a slightly wrong set frame, but maybe not. I will have to try 3040x2016 instead of 3032x2016. Of course in the manual you linked it lists multiple resolutions 3044x2016 is also mentioned. I suppose I can try the resolution given in the image from the windows software. It can't take it off the observatory grounds and it is a 1.25 hr drive one way, so will likely be a few days until I can try the different resolutions in the config.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 2 months ago

More information:




kern.log
============================================================

Sep 24 13:34:12 pendragon kernel: [ 195.296703] usb 1-5: new high-speed USB device number 4 using xhci_hcd
Sep 24 13:34:13 pendragon kernel: [ 196.964164] usb 1-5: new high-speed USB device number 5 using xhci_hcd
Sep 24 13:34:14 pendragon kernel: [ 197.716388] usb 1-5: config 1 has an invalid interface number: 1 but max is 0
Sep 24 13:34:14 pendragon kernel: [ 197.716392] usb 1-5: config 1 has no interface number 0
Sep 24 13:34:14 pendragon kernel: [ 197.716797] usb 1-5: New USB device found, idVendor=1278, idProduct=0325, bcdDevice= 0.00
Sep 24 13:34:14 pendragon kernel: [ 197.716802] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Sep 24 13:34:14 pendragon kernel: [ 197.716805] usb 1-5: Product: ECHO2
Sep 24 13:34:14 pendragon kernel: [ 197.716808] usb 1-5: Manufacturer: Starlight Xpress


lsusb
===============================================================
Bus 001 Device 005: ID 1278:0325 Starlight Xpress SXV-M25C



usb-devices
===============================================================
T: Bus=01 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1278 ProdID=0325 Rev=00.00
S: Manufacturer=Starlight Xpress
S: Product=ECHO2
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 2 months ago

A club member pointed out to me that the camera is a SXV-M25C (no R). I can double check the USB ID. Maybe that makes a difference. Maybe INDI treating it as the newer SXVR-M25C and not the older SXV-M25C.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 2 months ago

Thanks for taking a look.

I agree that might be part of the problem. I noticed that also. However when I start INDI the frame set is set to 3032x2016. So I don't know where it is getting 21946x39648 from.

Read More...

Russell Valentine replied to the topic 'Failure to take exposure with Starlight SXVR-M25C' in the forum. 2 months ago

Sorry forgot some key information:

1) INDI Library version 1.8.1

2) KStars/Ekos 3.3.6 ubuntu ppa kstars-bleeding

3) INDI Source - Ubuntu ppa:mutlaqja/ppa

4) Kernel - Linux pendragon 5.0.0-29-generic #31~18.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Read More...

Russell Valentine created a new topic ' Failure to take exposure with Starlight SXVR-M25C' in the forum. 2 months ago

I've really enjoyed using INDI, well done!

The astronomy club I'm in recently got a used Starlight Express camera. The SXVR-M25C. However I am never able to get an exposure. When I try to take a 1 second exposure for example it just hangs there forever.

I seems to connect and it looks like it gets info from the camera. But when I expose I just never get the image. I see a lot of these in the logs

INDI Server: "2019-09-24T03:02:57: Driver indi_sx_ccd: sxReadPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT"

I have it externally power, I've tried replacing the USB cable and also tried with the cooler on and off in the configuration.

Any help would be appreciated.

File Attachment:

File Name: log_21-59-40.txt
File Size: 50 KB


Read More...