hubaiz / DslrDashboardServer

DslrDashboard Server for OpenWrt
GNU General Public License v3.0
159 stars 60 forks source link

Missing lib on RN516 #7

Closed dsnpevl closed 9 years ago

dsnpevl commented 9 years ago

I am trying to build ddserver on a NetGear ReadyNas 516, which is supposed to be based on a debian distribution. But all I can find on the OS is:

Linux nas-XX-XX-XX 3.0.101.RNx86_64.3 #1 SMP Wed Nov 12 04:26:12 PST 2014 x86_64 GNU/Linux

(Note: I put "XX" to hide the real host name) When I try to build I immediately get a message about a missing lib file:

g++: error: /usr/lib/x86_64-linux-gnu/libusb-1.0.a: No such file or directory

What should I do to fix this? Please note that I don't have much experience on building and installing on Linux. But I'm more than willing to give it a try.

Full log:

login as: root root@nas-XX-XX-XX's password:

Welcome to ReadyNASOS 6.2.0

Last login: Mon Dec 8 23:37:10 2014 from my.pc.name root@nas-XX-XX-XX:~# root@nas-XX-XX-XX:~# uname -r 3.0.101.RNx86_64.3 root@nas-XX-XX-XX:~# uname -a Linux nas-XX-XX-XX 3.0.101.RNx86_64.3 #1 SMP Wed Nov 12 04:26:12 PST 2014 x86_64 GNU/Linux root@nas-XX-XX-XX:~# uname -m x86_64 root@nas-XX-XX-XX:~# cd /home/admin/DslrDashboardServer/ root@nas-XX-XX-XX:/home/admin/DslrDashboardServer# ls -al total 8 drwxr-xr-x 1 root root 50 Dec 8 23:39 . drwx------ 1 admin admin 62 Dec 8 23:30 .. drwxr-xr-x 1 root root 26 Dec 8 23:39 files -rw-r--r-- 1 root root 1274 Dec 8 23:39 Makefile -rw-r--r-- 1 root root 2867 Dec 8 23:39 README.md drwxr-xr-x 1 root root 104 Dec 8 23:39 src root@nas-XX-XX-XX:/home/admin/DslrDashboardServer# cd src/ root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a lpthread -lrt -lstdc++ -o ddserver g++: error: /usr/lib/x86_64-linux-gnu/libusb-1.0.a: No such file or directory g++: error: lpthread: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls -al /usr/lib/x86_64-linux-gnu/libusb-1.0.a ls: cannot access /usr/lib/x86_64-linux-gnu/libusb-1.0.a: No such file or directory root@nas--XX-XX-XX:/usr/lib# cd /usr/include/libusb-1.0/ -bash: cd: /usr/include/libusb-1.0/: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# cat /etc/issue ReadyNASOS 6.2.0 \n \l

hubaiz commented 9 years ago

Hi

You need to install the libusb dev package or build and install yourself.

Zoltan

On Tue, Dec 9, 2014 at 12:12 AM, dsnpevl notifications@github.com wrote:

I am trying to run the build on a NetGear ReadyNas 516, which is supposed to be based on a debian distribution. But all I can find on the OS is:

Linux nas-XX-XX-XX 3.0.101.RNx86_64.3 #1 https://github.com/hubaiz/DslrDashboardServer/issues/1 SMP Wed Nov 12 04:26:12 PST 2014 x86_64 GNU/Linux

(Note: I put "XX" to hide the real host name) When I try to build I immediately get a message about a missing lib file:

g++: error: /usr/lib/x86_64-linux-gnu/libusb-1.0.a: No such file or directory

What should I do to fix this? Please note that I don't have much experience on building and installing on Linux. But I'm more than willing to give it a try.

Full log:

login as: root root@nas-XX-XX-XX's password:

Welcome to ReadyNASOS 6.2.0

