×

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

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.

  • Posts: 712
  • Thank you received: 174
Terry promised to check the firmware code and let us know... Peter
7 years 6 months ago #10340

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

  • Posts: 712
  • Thank you received: 174
I didn't forget, just dispute with Terry is not finished yet. But it is already clear, that CoStar camera is not fully supported by this driver :( Peter
The following user(s) said Thank You: SB
7 years 5 months ago #10765

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

  • Posts: 712
  • Thank you received: 174
So I have a bad news - CoStar should speak the same protocol as other SX cameras and they also arranged test of CoStar with INDI and it does work :( My only idea is, that original camera firmware is replaced by COSTAR software. Do you mean, that it is possible? Peter
7 years 5 months ago #10824

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

Dear polakovic;

Thank you very much for your efforts. I will try this idea as soon as possible.

Thank you very much again.
7 years 5 months ago #10869

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

Time to create page: 0.630 seconds