SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

Dear polakovic;

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

Thank you very much again.

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

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" solution for both types of researchers, in this manner, the researchers with windows would be able to use the same program using virtualbox.
Build only one program and use virtualbox is because there is cameras models that I managed to control only by Linux.

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

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 USB port). However, in this case it seem that there is no solution when using virtualbox (at least, I have no more ideas).

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

The compilation fails (I changed as a first step only the numbers):
@s-VirtualBox:~/Projects/indi/3rdparty/indi-sx$ cmake .

[spoiler]-- 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[/spoiler]

s@s-VirtualBox:~/Projects/indi/3rdparty/indi-sx$ make sx_ccd_test
[spoiler][ 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[/spoiler]

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*
[spoiler]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[/spoiler]

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

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

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        200000
#define BULK_DATA_TIMEOUT           100000

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

Any idea of how can I compile INDI with that modification in that file?

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

Thank you for your response;
Camera works in my computer with the commercial software, so the problem is in other place. I will try to solve it and if I arrive to a solution, I will write it here.

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

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

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

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?

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

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.

Read More...

SB replied to the topic 'indi_sx_ccd not working' in the forum. 6 years ago

(SBIG works perfectly in Virtualbox)

s@s-VirtualBox:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 1278:0517 Starlight Xpress CoStar
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
s@s-VirtualBox:~$ indiserver sx_ccd_test
2016-09-16T15:01:52: startup: indiserver sx_ccd_test 
2016-09-16T15:01:52: Driver sx_ccd_test: sxList: 'CoStar' #1 [0x1278, 0x517] found
2016-09-16T15:01:52: Driver sx_ccd_test: sxOpen: libusb_open -> OK
2016-09-16T15:01:52: Driver sx_ccd_test: sxOpen: libusb_get_config_descriptor -> OK
2016-09-16T15:01:52: Driver sx_ccd_test: sxOpen: libusb_claim_interface(1) -> OK
2016-09-16T15:01:54: Driver sx_ccd_test: sxGetCameraModel: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:01:56: Driver sx_ccd_test: sxGetCameraParams: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:01:58: Driver sx_ccd_test: sxSetTimer: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:02:00: Driver sx_ccd_test: sxGetTimer: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:02:02: Driver sx_ccd_test: sxClearPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:02:04: Driver sx_ccd_test: sxLatchPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:02:14: Driver sx_ccd_test: sxReadPixels: libusb_control_transfer -> LIBUSB_ERROR_TIMEOUT
2016-09-16T15:02:14: Driver sx_ccd_test: sxClose: libusb_close
2016-09-16T15:02:14: Driver sx_ccd_test: stderr EOF
2016-09-16T15:02:14: Driver sx_ccd_test: restart #1
2016-09-16T15:02:14: Driver sx_ccd_test: sxList: 'CoStar' #1 [0x1278, 0x517] found
... and from here to the infinity

Read More...

SB created a new topic ' indi_sx_ccd not working' in the forum. 6 years ago

Hello;

I have installed INDI and I am able to work perfectly with a sbig camera.

Now I want to use a CoStar camera. However, when I write in the console:

indiserver indi_sx_ccd

does not work. The response is:
2016-09-16T12:46:26: startup: indiserver indi_sx_ccd

but nothing more. In the case of SBIG, the response is:
2016-09-16T12:53:01: startup: indiserver indi_sbig_ccd
2016-09-16T12:53:03: Driver indi_sbig_ccd: OpenDriver: CC_OPEN_DRIVER successful

So I am not able to capture any image with the CoStar camera. The same occur with Ekos. It seem to conect well with the driver, but it take an infinite time to take a photograph.
I(I have PyIndi installed, but i do not think it is affecting INDI)

Any idea please?

Read More...

SB replied to the topic 'Take image with python script' in the forum. 6 years ago

Thank you very much. The code works perfectly
Now, it is the very last question. How can I change the binning of the camera?

Really, thank you very much for share your code with the rest of us.

Read More...

SB replied to the topic 'Take image with python script' in the forum. 6 years ago

I have an update. I re-installed all the programs: INDI and pyindi and now its working !
For the records, the name of the camera that one have to write in line 12 of the script can be found in ekos. Also, in the same place it can be found the drivers which that camera use, in order to use them when start the INDI server in the console (i.e. indiserver indi_sbig_ccd.

I dont know where the problem was.
Thank you very much

One last thing. Now, when you call the script, it enters in an endless loop and so, the command line is blocked. Can you guess some way to do that the script only take a photo and release the command line in order to wait for others instructions?

Read More...

SB replied to the topic 'Take image with python script' in the forum. 6 years ago

No, and the kernel died :-(

1
2
Connecting and waiting 2secs
7
It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.

Read More...