Last login: Mon Dec 8 23:37:10 2014 from my.pc.name root@nas-XX-XX-XX:~# root@nas-XX-XX-XX:~# uname -r 3.0.101.RNx86_64.3 root@nas-XX-XX-XX:~# uname -a Linux nas-XX-XX-XX 3.0.101.RNx86_64.3 #1 https://github.com/hubaiz/DslrDashboardServer/issues/1 SMP Wed Nov 12 04:26:12 PST 2014 x86_64 GNU/Linux root@nas-XX-XX-XX:~# uname -m x86_64 root@nas-XX-XX-XX:~# cd /home/admin/DslrDashboardServer/ root@nas-XX-XX-XX:/home/admin/DslrDashboardServer# ls -al total 8 drwxr-xr-x 1 root root 50 Dec 8 23:39 . drwx------ 1 admin admin 62 Dec 8 23:30 .. drwxr-xr-x 1 root root 26 Dec 8 23:39 files -rw-r--r-- 1 root root 1274 Dec 8 23:39 Makefile -rw-r--r-- 1 root root 2867 Dec 8 23:39 README.md drwxr-xr-x 1 root root 104 Dec 8 23:39 src root@nas-XX-XX-XX:/home/admin/DslrDashboardServer# cd src/ root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a lpthread -lrt -lstdc++ -o ddserver g++: error: /usr/lib/x86_64-linux-gnu/libusb-1.0.a: No such file or directory g++: error: lpthread: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls -al /usr/lib/x86_64-linux-gnu/libusb-1.0.a ls: cannot access /usr/lib/x86_64-linux-gnu/libusb-1.0.a: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# cat /etc/issue ReadyNASOS 6.2.0 \n \l

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7.

dsnpevl commented 9 years ago

Hi,

Thanks for your swift feedback! I installed the missing libusb dev package and compiled and build the ddserver. All screen output below. First a few questions and a comment.

Questions:

Comment: The section "Compile DslrDashboard Server on Linux" @ https://github.com/hubaiz/DslrDashboardServer shows the compile/build command. I copied/pasted it, but there seems to be a mistake there: "lpthread" should be "-lpthread". At least on my system I had to change it. See screen output below.

root@nas-XX-XX-XX:~# sudo apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libusb-1.0-0 The following NEW packages will be installed: libusb-1.0-0 libusb-1.0-0-dev 0 upgraded, 2 newly installed, 0 to remove and 51 not upgraded. Need to get 221 kB of archives. After this operation, 1,026 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0 amd64 2:1.0.11-1 [40.6 kB] Get:2 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0-dev amd64 2:1.0.11-1 [180 kB] Fetched 221 kB in 1s (152 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libusb-1.0-0:amd64. (Reading database ... 32484 files and directories currently installed.) Unpacking libusb-1.0-0:amd64 (from .../libusb-1.0-0_2%3a1.0.11-1_amd64.deb) ... Selecting previously unselected package libusb-1.0-0-dev. Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.11-1_amd64.deb) ... Setting up libusb-1.0-0:amd64 (2:1.0.11-1) ... Setting up libusb-1.0-0-dev (2:1.0.11-1) ... Processing triggers for libc-bin ... root@nas-XX-XX-XX:~#

root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a lpthread -lrt -lstdc++ -o ddserver g++: error: lpthread: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ^C root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a -lpthread -lrt -lstdc++ -o ddserver main.cpp: In function ‘void startUdpListener()’: main.cpp:137:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssizet {aka long int}’ [-Wformat] main.cpp: In function ‘void joinGroup(int, char)’: main.cpp:280:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] main.cpp: In function ‘void leaveGroup(int, char_)’: main.cpp:302:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] In file included from communicator.cpp:8:0: communicator.h: In constructor ‘Communicator::Communicator()’: communicator.h:64:24: warning: ‘Communicator::mHandle’ will be initialized after [-Wreorder] communicator.h:63:17: warning: ‘libusb_device* Communicator::mDevice’ [-Wreorder] communicator.cpp:10:1: warning: when initialized here [-Wreorder] communicator.cpp: In member function ‘bool Communicator::readFromClient()’: communicator.cpp:110:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘bool Communicator::processUsbPacket(uint8t, int)’: communicator.cpp:264:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘uint8t Communicator::readUsbPacket(int&)’: communicator.cpp:313:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘void Communicator::sendUsbDeviceList(uint32_t)’: communicator.cpp:662:73: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat] root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls communicator.cpp communicator.h ddserver main.cpp main.h Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls -al total 152 drwxr-xr-x 1 root root 120 Dec 9 17:51 . drwxr-xr-x 1 root root 50 Dec 8 23:39 .. -rw-r--r-- 1 root root 23586 Dec 8 23:39 communicator.cpp -rw-r--r-- 1 root root 2425 Dec 8 23:39 communicator.h -rwxr-xr-x 1 root root 106217 Dec 9 17:51 ddserver -rw-r--r-- 1 root root 9057 Dec 8 23:39 main.cpp -rw-r--r-- 1 root root 923 Dec 8 23:39 main.h -rw-r--r-- 1 root root 278 Dec 8 23:39 Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ./ddserver

