Raspi Zero W as a DslrDashboardServer

Open discussion about photography, qDslrDashboard
Post Reply
td13
Posts: 3
Joined: 03 Jun 2017, 13:42

Raspi Zero W as a DslrDashboardServer

Post by td13 »

Hello,

I am new to this topic. I wanted to look for a mobile solution to manage my Nikon camera. Since I have available a spare raspi zero w I am just wondering if I can use it as a DslrDashboardServer?

Any idea? Thank you.
skynex
Posts: 3
Joined: 26 Jun 2017, 10:42

Re: Raspi Zero W as a DslrDashboardServer

Post by skynex »

Hi,

I had the same idea and am trying it for several days. I'm using a Raspian Jessie Lite from 2017-06-21 and managed to install all necessary libraries that were missing in the base installation and led to error messages on startup.

Still I do not get the qDslrDashbard.sh script startet, it says "Illegal instruction" (when I remove the >/dev/nul in qDslrDashboard.sh). I also tried all platform modes mentioned in the Readme (mininal, linuxfb, ...).

Code: Select all

#exec $dirname/$appname -platform "${PLATFORM}" &!>/dev/nul 2>&1 &
exec $dirname/$appname -platform "${PLATFORM}"
I have several ideas what could be the problem:
  • Should not be the problem as only kernels differ. I did not manage to replace all libraries as some are not available on Raspbian Jessie and I even did not find backports (e.g. libexiv2-14). So I stick with his libraries in Qt_Libraries Old text: QtLibs / OpenCV libs are for ARM7 architecture? As he only testet it on a Raspi 2, which is ARM7, I think it could be a problem with a ARM6 Zero. Perhaps only the kernel differs. I will try to exchange libraries with the ones from my distribution. Still the program itself would be compiled for ARM7, so changing the libs could be of no help.
  • He states, that "Graphics memory must be set to 512 using the raspi-config utility" which is not possible with a Zero W that has only 512 MB. It seems to be a streaming server, perhaps 256 MB are not sufficient. Tried even 432 MB what is the maximum my Pi Zero W booted with

    Code: Select all

    gpu_mem_512=432
  • I have read that someone stated Raspian must run in Desktop mode, I run CLI mode only. I don't think that this is needed as it should be a deamon, but I will try as soon I get a mini-hdmi adapter. Perhaps when using Jessie with full Pixel installation more libraries are installed by default.
When I use a Raspi 2, it takes longer to start until an error message complains about not working platform for eglfsI. I am still on this, but for me it seems, he runs out of memory on a Zero W (remember "Illegal instruction" sound like it). Will try Raspi 2 and full Jessie to see if I get it running on a normal Pi before proceeding with a Zero W.

Hope this can be helpful until I get more results.

I installed these additional libraries to Jessie Lite from 2017-06-21:

Code: Select all

apt-get install libpulse-mainloop-glib0 libjpeg8 liblcms2-2 libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 libavcodec56 libavformat56 libswscale3

# Determine missing libraries:
ldd /opt/qDslr/qDslrDashboard |grep "not found"| cut -d" " -f1`

# Manually adjust this
cd /opt/qDslr/Qt_Libraries/
ln    libraw.so.16.0.0              /usr/lib/arm-linux-gnueabihf/libraw.so.16.0.0
ln    libexiv2.so.14.0.0            /usr/lib/arm-linux-gnueabihf/libexiv2.so.14.0.0
ln    libopencv_features2d.so.3.2.0 /usr/lib/arm-linux-gnueabihf/libopencv_features2d.so.3.2.0
ln    libopencv_highgui.so.3.2.0    /usr/lib/arm-linux-gnueabihf/libopencv_highgui.so.3.2.0
ln    libopencv_flann.so.3.2.0      /usr/lib/arm-linux-gnueabihf/libopencv_flann.so.3.2.0
ln    libopencv_imgcodecs.so.3.2.0  /usr/lib/arm-linux-gnueabihf/libopencv_imgcodecs.so.3.2.0
ln    libopencv_imgproc.so.3.2.0    /usr/lib/arm-linux-gnueabihf/libopencv_imgproc.so.3.2.0
ln    libopencv_videoio.so.3.2.0    /usr/lib/arm-linux-gnueabihf/libopencv_videoio.so.3.2.0
ln    libopencv_core.so.3.2.0       /usr/lib/arm-linux-gnueabihf/libopencv_core.so.3.2.0
ln    libQt5Quick.so.5.8.0          /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5.8.0
ln    libQt5Multimedia.so.5.8.0     /usr/lib/arm-linux-gnueabihf/libQt5Multimedia.so.5.8.0
ln    libQt5Qml.so.5.8.0            /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5.8.0
ln    libQt5Bluetooth.so.5.8.0      /usr/lib/arm-linux-gnueabihf/libQt5Bluetooth.so.5.8.0
ln    libQt5Positioning.so.5.8.0    /usr/lib/arm-linux-gnueabihf/libQt5Positioning.so.5.8.0
ln    libQt5SerialPort.so.5.8.0     /usr/lib/arm-linux-gnueabihf/libQt5SerialPort.so.5.8.0
Bye
skynex
Posts: 3
Joined: 26 Jun 2017, 10:42

Re: Raspi Zero W as a DslrDashboardServer

Post by skynex »

Hi,

it does work on a Raspberry Zero W. If anybody noticed, I tried to install qDslrDashboard where I wanted ddserver!

Anyways, to install the ddserver on a Pi with read-only filesystem you have to do following:
  • Install Jessie Lite and add the files "ssh" and "wpa_supplicant.conf" to its boot partition.

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
            ssid="laptop-ap"
            psk="secret"
            priority=5
    }
    
    network={
            ssid="home-ap"
            psk="secret"
            priority=3
    }
  • I will skip any password changes and other customizations using raspi-config
  • Several updates

    Code: Select all

    apt-get update
    apt-get upgrade
    rpi-update # to get 1000Mhz cpu frequency
  • Install ddserver from github (https://github.com/hubaiz/DslrDashboardServer)

    Code: Select all

    apt-get install git build-essential pkg-config libusb-1.0-0-dev
    cd ~pi
    git clone git://github.com/hubaiz/DslrDashboardServer package/DslrDashboardServer
    cd package/DslrDashboardServer
    g++ -Wall src/main.cpp src/communicator.cpp `pkg-config --libs --cflags libusb-1.0` -lpthread -lrt -lstdc++ -o ddserver
    
  • Thomas Höser wrote small scripts for systemd that fit perfectly

    Code: Select all

    cp ddserver /usr/local/bin/
    
    cat > /etc/systemd/system/ddserver.service <<-EOF
    # location: /etc/systemd/system/
    [Unit]
    Description = ddserver for qdslrDashboard
    After       = syslog.target
     
    [Service]
    # make sure the shell script is executable (chmod +x $1)
    # and it begins with a shebang (#!/bin/bash)
    ExecStart   = /usr/local/bin/ddserver &
     
    # In case if it gets stopped, restart it immediately
    Restart     = always
     
    # With notify Type, service manager will be notified
    # when the starting up has finished
    #Type        = notify
    Type        = simple
     
    # Since Type is notify, notify only service updates
    # sent from the main process of the service
    #NotifyAccess= main
     
    [Install]
    # multi-user.target corresponds to run level 3
    # roughtly meaning wanted by system start
    WantedBy    = multi-user.target
    EOF
    
    systemctl daemon-reload
    systemctl enable ddserver.service
    
    systemctl start ddserver.service
    systemctl status ddserver.service
Hope this is of use for somebody :-).

Ciao!
td13
Posts: 3
Joined: 03 Jun 2017, 13:42

Re: Raspi Zero W as a DslrDashboardServer

Post by td13 »

I am back to this subject. Unfortunately, it the DDServer does not work at all. I followed the instructions (Raspi Zero W & Raspian Stretch lite) but in vain:

QDslrDashboard: DDServer not found

Dec 05 18:47:23 raspberrypi ddserver[221]: Incoming client connection
Dec 05 18:47:23 raspberrypi ddserver[221]: Awaiting client connection
Dec 05 18:47:23 raspberrypi ddserver[221]: USB Devices in
Dec 05 18:47:23 raspberrypi ddserver[221]: Number of possible configurations: 1 Device Class: 9 VendorID: 7531, ProductID:
Dec 05 18:47:23 raspberrypi ddserver[221]: Number of alternate settings:
Dec 05 18:47:23 raspberrypi ddserver[221]: Interface class: 9 Interface number: 0 Number of endpoints: 1
Dec 05 18:47:23 raspberrypi ddserver[221]: Imaging USB devices found: 0
Dec 05 18:47:23 raspberrypi ddserver[221]: Error reading total packet size: 0
Dec 05 18:47:23 raspberrypi ddserver[221]: Stoping client
Dec 05 18:47:25 raspberrypi ddserver[221]: Closing USB device

Any idea how to fix it? Thank you.
hubaiz
Site Admin
Posts: 2003
Joined: 27 Jan 2015, 18:58

Re: Raspi Zero W as a DslrDashboardServer

Post by hubaiz »

According the log no camera was found.
For a Nikon camera you should have something like this:

Code: Select all

Dec  5 20:29:17 raspberrypi ddserver: Number of possible configurations: 1 Device Class: 0 VendorID: 1200, ProductID: 1084
This is for the D500, if you have a different Nikon camera then the ProductID will be different.

Try using another USB cable (a short one), also check if your Raspi Zero W has a proper power supply (try with 1A or 2A one)
td13
Posts: 3
Joined: 03 Jun 2017, 13:42

Re: Raspi Zero W as a DslrDashboardServer

Post by td13 »

Thank you for your reply. I fixed it by switching the 2 USB Ports.
Post Reply