×

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

Bi-monthly release with minor bug fixes and improvements

indi_sx_ccd not working

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

I tried a native debian for two hours, but I was unable to install correctly indi in debian.
I also tried in other different virtualbox with ubuntu and the same occurred:
SBIG works fine, CoStar does not work.
On monday I will try again to install on a debian machine for test if "indiserver indi_sx_ccd" is working or not.
7 years 6 months ago #10288

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

Hello again;

This weekend i tried with a friend's computer which has fedora as native operative system. The result was the same:
when i tried
indiserver indi_sx_ccd
it said:
startup: indiserver indi_sx_ccd
and nothing more occurred.
However, when I tried to initialize the sbig driver, it worked.
Any idea about how to solve this?
7 years 6 months ago #10310

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

Another date;
when starting this camera from ekos, the INDI Control Panel says:
2016-09-19T16:26:00: Device configuration applied. 
2016-09-19T16:26:00: Error: Invalid range for X. Valid range is from 0 to -1. Requested value is 0 
2016-09-19T16:26:00: Upload settings set to client only. 
2016-09-19T16:26:00: Loading device configuration...
but i can not figure how to change that X range, since it seem that does not correspond to any buttom in ekos
7 years 6 months ago #10311

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

  • Posts: 712
  • Thank you received: 174

Well, output is OK, nothing more should occur on the command line :)

But again, try sx_ccd_test first (just this, no indiserver) and if it will not work, driver will not work as well and it makes no sense to start Ekos. I can't say what's wrong, maybe camera is broken, maybe cable. Does it work under windows?
7 years 6 months ago #10312

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

Thank you for your response;
I will try to solve it and if I arrive to a solution, I will write it here.
Last edit: 7 years 6 months ago by SB.
7 years 6 months ago #10323

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

  • Posts: 712
  • Thank you received: 174
Thank you and let us know. Peter
7 years 6 months ago #10328

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

Sorry again;

I identify the problem. It is related with the timming between messages in the usb. Maybe 1)it can not be fixed due to the use of virtualbox or 2)maybe it can be fixed by increasing the timeout of the communication.
To test the second hypothesis I am trying to modify the "indi-sx" file, located in the "3rdparty" folder. In lines 114 and 115, it say:
#define BULK_COMMAND_TIMEOUT        200
#define BULK_DATA_TIMEOUT           1000
and I want to write:
#define BULK_COMMAND_TIMEOUT        300000
#define BULK_DATA_TIMEOUT           300000

However, the mode I instaled INDI is through:
sudo apt-add-repository ppa:mutlaqja/ppa
sudo apt-get update
sudo apt-get install indi-full

For example, in the SBIG file (remember that SBIG driver works fine in virtual box), the (I think) equivalent line says:
define MAX_THREAD_WAIT     300000
which is much higher than in the case of sx

Any idea of how can I compile INDI with that modification in that file?
Last edit: 7 years 6 months ago by SB.
7 years 6 months ago #10330

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

  • Posts: 712
  • Thank you received: 174
Hi, you don't need to make a driver, just sx_ccd_test. Try

cmake .
make sx_ccd_test

You omitted one zero in both numbers, there is actually 2 second timeout for command and 10 second for bulk download. This is plenty of time even for 16MPx SX-36 full frame download (tested). These 2,000 and 10,000 in SX driver are in miliseconds (libusb timeout) and 300,000 in SBIG driver is in microseconds (usleep delay) and means something different, you can't compare it.

In your particular case (sx_ccd_test execution) libusb_bulk_transfer in sxGetCameraModel (line 338) with 10 second timeout failed (libusb_control_transfer in the log is typo, my fault). There is no chance, that longer value can help, there is some other issue. If you want to try something, comment out the content of sxGetCameraModel() function (lines 328-348), maybe this command is not supported in this camera for some reason (we had this issue with sxGetFirmwareVersion before).

What software do you use on Windows and are you sure, that camera firmware is not reflashed to work with this software?
What libusb version do you have on your linux? Is camera connected to USB 2.0 or USB 3.0 port? Is there some hub involved and is it powered?

Peter
7 years 6 months ago #10331

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

The compilation fails (I changed as a first step only the numbers):
@s-VirtualBox:~/Projects/indi/3rdparty/indi-sx$ cmake .
-- Found CFITSIO: /usr/lib/x86_64-linux-gnu/libcfitsio.so
-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/local/lib/libusb-1.0.so
-- Found INDI: /usr/lib/x86_64-linux-gnu/libindi.so
-- Configuring done
CMake Warning (dev) at CMakeLists.txt:57 (add_executable):
  Policy CMP0003 should be set before this line.  Add code such as
 
    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)
 
  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "indi_sx_wheel" links to some libraries for which the linker
  must search:
 
    -lpthread
 
  and other libraries with known full path:
 
    /usr/local/lib/libusb-1.0.so
 
  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
  more information.
This warning is for project developers.  Use -Wno-dev to suppress it.
 
-- Generating done
-- Build files have been written to: /home/s/Projects/indi/3rdparty/indi-sx