hubaiz commented 9 years ago

Hi

ddserver is only a simple proxy server that exchanges PTP packets between the connected DSLR and DslrDashboard so there is not much output. If you need more you can edit the source. Probably you can put in rc.local but this depends on your Linux distro.

Zoltan

On Tue, Dec 9, 2014 at 6:32 PM, dsnpevl notifications@github.com wrote:

Hi,

Thanks for your swift feedback.I installed the missing libusb dev package and compiled and build the ddserver. All screen output below. First a few questions and a comment.

Questions:

  • Is the screen output what you would expect and is the ddsever compiled and build?
  • I can now start it from command-line (it seems). But how do I tell if it's running and what it is doing? Are there any log files I can put a "tail" on?
  • What is the best way to run .ddserver? As "root" or is it better to select a different user?
  • How can I make it run permantely, so it will automatically started at system reboot?
  • Is there additional documentation I can read?

Comment: The section "Compile DslrDashboard Server on Linux" @ https://github.com/hubaiz/DslrDashboardServer shows the compile/build command. I copied/pasted it, but there seems to be a mistake there: "lpthread" should be "-lpthread". At least on my system I had to change it. See screen output below.

root@nas-XX-XX-XX:~# sudo apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libusb-1.0-0 The following NEW packages will be installed: libusb-1.0-0 libusb-1.0-0-dev 0 upgraded, 2 newly installed, 0 to remove and 51 not upgraded. Need to get 221 kB of archives. After this operation, 1,026 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0 amd64 2:1.0.11-1 [40.6 kB] Get:2 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0-dev amd64 2:1.0.11-1 [180 kB] Fetched 221 kB in 1s (152 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libusb-1.0-0:amd64. (Reading database ... 32484 files and directories currently installed.) Unpacking libusb-1.0-0:amd64 (from .../libusb-1.0-0_2%3a1.0.11-1_amd64.deb) ... Selecting previously unselected package libusb-1.0-0-dev. Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.11-1_amd64.deb) ... Setting up libusb-1.0-0:amd64 (2:1.0.11-1) ... Setting up libusb-1.0-0-dev (2:1.0.11-1) ... Processing triggers for libc-bin ... root@nas-XX-XX-XX:~#

root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a lpthread -lrt -lstdc++ -o ddserver g++: error: lpthread: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ^C root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a -lpthread -lrt -lstdc++ -o ddserver main.cpp: In function ‘void startUdpListener()’: main.cpp:137:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t {aka long int}’ [-Wformat] main.cpp: In function ‘void joinGroup(int, char

)’: main.cpp:280:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] main.cpp: In function ‘void leaveGroup(int, char)’: main.cpp:302:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] In file included from communicator.cpp:8:0: communicator.h: In constructor ‘Communicator::Communicator()’: communicator.h:64:24: warning: ‘Communicator::mHandle’ will be initialized after [-Wreorder] communicator.h:63:17: warning: ‘libusb_device* Communicator::mDevice’ [-Wreorder] communicator.cpp:10:1: warning: when initialized here [-Wreorder] communicator.cpp: In member function ‘bool Communicator::readFromClient()’: communicator.cpp:110:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘bool Communicator::processUsbPacket(uint8_t

_, int)’: communicator.cpp:264:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘uint8t Communicator::readUsbPacket(int&)’: communicator.cpp:313:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘void Communicator::sendUsbDeviceList(uint32_t)’: communicator.cpp:662:73: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat] root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls communicator.cpp communicator.h ddserver main.cpp main.h Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls -al total 152 drwxr-xr-x 1 root root 120 Dec 9 17:51 . drwxr-xr-x 1 root root 50 Dec 8 23:39 .. -rw-r--r-- 1 root root 23586 Dec 8 23:39 communicator.cpp -rw-r--r-- 1 root root 2425 Dec 8 23:39 communicator.h -rwxr-xr-x 1 root root 106217 Dec 9 17:51 ddserver -rw-r--r-- 1 root root 9057 Dec 8 23:39 main.cpp -rw-r--r-- 1 root root 923 Dec 8 23:39 main.h -rw-r--r-- 1 root root 278 Dec 8 23:39 Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ./ddserver

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66322554 .

