You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, RSTA2!
I'm trying to add support for USB cameras to your code that use BULK transfer to transfer images. To do this, I added a new supported interface ("inte-2-0" - videostreaming interface) to the USBDeviceFactory.c file. In its configuration function, I first read the frame descriptors, which contain the height and width of the frame (descriptor class - 0x24, descriptor subclass (next byte) - 0x05 (uncompressed frame)), then I set the camera settings using the standard request to the camera.
First, I use the following pseudocode for negotiations:
DWHCIDeviceControlMessage (arg0, arg1 (endpoint0), 0x21, 1 (set_cur request), 0x100 (probe_control), 1, &buffer_with_parameters (table 4-47 in USB Video Class specification v.1.1), 34 (length_of_buffer));
DWHCIDeviceControlMessage (arg0, arg1 (endpoint0), 0xA1, 0x81 (get_cur request), 0x100 (probe_control), 1, &buffer_with_parameters (table 4-47 in USB Video Class specification v.1.1), 34 (length_of_buffer));
DWHCIDeviceControlMessage (arg0, arg1 (endpoint0), 0x21, 1 (set_cur request), 0x200 (commit_control), 1, &buffer_with_parameters (table 4-47 in USB Video Class specification v.1.1), 34 (length_of_buffer));
And then the problem arises, which is that I do not know how to start a BULK broadcast from the camera.
Can you tell me how to start broadcasting the image? I would appreciate your help.
Best regards
Lninio
The text was updated successfully, but these errors were encountered:
Thanks for the reply. I found a way to solve the problem. I used a USB bus sniffer from Linux called usbmon in order to analyze the correct initialization and exchange with the camera. Using the data from Linux as a hint, I managed to organize the data transfer from the camera.
Hello, RSTA2!
I'm trying to add support for USB cameras to your code that use BULK transfer to transfer images. To do this, I added a new supported interface ("inte-2-0" - videostreaming interface) to the USBDeviceFactory.c file. In its configuration function, I first read the frame descriptors, which contain the height and width of the frame (descriptor class - 0x24, descriptor subclass (next byte) - 0x05 (uncompressed frame)), then I set the camera settings using the standard request to the camera.
First, I use the following pseudocode for negotiations:
DWHCIDeviceControlMessage (arg0, arg1 (endpoint0), 0x21, 1 (set_cur request), 0x100 (probe_control), 1, &buffer_with_parameters (table 4-47 in USB Video Class specification v.1.1), 34 (length_of_buffer));
DWHCIDeviceControlMessage (arg0, arg1 (endpoint0), 0xA1, 0x81 (get_cur request), 0x100 (probe_control), 1, &buffer_with_parameters (table 4-47 in USB Video Class specification v.1.1), 34 (length_of_buffer));
DWHCIDeviceControlMessage (arg0, arg1 (endpoint0), 0x21, 1 (set_cur request), 0x200 (commit_control), 1, &buffer_with_parameters (table 4-47 in USB Video Class specification v.1.1), 34 (length_of_buffer));
And then the problem arises, which is that I do not know how to start a BULK broadcast from the camera.
Can you tell me how to start broadcasting the image? I would appreciate your help.
Best regards
Lninio
The text was updated successfully, but these errors were encountered: