Hello, when I compile I get the following warnings:
root@wlankuchen:/home/pi/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)
^
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(NULL), //mIsInitialized(false), mIsUsbInitialized(false),
^
src/communicator.cpp: In member function ‘bool Communicator::readFromClient()’:
src/communicator.cpp:110:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (r == (packetSize - 4)) {
^
src/communicator.cpp:114: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:119: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:264:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (writen != le32toh(header->packet_len))
^
src/communicator.cpp: In member function ‘void Communicator::sendUsbDeviceList(uint32_t)’:
src/communicator.cpp:662: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());
^
I plug in my camera, start ddserver, try to connect to it and get the following messages in syslog, and it wont open any camera:
Oct 22 18:49:42 wlankuchen ddserver: recv: 57
Oct 22 18:49:42 wlankuchen ddserver: Client multicast query DslrDashboardClient{1640b7a3-2b62-4264-8ad8-3f660434da90}
Oct 22 18:49:42 wlankuchen ddserver: Server message length: 57 msg: DslrDashboardServer{1640b7a3-2b62-4264-8ad8-3f660434da90}
Oct 22 18:49:42 wlankuchen ddserver: Incoming client connection
Oct 22 18:49:42 wlankuchen ddserver: Awaiting client connection
Oct 22 18:49:42 wlankuchen ddserver: USB Devices in
Oct 22 18:49:42 wlankuchen ddserver: Number of possible configurations: 1 Device Class: 0 VendorID: 3034, ProductID: 33145
Oct 22 18:49:42 wlankuchen ddserver: Number of alternate settings:
Oct 22 18:49:42 wlankuchen ddserver: Interface class: 255 Interface number: 0 Number of endpoints: 3
Oct 22 18:49:42 wlankuchen ddserver: Number of possible configurations: 1 Device Class: 0 VendorID: 1200, ProductID: 1068
Oct 22 18:49:42 wlankuchen ddserver: Number of alternate settings:
Oct 22 18:49:42 wlankuchen ddserver: Interface class: 6 Interface number: 0 Number of endpoints: 3
Oct 22 18:49:42 wlankuchen ddserver: Found USB imaging device, get vendor and product
Oct 22 18:49:42 wlankuchen ddserver: Number of possible configurations: 1 Device Class: 255 VendorID: 1060, ProductID: 60416
Oct 22 18:49:42 wlankuchen ddserver: Number of alternate settings:
Oct 22 18:49:42 wlankuchen ddserver: Interface class: 255 Interface number: 0 Number of endpoints: 3
Oct 22 18:49:42 wlankuchen ddserver: Number of possible configurations: 1 Device Class: 9 VendorID: 1060, ProductID: 38164
Oct 22 18:49:43 wlankuchen ddserver: Number of alternate settings:
Oct 22 18:49:43 wlankuchen ddserver: Interface class: 9 Interface number: 0 Number of endpoints: 1
Oct 22 18:49:43 wlankuchen ddserver: Interface class: 9 Interface number: 0 Number of endpoints: 1
Oct 22 18:49:43 wlankuchen ddserver: Number of possible configurations: 1 Device Class: 9 VendorID: 7531, ProductID: 2
Oct 22 18:49:43 wlankuchen ddserver: Number of alternate settings:
Oct 22 18:49:43 wlankuchen ddserver: Interface class: 9 Interface number: 0 Number of endpoints: 1
Oct 22 18:49:43 wlankuchen ddserver: Imaging USB devices found: 0
Oct 22 18:49:43 wlankuchen ddserver: Error reading total packet size: 0
Oct 22 18:49:43 wlankuchen ddserver: Stoping client
Oct 22 18:49:44 wlankuchen ddserver: Closing USB device
Help? Is the code maybe outdated and wont work with this version of libusb? I dont know.
Hello, when I compile I get the following warnings:
I plug in my camera, start ddserver, try to connect to it and get the following messages in syslog, and it wont open any camera:
Help? Is the code maybe outdated and wont work with this version of libusb? I dont know.