dsnpevl commented 9 years ago

Hi,

OK. I guess there is not much output needed for a simple proxy. So I assume it is working and now I want to use it to connect different places in my network.

I have a wired PC running qDslrDashboard V0.2.3, connected by USB to a Nikon D700. I can control the camera just fine from the PC (great software!), but how would I use it in combination with the ddserver?

I also have an Android 4.4.4 phone with DslrDashboard v0.30.33.

So my assumption is that I can control the D700 on the USB of the PC running qDslrDashboard, with the DslrDashboard on the Android phone, through the ddserver on my NAS. Is that assumption correct?

I put the “Network Server IP address” in DslrDashboard on the phone to the IP address of my NAS. I left the port unchanged on 4757.

In DslrDashboard on the phone, I can select a button “Start Server”, but that starts on the IP address of the phone. So I assume I have to use “Connect to OpenWrt/Linux”? It seems to connect. Also the qDslrDashboard on the PC will respond: “No DSLR device found on DDServer at ” , if I press the Network button. So it seems I can reach the ddserver on the NAS from both from the PC and the Android phone. But it expects the camera to be connected to the NAS? I would expect a different use case, but maybe I misunderstand the functionality of the ddserver. This is the usecase I would like to see:

Control D700 from my phone: DslrDashboard 0.30.33 on Android 4.4.4 phone -> DDServer on NAS -> qDslrDashboard 0.2.3 on PC -> USB -> Nikon D700

Is this possible? If so, how can I get it to work?

I also tried a simple alternative and connected the D700 through a USB mini to ultra cable to the Android phone. When I press the button “Search for USB camera”, it doesn’t find the D700. Anything I can change to get this to work?

