Register    Login    Forum    Search    FAQ

Board index » Software » Linux




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: How to use the SDK?
 Post Posted: Thu Apr 27, 2017 3:06 pm 
Offline

Joined: Thu Apr 27, 2017 2:49 pm
Posts: 4
Hello,

I'm working on a project with the camere ASI 120 MC Color.
I have to develop a simple application on a Rapsberry Pi to take pictures with the console but i don't understand how to use the SDK provided with the camera.

I tried Windows 10 Iot on my Raspberry Pi. I can control the camera with my program only on my laptop, not on the Raspberry Pi because the architecture arm is apparently not supported by the librairies provided for Windows.

Then i changed my OS for Raspbian and i tried Visual Studio with remote debugger and GCC in command line but the ASI's and Opencv's method are not recognized. I don't understand how to use the librairies for linux.

Is it possible to use another library for Windows on an arm architecture?
Else, which librairies should I use with Raspbian?
How should I include these librairies on Visual Studio or GCC?

Thanks
Loïc


Top 
 Profile  
Reply with quote  
 Post subject: Re: How to use the SDK?
 Post Posted: Fri Apr 28, 2017 1:51 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 195
Currently our SDK doesn't support Windows on ARM platform, if you want to use our SDK on raspberry pi, you can only use Linux OS, here is the SDK for Linux and MacOSX:
http://astronomy-imaging-camera.com/sof ... 6.0414.tar
and refer to the demo code contained in the package.

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


Top 
 Profile  
Reply with quote  
 Post subject: Re: How to use the SDK?
 Post Posted: Fri Apr 28, 2017 10:23 am 
Offline

Joined: Thu Apr 27, 2017 2:49 pm
Posts: 4
Thanks, I can init the camera under Linux but a have a segmentation fault during the capture.
I used gdb to fix the issue and i have this :
Cannot access memory at address 0x81fa
0x76c39094 in ?? () from /lib/arm-linux-gnueabihf/libusb-1.1-0.so.0

I tried to reinstall libusb but it resolved nothing.

I read in another post that it can be an usb problem and it is written to use your upgrade tool but it is a .exe, I cannot launch it on raspbian.
Would you have another solution?


Top 
 Profile  
Reply with quote  
 Post subject: Re: How to use the SDK?
 Post Posted: Wed May 03, 2017 9:35 am 
Offline

Joined: Thu Apr 27, 2017 2:49 pm
Posts: 4
I fixed the segmentation fault but i can't take pictures.

This line always fails :
if(getImageData(pData, width*height, -1))

I declared pData as :
unsigned char *pData = new unsigned char[getMaxWidth()*getMaxHeight()*3];

All steps before getting image run succesfully but this line blocks all.

My code is based on the demo provided with the SDK. I tried to compile all files included in the demo but no one works.

Can it be caused by the use of USB2 with linux?


Top 
 Profile  
Reply with quote  
 Post subject: Re: How to use the SDK?
 Post Posted: Fri May 05, 2017 12:53 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 195
you should use other software to comfirm the camera can work on Linux, say Oacapture, refer to the software list:
https://astronomy-imaging-camera.com/software/
and manual:
https://astronomy-imaging-camera.com/ma ... X%20EN.pdf

if not work, you can try to falsh it to compatible firmware on Windows.

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


Top 
 Profile  
Reply with quote  
 Post subject: Re: How to use the SDK?
 Post Posted: Mon May 08, 2017 7:56 am 
Offline

Joined: Thu Apr 27, 2017 2:49 pm
Posts: 4
It works on linux, i can use the video mode but not the snap mode and the demo provided does not work (and I don't understand why it starts an exposure and stop the video capture instead of the exposure).

When I start the exposure, the status is always WORKING. I never reach the call of getImageAfterExp().


Top 
 Profile  
Reply with quote  
 Post subject: Re: How to use the SDK?
 Post Posted: Tue May 09, 2017 12:52 am 
Offline
Site Admin

Joined: Fri Jul 25, 2014 2:43 am
Posts: 195
Actually stopvideocapture will stop both video and exposure, the same as stopexposure.

>When I start the exposure, the status is always WORKING. I never reach the call of >getImageAfterExp().
maybe the exposure duration is too long, the unit of exposure time is us.

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


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

Board index » Software » Linux


Who is online

Users browsing this forum: Baidu [Spider] 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:  
cron