×

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

Bi-monthly release with minor bug fixes and improvements

How to add new 3rd party driver

  • Posts: 123
  • Thank you received: 13
HI, I am having trouble adding new 3rd party driver locally. I have made a copy and made and installed driver with my command.

I have edited
/usr/share/kstars/indidrivers.xml
But my driver does not appear inside the app. Command from console works as expected. I have read through indilib.org/developers/add-your-driver.html but that does not say what do i actually need to do to add driver.

Sorry if this question has been asked before but I did not manage to find it.
1 year 8 months ago #84306

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

  • Posts: 249
  • Thank you received: 62
Rick wrote a nice tutorial for this purpose, maybe could help:
github.com/rickbassham/indi-dev-tutorials
The following user(s) said Thank You: Outta
1 year 8 months ago #84317

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

  • Posts: 216
  • Thank you received: 120
You shouldn't need to edit the existing drivers xml file, but instead create a new one for your driver and have it installed when you install the driver itself.
The following user(s) said Thank You: Outta
1 year 8 months ago #84327

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

  • Posts: 123
  • Thank you received: 13
Thank you very much this is exactly what I needed!
1 year 8 months ago #84328

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

  • Posts: 216
  • Thank you received: 120
Feel free to ping me with any questions on how to get going, or if the docs above aren't clear enough.
The following user(s) said Thank You: Outta
1 year 8 months ago #84329

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

  • Posts: 123
  • Thank you received: 13
Ok, So I am sure I am doing something wrong.

I have installed driver, I have made xml.make and it is in my makefile, but it is not added. When I manually add it to the /usr/share/indi, it does not work, only when I manually add entry to /usr/share/indi/drivers.xml then it appears in indi. Otherwise no way.

I have driver working as expected, and it is even usable, but I have to add it manually to drivers.xml, and I do not prefer that option. Any ideas where it went wrong?
1 year 8 months ago #84346
Attachments:

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

  • Posts: 216
  • Thank you received: 120
what does this output?
cat /usr/share/indi/indi_rpicam2x.xml
1 year 8 months ago #84357

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

  • Posts: 123
  • Thank you received: 13
Sorry on slow response, busy at work, here is response, it seems it is not generated:

/usr/share/indi/indi_rpicam2x.xml: No such file or directory


But also to note, original Rpi cam is not there either, and this driver is based on original indi_rpicam, but rpi cam is available from indi app!
Last edit: 1 year 8 months ago by Outta.
1 year 8 months ago #84397

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

  • Posts: 216
  • Thank you received: 120
Okay, double check that you are configuring cmake appropriately, specifically setting the MAKE_INSTALL_PREFIX correctly.
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ../

Also, it looks like you are only copying the xml file when doing a release build in your CMakeLists.txt:
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_rpicam2x.xml CONFIGURATIONS Release DESTINATION ${INDI_DATA_DIR})

Try changing that line to
install(
    FILES
    ${CMAKE_CURRENT_BINARY_DIR}/indi_rpicam2x.xml
    DESTINATION ${INDI_DATA_DIR}
)
1 year 8 months ago #84399

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

  • Posts: 123
  • Thank you received: 13
It seems it is working now, thank you very much kind Sir! I can now continue working on implementation of binning, and hopefully streaming, for rpicam.

I had one small issue as well that was making problems, as I already had manually added Rpicam2x in DIY in drivers.xml, initially it did not appear, and I guess you cannot have two drivers of same name. Once I have removed section from drivers.xml i got driver where it is supposed to be!

If I am not wrong, I was building in Debug mode, but file copy was set only for release, and that is the reason why file was not copied?

File Attachment:


just for log purposes.
cat /usr/share/indi/indi_rpicam2x.xml
<?xml version="1.0" encoding="UTF-8"?>
<driversList>
<devGroup group="CCDs">
	<device label="RPI Camera 2x" manufacturer="Others">
        <driver name="RPI Camera 2x">indi_rpicam2x</driver>
        <version>1.3</version>
	</device>
</devGroup>
</driversList>
astroberry@astroberry:~ $ cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi-3rdparty/indi-rpicam2x
-- Found CFITSIO: /usr/lib/arm-linux-gnueabihf/libcfitsio.so
-- Found libnova: /usr/lib/arm-linux-gnueabihf/libnova.so
-- Found FFTW3: /usr/lib/arm-linux-gnueabihf/libfftw3.so
-- Found FFTW3: /usr/lib/arm-linux-gnueabihf/libfftw3.so
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
-- Could NOT find GMock (missing: GMOCK_LIBRARY GMOCK_INCLUDE_DIR) 
-- GTEST not found, not building unit tests
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Neon found with compiler flag : -mfpu=neon -D__NEON__
-- Configuring done
-- Generating done
-- Build files have been written to: /home/astroberry/Projects/indi-3rdparty/indi-rpicam2x
astroberry@astroberry:~ $ make -j4
make: *** No targets specified and no makefile found.  Stop.
astroberry@astroberry:~ $ cd /home/astroberry/Projects/indi-3rdparty/indi-rpicam2x
astroberry@astroberry:~/Projects/indi-3rdparty/indi-rpicam2x $ make -j4
[ 86%] Built target rpicam2x
[100%] Built target indi_rpicam2x
astroberry@astroberry:~/Projects/indi-3rdparty/indi-rpicam2x $ su~do make install
bash: su~do: command not found
astroberry@astroberry:~/Projects/indi-3rdparty/indi-rpicam2x $ sudo make install
[ 86%] Built target rpicam2x
[100%] Built target indi_rpicam2x
Install the project...
-- Install configuration: "Debug"
-- Up-to-date: /usr/bin/indi_rpicam2x
-- Installing: /usr/share/indi/indi_rpicam2x.xml
astroberry@astroberry:~/Projects/indi-3rdparty/indi-rpicam2x $ 
1 year 8 months ago #84411

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

  • Posts: 216
  • Thank you received: 120
Yes, that's correct. You weren't copying the xml file when doing a debug build/install. Glad it's working now!
The following user(s) said Thank You: Outta
1 year 8 months ago #84413

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

Time to create page: 1.268 seconds