Van: hubaiz [mailto:notifications@github.com] Verzonden: dinsdag 9 december 2014 18:48 Aan: hubaiz/DslrDashboardServer CC: dsnpevl Onderwerp: Re: [DslrDashboardServer] Missing lib on RN516 (#7)

Hi

ddserver is only a simple proxy server that exchanges PTP packets between the connected DSLR and DslrDashboard so there is not much output. If you need more you can edit the source. Probably you can put in rc.local but this depends on your Linux distro.

Zoltan

On Tue, Dec 9, 2014 at 6:32 PM, dsnpevl notifications@github.com wrote:

Hi,

Thanks for your swift feedback.I installed the missing libusb dev package and compiled and build the ddserver. All screen output below. First a few questions and a comment.

Questions:

  • Is the screen output what you would expect and is the ddsever compiled and build?
  • I can now start it from command-line (it seems). But how do I tell if it's running and what it is doing? Are there any log files I can put a "tail" on?
  • What is the best way to run .ddserver? As "root" or is it better to select a different user?
  • How can I make it run permantely, so it will automatically started at system reboot?
  • Is there additional documentation I can read?

Comment: The section "Compile DslrDashboard Server on Linux" @ https://github.com/hubaiz/DslrDashboardServer shows the compile/build command. I copied/pasted it, but there seems to be a mistake there: "lpthread" should be "-lpthread". At least on my system I had to change it. See screen output below.

root@nas-XX-XX-XX:~# sudo apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libusb-1.0-0 The following NEW packages will be installed: libusb-1.0-0 libusb-1.0-0-dev 0 upgraded, 2 newly installed, 0 to remove and 51 not upgraded. Need to get 221 kB of archives. After this operation, 1,026 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0 amd64 2:1.0.11-1 [40.6 kB] Get:2 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0-dev amd64 2:1.0.11-1 [180 kB] Fetched 221 kB in 1s (152 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libusb-1.0-0:amd64. (Reading database ... 32484 files and directories currently installed.) Unpacking libusb-1.0-0:amd64 (from .../libusb-1.0-0_2%3a1.0.11-1_amd64.deb) ... Selecting previously unselected package libusb-1.0-0-dev. Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.11-1_amd64.deb) ... Setting up libusb-1.0-0:amd64 (2:1.0.11-1) ... Setting up libusb-1.0-0-dev (2:1.0.11-1) ... Processing triggers for libc-bin ... root@nas-XX-XX-XX:~#

root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a lpthread -lrt -lstdc++ -o ddserver g++: error: lpthread: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ^C root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a -lpthread -lrt -lstdc++ -o ddserver main.cpp: In function ‘void startUdpListener()’: main.cpp:137:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t {aka long int}’ [-Wformat] main.cpp: In function ‘void joinGroup(int, char

)’: main.cpp:280:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] main.cpp: In function ‘void leaveGroup(int, char)’: main.cpp:302:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] In file included from communicator.cpp:8:0: communicator.h: In constructor ‘Communicator::Communicator()’: communicator.h:64:24: warning: ‘Communicator::mHandle’ will be initialized after [-Wreorder] communicator.h:63:17: warning: ‘libusb_device* Communicator::mDevice’ [-Wreorder] communicator.cpp:10:1: warning: when initialized here [-Wreorder] communicator.cpp: In member function ‘bool Communicator::readFromClient()’: communicator.cpp:110:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘bool Communicator::processUsbPacket(uint8_t

_, int)’: communicator.cpp:264:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘uint8t Communicator::readUsbPacket(int&)’: communicator.cpp:313:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘void Communicator::sendUsbDeviceList(uint32_t)’: communicator.cpp:662:73: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat] root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls communicator.cpp communicator.h ddserver main.cpp main.h Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls -al total 152 drwxr-xr-x 1 root root 120 Dec 9 17:51 . drwxr-xr-x 1 root root 50 Dec 8 23:39 .. -rw-r--r-- 1 root root 23586 Dec 8 23:39 communicator.cpp -rw-r--r-- 1 root root 2425 Dec 8 23:39 communicator.h -rwxr-xr-x 1 root root 106217 Dec 9 17:51 ddserver -rw-r--r-- 1 root root 9057 Dec 8 23:39 main.cpp -rw-r--r-- 1 root root 923 Dec 8 23:39 main.h -rw-r--r-- 1 root root 278 Dec 8 23:39 Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ./ddserver

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66322554 .

— Reply to this email directly or view https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66325108 it on GitHub. https://github.com/notifications/beacon/AJp0sosHnNsCU3kN-lZ68U4rmpEcB2Aqks5nVy1NgaJpZM4DF0hU.gif

hubaiz commented 9 years ago

Hi

You can control a DSLR that is connected to the device that is running ddserver. To connected to the DSLR that is connected to the device that is running ddserver you long press the 'Network' button in qDslrDashboard and enter the IP address of the device running ddserver. qDslrDashboard can also act as a ddserver, in the qDslrDashboard options enable the 'Connection sharing' option, connect to the DSLR and then from another device that is running qDslrDashboard long press the 'Network' button and enter the IP address of the device that is running qDslrDashboard with the connected DSLR. For all this to work the devices need to be in same network. It can be done over internet to but for that you would need some NAT rules on your router. Please also use qDslrDashboard on your Android device as DslrDashboard is not maintained anymore.

Zoltan

On Tue, Dec 9, 2014 at 8:05 PM, dsnpevl notifications@github.com wrote:

Hi,

OK. I guess there is not much output needed for a simple proxy. So I assume it is working and now I want to use it to connect different places in my network.

I have a wired PC running qDslrDashboard V0.2.3, connected by USB to a Nikon D700. I can control the camera just fine from the PC (great software!), but how would I use it in combination with the ddserver?

