I installed an actual qDSLR on a Raspi 3 with Stretch and qDSLR is running and does function. Also LibUSB is installed without issues and ddserver Source package is cloned to the pi via "clone https:// properly, without issues too.
When running the compile command from out of the "DslrDashboardServer" folder with and without "sudo" with the standard bash code:
I get lots of warnings, but also several error messages! There is no "ddserver" file created at the end and for that reason also the following command: "chmod +x ddserver" does not work.
Is there any help possible?!
Best Regards
See:
pi@acd:/package/DslrDashboardServer $ chmod +x ddserver
chmod: cannot access 'ddserver': No such file or directory
##############
Error messages:
src/communicator.cpp:16:27: error: 'LIBUSB_OPTION_LOG_LEVEL' was not declared in this scope
libusb_set_option(mCtx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO ); //set verbosity level to 3, as suggested in the documentation
^~~~~~~
src/communicator.cpp:16:74: error: 'libusb_set_option' was not declared in this scope
usb_set_option(mCtx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO ); //set verbosity level to 3, as suggested in the documentation
src/communicator.cpp:115:51: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
syslog(LOG_ERR, "Error reading packet : %ld", r);
^
src/communicator.cpp:120:60: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
syslog(LOG_ERR, "Error reading total packet size: %ld", r);
########
See complete output:
pi@acd:/package/DslrDashboardServer $ g++ -Wall src/main.cpp src/communicator.cpp pkg-config --libs --cflags libusb-1.0 -lpthread -lrt -lstdc++ -o ddserver
src/main.cpp: In function 'void startUdpListener()':
src/main.cpp:137:39: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
syslog(LOG_INFO, "recv: %ld", bytes);
^
src/main.cpp: In function 'void joinGroup(int, char*)':
src/main.cpp:280:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((groupStruct.sin_addr.s_addr = inet_addr(group)) == -1)
src/main.cpp: In function 'void leaveGroup(int, char*)':
src/main.cpp:302:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((groupStruct.sin_addr.s_addr = inet_addr(group)) == -1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/communicator.cpp:457:3: warning: "/*" within comment [-Wcomment]
/*
In file included from src/communicator.cpp:8:0:
src/communicator.h: In constructor 'Communicator::Communicator()':
src/communicator.h:64:24: warning: 'Communicator::mHandle' will be initialized after [-Wreorder]
libusb_device_handle *mHandle;
^~~~~~~
src/communicator.h:63:17: warning: 'libusb_device* Communicator::mDevice' [-Wreorder]
libusb_device *mDevice;
^~~~~~~
src/communicator.cpp:10:1: warning: when initialized here [-Wreorder]
Communicator::Communicator() : mSocket(0), mCtx(nullptr), //mIsInitialized(false), mIsUsbInitialized(false),
^~~~~~~~~~~~
src/communicator.cpp:16:27: error: 'LIBUSB_OPTION_LOG_LEVEL' was not declared in this scope
libusb_set_option(mCtx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO ); //set verbosity level to 3, as suggested in the documentation
^~~~~~~~~~~~~~~~~~~~~~~
src/communicator.cpp:16:74: error: 'libusb_set_option' was not declared in this scope
usb_set_option(mCtx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO ); //set verbosity level to 3, as suggested in the documentation
^
src/communicator.cpp: In member function 'bool Communicator::readFromClient()':
src/communicator.cpp:111:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (r == (packetSize - 4)) {
~~^~~~~~~~~~~~~~~~~~~
src/communicator.cpp:115:51: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
syslog(LOG_ERR, "Error reading packet : %ld", r);
^
src/communicator.cpp:120:60: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=]
syslog(LOG_ERR, "Error reading total packet size: %ld", r);
^
src/communicator.cpp: In member function 'bool Communicator::processUsbPacket(uint8_t*, int)':
src/communicator.cpp:280:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (writen != le32toh(header->packet_len))
^
src/communicator.cpp: In member function 'uint8_t* Communicator::readUsbPacket(int&, bool, unsigned int)':
src/communicator.cpp:353:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(packetSize1 == 0 || totalRead < packetSize1) {
~~~~~~~~~~^~~~~~~~~~~~~
src/communicator.cpp:367:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (packetSize1 > currentPacketSize - 4) {
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
src/communicator.cpp:383:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (currentPacketSize < 4 + packetSize1 + 128) {
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
src/communicator.cpp:390:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(packetSize2 == 0 || totalRead < packetSize2) {
~~~~~~~~~~^~~~~~~~~~~~~
src/communicator.cpp:348:27: warning: unused variable 'resume' [-Wunused-variable]
bool isResponse = false, resume = true;
^~~~~~
src/communicator.cpp: In member function 'void Communicator::sendUsbDeviceList(uint32_t)':
src/communicator.cpp:857:74: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'std::vector<ImagingUsbDevice>::size_type {aka unsigned int}' [-Wformat=]
syslog(LOG_INFO, "Imaging USB devices found: %lu", imgUsbDevices.size());
^
pi@acd:/package/DslrDashboardServer $ chmod +x ddserver
chmod: cannot access 'ddserver': No such file or directory
pi@acd:/package/DslrDashboardServer $
Hallo all together!
I installed an actual qDSLR on a Raspi 3 with Stretch and qDSLR is running and does function. Also LibUSB is installed without issues and ddserver Source package is cloned to the pi via "clone https:// properly, without issues too.
When running the compile command from out of the "DslrDashboardServer" folder with and without "sudo" with the standard bash code:
"g++ -Wall src/main.cpp src/communicator.cpp
pkg-config --libs --cflags libusb-1.0
-lpthread -lrt -lstdc++ -o ddserver"I get lots of warnings, but also several error messages! There is no "ddserver" file created at the end and for that reason also the following command: "chmod +x ddserver" does not work.
Is there any help possible?!
Best Regards
See:
pi@acd:/package/DslrDashboardServer $ chmod +x ddserver chmod: cannot access 'ddserver': No such file or directory
##############
Error messages:
src/communicator.cpp:16:27: error: 'LIBUSB_OPTION_LOG_LEVEL' was not declared in this scope libusb_set_option(mCtx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO ); //set verbosity level to 3, as suggested in the documentation ^
~~~~~~ src/communicator.cpp:16:74: error: 'libusb_set_option' was not declared in this scope usb_set_option(mCtx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO ); //set verbosity level to 3, as suggested in the documentationsrc/communicator.cpp:115:51: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=] syslog(LOG_ERR, "Error reading packet : %ld", r); ^ src/communicator.cpp:120:60: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=] syslog(LOG_ERR, "Error reading total packet size: %ld", r);
########
See complete output:
pi@acd:/package/DslrDashboardServer $ g++ -Wall src/main.cpp src/communicator.cpp
pkg-config --libs --cflags libusb-1.0
-lpthread -lrt -lstdc++ -o ddserver src/main.cpp: In function 'void startUdpListener()': src/main.cpp:137:39: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka int}' [-Wformat=] syslog(LOG_INFO, "recv: %ld", bytes); ^ src/main.cpp: In function 'void joinGroup(int, char*)': src/main.cpp:280:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((groupStruct.sin_addr.s_addr = inet_addr(group)) == -1)