Re: Libusb-win32 code to control Ricoh Theta

Kevin Cain <[email protected]>
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CACnUKRuDkd-DKuMvKMBmQVVaW=UmtJ0hBcWmVN+KSj4O0PGKOg@mail.gmail.com>
Thank you for your suggestions, Ekkehard,

The 'memset(buffer, 0, 64)' command I send should fill the buffer with '0'
values, unless I'm making a fundamental error.  I will try your variants.
 Your suggestion that the camera may require a trailing '0' is interesting
-- I will try that as well, is there any reference to support that?

I suspect my problem is in correctly deducing the parameters required to
send messages to the Theta via libusb, e.g.:

*int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, int
value, int index, char *bytes, int size, int timeout);*

I used USBTrace to detect the Ricoh-provided driver and uploaded the
results here:
www.insightdigital.org/Ricoh_Theta_Device_Log_USBTrace.html

However, I don't yet see how to find the request details for the camera in
question.  I assume this comes up each time a programmer wishes to control
a new device with libusb -- are there any resources that might help me?

Any help divining the correct syntax and message protocol parameters would
be wonderful.

Thanks,

-Kevin


On Sun, Jul 20, 2014 at 3:25 AM, Ekkehard <[email protected]>
wrote:

> Hi,
> I have'nt done anything with the camara matter. From the programmers view,
> there is one thing I dont understand.
> The used bytes the buffer are only  15 = "trigger-capture", but you are
> sending 64 bytes. If the command detection algo in the camera validating
> the
> length of the buffer first, than the command will not be recognised.
> So maybe you can try
> int result = usb_control_msg(devHandle, 0x21, 9, 0x2, 0x0, (char*)buffer,
> 15, 100); if (result == 15) cout << "Successfully sent all bytes to camera"
> << endl;
> or, if the camera may expect one zero at the end of the command
> int result = usb_control_msg(devHandle, 0x21, 9, 0x2, 0x0, (char*)buffer,
> 16, 100); if (result == 16) cout << "Successfully sent all bytes to camera"
> << endl;
>
> A minor thing, as far as I know there is no need to claim the interface
> since the control mesaages are not related to any interface.
>
> Best regards
> Ekkehard
>
>
>
>
> --
> View this message in context:
> http://libusb.6.n5.nabble.com/Libusb-win32-code-to-control-Ricoh-Theta-tp5713450p5713451.html
> Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Libusb-win32-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds

_______________________________________________
Libusb-win32-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.