I also have an Android 4.4.4 phone with DslrDashboard v0.30.33.

So my assumption is that I can control the D700 on the USB of the PC running qDslrDashboard, with the DslrDashboard on the Android phone, through the ddserver on my NAS. Is that assumption correct?

I put the “Network Server IP address” in DslrDashboard on the phone to the IP address of my NAS. I left the port unchanged on 4757.

In DslrDashboard on the phone, I can select a button “Start Server”, but that starts on the IP address of the phone. So I assume I have to use “Connect to OpenWrt/Linux”? It seems to connect. Also the qDslrDashboard on the PC will respond: “No DSLR device found on DDServer at ” , if I press the Network button. So it seems I can reach the ddserver on the NAS from both from the PC and the Android phone. But it expects the camera to be connected to the NAS? I would expect a different use case, but maybe I misunderstand the functionality of the ddserver. This is the usecase I would like to see:

Control D700 from my phone: DslrDashboard 0.30.33 on Android 4.4.4 phone -> DDServer on NAS -> qDslrDashboard 0.2.3 on PC -> USB -> Nikon D700

Is this possible? If so, how can I get it to work?

I also tried a simple alternative and connected the D700 through a USB mini to ultra cable to the Android phone. When I press the button “Search for USB camera”, it doesn’t find the D700. Anything I can change to get this to work?

Van: hubaiz [mailto:notifications@github.com] Verzonden: dinsdag 9 december 2014 18:48 Aan: hubaiz/DslrDashboardServer CC: dsnpevl Onderwerp: Re: [DslrDashboardServer] Missing lib on RN516 (#7)

Hi

ddserver is only a simple proxy server that exchanges PTP packets between the connected DSLR and DslrDashboard so there is not much output. If you need more you can edit the source. Probably you can put in rc.local but this depends on your Linux distro.

Zoltan

On Tue, Dec 9, 2014 at 6:32 PM, dsnpevl notifications@github.com wrote:

Hi,

Thanks for your swift feedback.I installed the missing libusb dev package and compiled and build the ddserver. All screen output below. First a few questions and a comment.

Questions:

  • Is the screen output what you would expect and is the ddsever compiled and build?
  • I can now start it from command-line (it seems). But how do I tell if it's running and what it is doing? Are there any log files I can put a "tail" on?
  • What is the best way to run .ddserver? As "root" or is it better to select a different user?
  • How can I make it run permantely, so it will automatically started at system reboot?
  • Is there additional documentation I can read?

Comment: The section "Compile DslrDashboard Server on Linux" @ https://github.com/hubaiz/DslrDashboardServer shows the compile/build command. I copied/pasted it, but there seems to be a mistake there: "lpthread" should be "-lpthread". At least on my system I had to change it. See screen output below.

root@nas-XX-XX-XX:~# sudo apt-get install libusb-1.0-0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libusb-1.0-0 The following NEW packages will be installed: libusb-1.0-0 libusb-1.0-0-dev 0 upgraded, 2 newly installed, 0 to remove and 51 not upgraded. Need to get 221 kB of archives. After this operation, 1,026 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0 amd64 2:1.0.11-1 [40.6 kB] Get:2 http://mirrors.kernel.org/debian/ wheezy/main libusb-1.0-0-dev amd64 2:1.0.11-1 [180 kB] Fetched 221 kB in 1s (152 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libusb-1.0-0:amd64. (Reading database ... 32484 files and directories currently installed.) Unpacking libusb-1.0-0:amd64 (from .../libusb-1.0-0_2%3a1.0.11-1_amd64.deb) ... Selecting previously unselected package libusb-1.0-0-dev. Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.11-1_amd64.deb) ... Setting up libusb-1.0-0:amd64 (2:1.0.11-1) ... Setting up libusb-1.0-0-dev (2:1.0.11-1) ... Processing triggers for libc-bin ... root@nas-XX-XX-XX:~#

root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a lpthread -lrt -lstdc++ -o ddserver g++: error: lpthread: No such file or directory root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ^C root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# g++ -Wall main.cpp communicator.cpp -I/usr/include/libusb-1.0/ -L/usr/lib /usr/lib/x86_64-linux-gnu/libusb-1.0.a -lpthread -lrt -lstdc++ -o ddserver main.cpp: In function ‘void startUdpListener()’: main.cpp:137:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t {aka long int}’ [-Wformat] main.cpp: In function ‘void joinGroup(int, char

)’: main.cpp:280:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] main.cpp: In function ‘void leaveGroup(int, char)’: main.cpp:302:59: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] In file included from communicator.cpp:8:0: communicator.h: In constructor ‘Communicator::Communicator()’: communicator.h:64:24: warning: ‘Communicator::mHandle’ will be initialized after [-Wreorder] communicator.h:63:17: warning: ‘libusb_device* Communicator::mDevice’ [-Wreorder] communicator.cpp:10:1: warning: when initialized here [-Wreorder] communicator.cpp: In member function ‘bool Communicator::readFromClient()’: communicator.cpp:110:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘bool Communicator::processUsbPacket(uint8_t

_, int)’: communicator.cpp:264:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘uint8t Communicator::readUsbPacket(int&)’: communicator.cpp:313:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] communicator.cpp: In member function ‘void Communicator::sendUsbDeviceList(uint32_t)’: communicator.cpp:662:73: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat] root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls communicator.cpp communicator.h ddserver main.cpp main.h Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ls -al total 152 drwxr-xr-x 1 root root 120 Dec 9 17:51 . drwxr-xr-x 1 root root 50 Dec 8 23:39 .. -rw-r--r-- 1 root root 23586 Dec 8 23:39 communicator.cpp -rw-r--r-- 1 root root 2425 Dec 8 23:39 communicator.h -rwxr-xr-x 1 root root 106217 Dec 9 17:51 ddserver -rw-r--r-- 1 root root 9057 Dec 8 23:39 main.cpp -rw-r--r-- 1 root root 923 Dec 8 23:39 main.h -rw-r--r-- 1 root root 278 Dec 8 23:39 Makefile root@nas-XX-XX-XX:/home/admin/DslrDashboardServer/src# ./ddserver

