Closed 12nucleus closed 2 months ago
Yes they are in Read me, pretty straight forward:
https://github.com/artyom-beilis/OpenLiveStacker?tab=readme-ov-file#using-on-linux
I think the only tricky thing that I've seen on Pi is to select correct library in SDK - check if it is 32 or 64 bit.
What problems do you get?
My bad. The issue was CppCMS did not compile correctly the first time around. All fine now on this part.
I still a bit fuzzy about the config.json file. If I did the install in '/home/stellarmate/tools/OpenLiveStacker/build' and I am using a touptek camera. I edited the config.json to this:
{ "libdir" : "/home/stellarmate/tools/OpenLiveStacker/build", "driver" : "sim", "sim" : { "path" : "sim" }, "wdir" : { "width" : 3840, "height": 2160, "format" : "raw16", "path" : "/home/stellarmate/tools/OpenLiveStacker/build/wd" }, "toup" : { "oem": false }, "astap" : { "exe": "astap_cli", "db": "/home/stellarmate/tools/OpenLiveStacker/build/data/db" }, "http": { "ip":"0.0.0.0", "port":8080 }
When I run ols and try to go to 0.0.0.0 (I also tried 127.0.0.1) the program crashes with this errors:
./ols_cmd config.json
2024-04-30 19:58:53; cppcms_http, info: GET / (http_api.cpp:294)
2024-04-30 19:58:53; cppcms, error: Catched exception in thread poolInvalid document root
0x7f9c72d0c0: booster::runtime_error::runtime_error(std::cxx11::basic_string<char, std::char_traits
Is it relate to StellarmateOS or I am doing something wrong?
Two things
Run ./build/ols_cmd config.json
from root directory of the project
2nd to use touptek set driver to value "toup"
Also note in previous comment:
No Toupcam SDK header/lib found
You need to download touptek SDK and provide path to it as per instructions - make sure you match arch (32 or 64 bit) to the library
Made some progress but still have issues with the driver.
I can start OLS if I dont put any driver in the config file. When I add 'toup', OLS says it is looking for libols_driver_toup.so instead of the default driver name in the SDK libtoupcam.so. If I rename the driver to libols_driver_toup.so and run ols, I get this error:
./build/ols_cmd config.json failed:Failed to load driver /home/stellarmate/tools/OpenLiveStacker/build/libols_driver_toup.so: `/home/stellarmate/tools/OpenLiveStacker/build/libols_driver_toup.so: wrong ELF class: ELFCLASS32'
Also, I dont see any arch 32 or 64 bit option in the SDK library, just arm64 armel armhf udev x64 x86.
I tried both the arm64 and armhf driver without success.
My config.json:
{ "libdir" : "/home/stellarmate/tools/OpenLiveStacker/build", "driver" : "toup", "astap" : { "exe": "astap_cli", "db": "/home/stellarmate/tools/OpenLiveStacker/build/data/db" }, "http": { "ip":"0.0.0.0", "port":8080 } }
Thanks a ton for you support!
OLS says it is looking for libols_driver_toup.so instead of the default driver name in the SDK libtoupcam.s
libols_driver_toup.so
is the OLS driver linked to SDK libtoupcam.so.
`/home/stellarmate/tools/OpenLiveStacker/build/libols_driver_toup.so: wrong ELF class: ELFCLASS32'
Please print the output of
ldd build/libols_driver_toup.so
and
file build/libols_driver_toup.so
It looks like something incorrect pointing to LD_LIBRARY_PATH or it loads libtoupcam from incorrect location
Ok, maybe this is where things went wrong. There was no libols_driver_toup.so in build/ when I finished compiling the source so I wrongly assume that I needed to copy and rename libtoupcam.so to build/libols_driver_toup.so.
so the question is why build/libols_driver_toup.so is not present...
I wrongly assume that I needed to copy and rename libtoupcam.so to build/libols_driver_toup.so.
Absolutely... libols_driver_toup.so
is part of OpenLiveStacker build. It is linking during the build to libtoupcam.so
You need to add parameters to CMake:
cmake -DCMAKE_INCLUDE_PATH=/path/to/toupteck_sdk/inc -DCMAKE_LIBRARY_PATH=/path/to/toupteck_sdk/linux/arm64 ..
Or if it is 32 bit pi/build than armhf
or armel
instead arm64 (not sure which one)
Than there should be a message : - Building Toupcam Driver
in cmake output
Still no go ... I tried arm64, armhf and armel with the same result. I get ' Building Toupcam Driver' with the cmake command but make does not go through.
cmake -DCMAKE_INCLUDE_PATH=/home/stellarmate/Downloads/toupcamsdk/inc -DCMAKE_LIBRARY_PATH=/home/stellarmate/Downloads/toupcamsdk/linux/arm64 .. CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
Update the VERSION argument
-- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- ASTAP DB Download enabled CPU: aarch64
make
[ 3%] Building CXX object CMakeFiles/ols_driver_toup.dir/src/toup_camera.cpp.o
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In constructor ‘ols::ToupcamCamera::ToupcamCamera(const std::string&, const std::string&, ols::CamErrorCode&)’:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:112:27: error: ‘Toupcam_query_Model’ was not declared in this scope; did you mean ‘Toupcam_putMode’?
112 | info.model = Toupcam_queryModel(hcam);
| ^~~~~~~
| Toupcam_put_Mode
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In member function ‘virtual std::vector~~~~~
In file included from /home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:2:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In member function ‘virtual ols::CamParam ols::ToupcamCamera::get_parameter(ols::CamOptionId, bool, ols::CamErrorCode&)’:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:745:59: error: ‘TOUPCAM_OPTION_HIGH_FULLWELL’ was not declared in this scope; did you mean ‘TOUPCAM_OPTION_BLACKLEVEL’?
745 | if (FAILED(hr = Toupcam_getOption(hcam, TOUPCAM_OPTION_HIGH_FULLWELL, &high_fullwell)))
| ^~~~~~~~
/home/stellarmate/Downloads/toupcamsdk/inc/toupcam.h:69:37: note: in definition of macro ‘FAILED’
69 | #define FAILED(hr) (((HRESULT)(hr)) < 0)
| ^~
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In member function ‘virtual void ols::ToupcamCamera::set_parameter(ols::CamOptionId, double, ols::CamErrorCode&)’:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:892:48: error: ‘TOUPCAM_OPTION_HIGH_FULLWELL’ was not declared in this scope; did you mean ‘TOUPCAM_OPTION_BLACKLEVEL’?
892 | hr = Toupcam_putOption(hcam, TOUPCAM_OPTION_HIGH_FULLWELL, value ? 1 : 0);
| ^~~~~~~~
| TOUPCAM_OPTION_BLACKLEVEL
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In member function ‘void ols::ToupcamCamera::init(ols::CamErrorCode&)’:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:1107:39: error: ‘TOUPCAM_FLAG_HIGHFULLWELL’ was not declared in this scope
1107 | if (((info.model->flag & TOUPCAM_FLAG_HIGH_FULLWELL)) && FAILED(hr = Toupcam_putOption(hcam, TOUPCAM_OPTION_HIGH_FULLWELL, 1)))
| ^~~~~~
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:1107:109: error: ‘TOUPCAM_OPTION_HIGH_FULLWELL’ was not declared in this scope; did you mean ‘TOUPCAM_OPTIONBLACKLEVEL’?
1107 | if (((info.model->flag & TOUPCAM_FLAG_HIGH_FULLWELL)) && FAILED(hr = Toupcam_putOption(hcam, TOUPCAM_OPTION_HIGH_FULLWELL, 1)))
| ^~~~~~~~
/home/stellarmate/Downloads/toupcamsdk/inc/toupcam.h:69:37: note: in definition of macro ‘FAILED’
69 | #define FAILED(hr) (((HRESULT)(hr)) < 0)
| ^~
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In member function ‘int ols::ToupcamCameraDriver::enumOEM(ToupcamDeviceV2)’:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:1271:33: error: ‘Toupcam_get_Model’ was not declared in this scope; did you mean ‘Toupcam_get_Mode’?
1271 | info[N].model = Toupcam_get_Model(0x547,tp_pid);
| ^~~~~
| Toupcam_get_Mode
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp: In function ‘void ols_set_toup_driver_log(const char, int)’:
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:1332:9: error: ‘Toupcam_log_File’ was not declared in this scope; did you mean ‘Toupcam_put_Size’?
1332 | Toupcam_log_File(log_path);
| ^~~~
| Toupcam_put_Size
/home/stellarmate/OpenLiveStacker/src/toup_camera.cpp:1333:9: error: ‘Toupcam_log_Level’ was not declared in this scope
1333 | Toupcam_log_Level(debug ? 4 : 1);
| ^~~~~
make[2]: [CMakeFiles/ols_driver_toup.dir/build.make:76: CMakeFiles/ols_driver_toup.dir/src/toup_camera.cpp.o] Error 1
make[1]: [CMakeFiles/Makefile2:101: CMakeFiles/ols_driver_toup.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Please download latest SDK - it seems you are using outdated SDK
Look here: https://www.touptek-astro.com/downloads/ go to For developers: ToupTek Astronomy camera SDK
Wow, that was an ordeal! All working now. This is idiotic, when you google 'touptek sdk', the top result brings you to http://www.touptek.com/ with the older SDK.
Anyway, thanks for your patience and you help.
Anyone has the instructions on how to install OLS on the Raspberry PI? I have a Pi 4, 4Gb but it just refuses to compile properly.
High five to the developer!! I have been using OLS on Android and just love its simplicity, live stacking feature and plate solving to find my targets.