Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Writing or Modifying INDI Drivers for Astro Imaging and Control with RPi


Gina

Recommended Posts

Downloaded Ubuntu Mate 16.04 LTS for Raspberry, extracted the .img file and installed it into a 16GB Micro SD card.  Then I put it in a Raspberry Pi 3 and tried SSD from my Linux Mint machine - no joy.  So I Googled it and it seems SSD isn't enabled in Ubuntu Mate.  Seems it needs

sudu apt-get update
sudo apt-get install openssh-server
sudo ufw allow 22
sudo service ssh restart

Didn't actually need to install openssh-server as the latest version was already installed.  (Part of the Ubuntu Mate distro.)  I had to connect HDMI monitor, keyboard and trackball and start in GUI mode but I now have SSH working and can continue with that from my Linux Mint machine.

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Next went by Marci's instructions above to install libindi.

sudo apt-get update
sudo apt-get install libnova-dev libcfitsio3-dev libusb-1.0-0-dev zlib1g-dev libgsl0-dev build-essential cmake git libjpeg-dev libcurl4-gnutls-dev
mkdir ~/Projects 
cd ~/Projects 
git clone https://github.com/indilib/indi.git 
mkdir -p build/libindi 
cd build/libindi 
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ~/Projects/indi/libindi 
sudo make install 

Now to find the camera and try it out...

This is the list of installed INDI drivers etc.

gina@gina-rpi:~/Projects/build/libindi$ ls
CMakeCache.txt           indi_lx200generic       indi_simulator_ccd        indiversion.h
CMakeFiles               indi_lynx_focus         indi_simulator_dome       indi_watchdog
cmake_install.cmake      indi_meta_weather       indi_simulator_focus      indi_wunderground_weather
config.h                 indi_microtouch_focus   indi_simulator_gps        indi_xagyl_wheel
examples                 indi_moonlite_focus     indi_simulator_telescope  install_manifest.txt
indi_baader_dome         indi_nfocus             indi_simulator_wheel      libindiclient.a
indi_celestron_gps       indi_nstep_focus        indi_smartfocus_focus     libindidriver.a
indi_eval                indi_optec_wheel        indi_sqm_weather          libindidriver.so
indi_flipflat            indi_perfectstar_focus  indi_star2000             libindidriver.so.1
indi_getprop             indi_quantum_wheel      indi_steeldrive_focus     libindidriver.so.1.4.1
indi_gpusb               indi_robo_focus         indi_synscan              libindi.pc
indi_hitecastrodc_focus  indi_rolloff_dome       indi_tcfs_focus           libs
indi_ieq_telescope       indi_script_dome        indi_temma                Makefile
indi_imager_agent        indi_script_telescope   indi_usbfocusv3_focus     make_lx200generic_symlink.cmake
indi_joystick            indiserver              indi_v4l2_ccd             make_tcfs_symlink.cmake
indi_lx200basic          indi_setprop            indi_vantage_weather
gina@gina-rpi:~/Projects/build/libindi$ 

To run the camera it shoud only be required to run :- indiserver -m 100 -vv indi_v4l2_ccd

 

Link to comment
Share on other sites

Didn't work.  More Googling revealed these commands to install the camera :-

cd /tmp
git clone https://github.com/raspberrypi/userland
cd userland
./buildme

Trying again...

Link to comment
Share on other sites

Found another answer which I'm trying

Quote
1 down vote accepted

I seem to be the only person in the entire world who wants to use a regular Linux distro on the RPi, since I could find very little documentation on how to setup the camera from scratch, but in case someone else wants to use the Raspberry Pi camera on Ubuntu or any other distro besides Raspbian, here's how you do it.

  1. Enable kernel/firmware settings required by the camera:

    
    sudo bash -c "echo 'start_x=1' >> /boot/config.txt"
    sudo bash -c "echo 'gpu_mem=128' >> /boot/config.txt"
    

    Note, in the Ubuntu ARM image I used, these settings didn't exist in /boot/config.txt, so I can simply append them. If you've already added the variables, but with different values, you may need to edit them instead of appending.

  2. Install rpi-update and update the firmware

    If you're using a brand-new RPi, you'll almost certainly need to update the firmware, because whatever the factory installs is ancient:

    
    curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && chmod +x /usr/bin/rpi-update
    sudo rpi-update
    

    Note, without these step, I was getting the infamous error:

    
    mmal: mmal_component_create_core: could not find component 'vc.ril.camera'
    mmal: Failed to create camera component
    mmal: main: Failed to create camera component
    mmal: Failed to run camera app. Please check for firmware updates
    
  3. Install userland binaries (e.g. raspistill):

    
    git clone https://github.com/raspberrypi/userland.git
    cd userland
    ./buildme
    touch ~/.bash_aliases
    echo -e 'PATH=$PATH:/opt/vc/bin\nexport PATH' >> ~/.bash_aliases
    echo -e 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib\nexport LD_LIBRARY_PATH' >> ~/.bash_aliases
    source ~/.bashrc
    ldconfig
    
  4. Give non-root users access to the camera device:

    
    echo 'SUBSYSTEM==\"vchiq\",GROUP=\"video\",MODE=\"0660\"' > /etc/udev/rules.d/10-vchiq-permissions.rules
    usermod -a -G video ubuntu
    

    Without these, I was getting the error:

    
    failed to open vchiq instance
    
  5. Reboot to make all changes take effect

    
    sudo reboot now
    

After these steps, raspistill -o cam.jpg correctly captured video input for me on a Raspberry Pi 2 running Ubuntu 14.04.

From HERE

Link to comment
Share on other sites

Some progress - KStars connects to the camera but can't capture an image.  On running the Last line from the website above viz. raspistill -o cam.jpg an image from the camera popped up on the monitor for a few seconds.  I still have the human interfaces connected as the SSH ceases to work after a reboot of the RPi and needs

sudo service ssh restart

to get SSH working again.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.