— Reply to this email directly or view it on GitHub < https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66322554>

.

— Reply to this email directly or view < https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66325108> it on GitHub. < https://github.com/notifications/beacon/AJp0sosHnNsCU3kN-lZ68U4rmpEcB2Aqks5nVy1NgaJpZM4DF0hU.gif>

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66337973 .

dsnpevl commented 9 years ago

Thanks, I think I understand it better now. So each camera is connected to 1 device, running 1 instance of ddserver. A qDslrDashboard anywhere on the same network can then discover all the ddsevers and then control each camera connected to each ddserver, right? Then you can think of ddserver as a proxy between a camera and a network that transfers PTP?

qDlsrDashboad is not available on Google Play. That's why I previously installed DslrDashboard, thinking it is the same application. But I now understand it's not. So I downloaded the qDslrDashboard_V0.2.3_Android_x86.apk. I got it to install using Astro file manager or APK Installer, but in both cases, when I run qDslrDashboard for Android, the screen stays blank (black). Are there any settings I need to change? Do I need to install from or to a specific directory?

hubaiz commented 9 years ago

Hi

Yes, but you can connect more DSLR to one device that is running ddserver (USB hub). I have all my 3 DSLR connected to one device that is running ddserver and can control all of them from 1 qDslrDashboard (or more like 1 on Android and one on Windows). I think you need the ARM Android version.

Zoltan

On Tue, Dec 9, 2014 at 9:25 PM, dsnpevl notifications@github.com wrote:

Thanks, I think I understand it better now. So each camera is connected to 1 device, running 1 instance of ddserver. A qDslrDashboard anywhere on the same network can then discover all the ddsevers and then control each camera connected to each ddserver, right? Then you can think of ddserver as a proxy between a camera and a network that transfers PTP?

qDlsrDashboad is not available on Google Play. That's why I previously installed DslrDashboard, thinking it is the same application. But I now understand it's not. So I downloaded the qDslrDashboard_V0.2.3_Android_x86.apk. I got it to install using Astro file manager or APK Installer, but in both cases, when I run qDslrDashboard for Android, the screen stays blank (black). Are there any settings I need to change? Do I need to install from or to a specific directory?

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66351169 .