s@s-VirtualBox:~/Projects/indi/3rdparty/indi-sx$ make sx_ccd_test
[ 33%] Building CXX object CMakeFiles/sx_ccd_test.dir/sxccdusb.o
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp:117:1: error: ‘unicdefine’ does not name a type
 unicdefine CHUNK_SIZE                  (10*1024*1024)
 ^
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp:131:5: error: ‘SX_PIDS’ does not name a type
   } SX_PIDS[] = {
     ^
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp: In function ‘int sxList(libusb_device**, const char**, int)’:
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp:228:19: error: ‘SX_PIDS’ was not declared in this scope
   for (int i = 0; SX_PIDS[i].pid; i++)
                   ^
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp:235:25: error: ‘SX_PIDS’ was not declared in this scope
         for (int i = 0; SX_PIDS[i].pid; i++) {
                         ^
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp: In function ‘int sxReadPixels(libusb_device_handle*, void*, long unsigned int)’:
/home/s/Projects/indi/3rdparty/indi-sx/sxccdusb.cpp:644:16: error: ‘CHUNK_SIZE’ was not declared in this scope
     if (size > CHUNK_SIZE)
                ^
CMakeFiles/sx_ccd_test.dir/build.make:86: recipe for target 'CMakeFiles/sx_ccd_test.dir/sxccdusb.o' failed
make[3]: *** [CMakeFiles/sx_ccd_test.dir/sxccdusb.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/sx_ccd_test.dir/all' failed
make[2]: *** [CMakeFiles/sx_ccd_test.dir/all] Error 2
CMakeFiles/Makefile2:116: recipe for target 'CMakeFiles/sx_ccd_test.dir/rule' failed
make[1]: *** [CMakeFiles/sx_ccd_test.dir/rule] Error 2
Makefile:197: recipe for target 'sx_ccd_test' failed
make: *** [sx_ccd_test] Error 2

In windows I use, for testing, the commercial software called "COSTAR and it works fine and, by the way virtualbox works, I am sure that the camera is captured by virtualbox and nothing more.
The libusb version is updated:
dpkg -l libusb*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  libusb-0.1-4:a 2:0.1.12-28  amd64        userspace USB programming library
ii  libusb-1.0-0:a 2:1.0.20-1   amd64        userspace USB programming library
ii  libusb-1.0-0-d 2:1.0.20-1   amd64        userspace USB programming library
ii  libusb-1.0-doc 2:1.0.20-1   all          documentation for userspace USB p
ii  libusb-dev     2:0.1.12-28  amd64        userspace USB programming library
un  libusbmuxd-too <none>       <none>       (no description available)
ii  libusbmuxd4:am 1.0.10-2ubun amd64        USB multiplexor daemon for iPhone

The camera is conected in USB 2.0. I am also tried with USB 3.0 with the same result. There is no hub involved
Thank you very much for your kind response and your efforts
Last edit: 7 years 6 months ago by SB.
7 years 6 months ago #10332

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

Hello again;

Finally I compiled ok from the source "indi-master". I comment out the content of sxGetCameraModel() function and also I increased the time out of lines 114 &115 to 3000000 each one. The error persists :(
s@s-VirtualBox:~/indi/build/3rdparty$ sx_ccd_test
sx_ccd_test version. If this is shown, the modification success 1.12
 
sxList: 'CoStar' #1 [0x1278, 0x517] found
sxList() -> 1
 
testing CoStar ---------------testing modified file--------------------
 
sxOpen: libusb_open -> OK
sxOpen: libusb_get_config_descriptor -> OK
sxOpen: libusb_claim_interface(1) -> OK
sxOpen() -> 1
 
sxGetCameraModel() -> 0
 
sxGetCameraParams: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
sxGetCameraParams(..., 0,...) -> 0
 
sxSetTimer: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
sxSetTimer(900) -> 0
 
sxGetTimer: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
sxGetTimer() -> 0
 
sxClearPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
sxClearPixels(..., 0) -> 0
 
sxLatchPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
sxLatchPixels(..., 0, ...) -> 0
 
sxReadPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
sxReadPixels() -> 0
 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 
 
sxClose: libusb_close
sxClose()


I guess that virtualbox can not provide enough timming between messages to allow this camera to work properly. I faced this problem before with Ueye cameras, but I solve it changing the configuration of Virtualbox to USB3 (even when the camera was connected to a USB2 port). However, in this case it seem that there is no solution when using virtualbox (at least, I have no more ideas).
Last edit: 7 years 6 months ago by SB.
7 years 6 months ago #10336

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

  • Posts: 712
  • Thank you received: 174
Hi, I'll check with vendor if there is something specific about CoStar. Peter

P. S. Do not waste time with virtualbox :)
7 years 6 months ago #10337

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

  • Posts: 19
  • Thank you received: 0

Replied by SB on topic indi_sx_ccd not working

Thank you very much for all;
I strongly prefer Linux, but in my lab there are researchers with windows and researchers with Linux. The idea was to build an "universal" python solution for both types of researchers, in this manner, the researchers with windows would be able to use the same python program using virtualbox.
Build only one program and use virtualbox is because there are camera models that I managed to control with python only under Linux.
Last edit: 7 years 6 months ago by SB.
7 years 6 months ago #10338

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

Time to create page: 1.075 seconds