dsnpevl commented 9 years ago

Hi Zoltan,

Thanks! I should have matched the APK file to the chipset of my device. It's Qualcomm Snapdragon 800. I guess that's ARM, because I now managed to install it and have it running.

I also managed to connect the D700 to the USB of the ReadyNAS 516 that is running DDserver and can control it either from my Android phone or my PC! I now understand the concept and have proven it works :)

The D700 is still not discovered on the Android phone when connected directly through USB. Any special settings I need? (I already switched on "Use 'root' for USB access".) Or maybe a special cable? I now use a standard USB mini to ultra mini cable.

Peter.

dsnpevl commented 9 years ago

Follow up: I can take pictures and switch on LiveView, but when I try to download the pictures the application both on Android Phone and PC crash. Any thoughts?

hubaiz commented 9 years ago

For Android to work with USB you need an OTG adapter and need to have the USB Host function. When does exactly crash, in the image gallery when you click on the image thumb?

On Tue, Dec 9, 2014 at 10:27 PM, dsnpevl notifications@github.com wrote:

Follow up: I can take pictures and switch on LiveView, but when I try to download the pictures the application both on Android Phone and PC crash. Any thoughts?

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66360867 .

dsnpevl commented 9 years ago

OK. So a standard cable is not going to work, I guess. I need to look into that OTG adapter and USB Host function a little bit more. Will deal with that later.

The crash occurs during downloading. Here’s what I do:

In the download dir C:\Users\Pictures\DslrDashboard, the two files that failed to download show up as 0 bytes files.

See attached images for screenshots. I see the same behaviour on the Android phone.

hubaiz commented 9 years ago

I will check but it was working today with D5000 and D7100. Btw you just do a single click (could be that the double click is the problem)

Didn't see any attached image in your last post.

Zoltan

On Tue, Dec 9, 2014 at 11:04 PM, dsnpevl notifications@github.com wrote:

OK. So a standard cable is not going to work, I guess. I need to look into that OTG adapter and USB Host function a little bit more. Will deal with that later.

The crash occurs during downloading. Here’s what I do:

  • Connect from qDslrDashboard on PC to the ddserver on the ReadyNas with ddserver and D700 connected on USB.
  • Switch on LV
  • Select the Image Gallery button
  • In the Image Gallery, select the card.
  • Double-click on of the images to download it.
  • Still at 0%, after a few seconds, the application will crash.

In the download dir C:\Users\Pictures\DslrDashboard, the two files that failed to download show up as 0 bytes files.

See attached images for screenshots. I see the same behaviour on the Android phone.

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66366796 .

dsnpevl commented 9 years ago

Did attach them, but they probably got filtered out. I temporarily put them here: http://fotografeer.nl:7100/img/dslr/crash/

Will try single click next.

dsnpevl commented 9 years ago

Short update: switched to the front USB port and now it seems to works fine. (will test some more).

dsnpevl commented 9 years ago

It was definitely the rear left USB port that is causing the crash. After switching to the front USB port of the RN516, no more crashes occured. The rear USB ports are USB 3.0 and the front is USB 2.0. Maybe the D700 doesn't connect well to a USB 3.0?

dsnpevl commented 9 years ago

We went a bit of topic, but the original problem "Missing lib on RN516" is fixed and DDserver is running on ReadyNas 516. Thanks for your support!

hubaiz commented 9 years ago

Hi

Glad I could help. :)

Zoltan

On Wed, Dec 10, 2014 at 6:50 PM, dsnpevl notifications@github.com wrote:

We went a bit of topic, but the original problem "Missing lib on RN516" is fixed and DDserver is running on ReadyNas 516. Thanks for your support!

— Reply to this email directly or view it on GitHub https://github.com/hubaiz/DslrDashboardServer/issues/7#issuecomment-66492681 .

dsnpevl commented 9 years ago

Since this discussion I tested and described several scenarios on http://fotografeer.nl/index.php?/categories/qdslrdashboard/essays/ .