USB (libusb) crash

Post Reply
mbonamusa
Posts: 189
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3, XU4, C1, C2
Contact:

USB (libusb) crash

Unread post by mbonamusa » Fri Jan 04, 2019 8:52 am

I'm using a custom usb 2.0 camera working with libusb 1.0 api. The same program works fine on X2, U3, XU4, C1+ and with C2 with old kernel (3.14.65-73). But with the latest C2 images the capture program crashes after a few minutes.

Using my program and camera api compiled with the libusb from source code, the error looks like:
Crash Error: signal 11
./capture3D(_Z7handleri+0x6c) [0x41a3ec]
[0x7f939d5510]
/lib/libst04a.so(usbi_handle_transfer_completion+0x5c) [0x7f9324314c]
(libst04a.so is my camera api using libusb api)

I've also tested the program and camera api compiled using the libusb-1.0-0-dev ubuntu package and the problem is already there:
Crash Error: signal 11
./capture3D(_Z7handleri+0x6c) [0x41a3ec]
[0x7f965ed510]
/lib/aarch64-linux-gnu/libusb-1.0.so.0(+0x82e4) [0x7f93c272e4]

I've tested all the latest c2 images and program crashes in all of them (V2.x, V3.0 and minimal images based on ubuntu 18.04 and ubuntu 16.04).

In both situations, in dmesg and syslog every few seconds or minutes appear different usb warning messages. In older C2 images ( kernel 3.14.65-73) these messages also appear but the program works fine and it does not crash:
[25124.540234] ERROR::update_urb_state_xfer_comp:619: actual = 1024, len = 768, transfer error = -75
...
[25141.321813] usb 1-1.3: usbfs: usb_submit_urb returned -121
...
[25143.442203] WARN::urb_dequeue:780: urb->hcpriv == NULL! urb = ffffffc0596a0700 status=-104

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: USB (libusb) crash

Unread post by odroid » Fri Jan 04, 2019 11:26 am

Try to change "usbmulticam" option in your boot.ini file.
https://github.com/mdrjr/c2_bootini/blo ... #L124-L126

mbonamusa
Posts: 189
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3, XU4, C1, C2
Contact:

Re: USB (libusb) crash

Unread post by mbonamusa » Fri Jan 04, 2019 5:44 pm

I've configured setenv usbmulticam "true" but the problem persists.

I have mesontimer "0" because I need mysql and I don't know if it can affect USB.

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: USB (libusb) crash

Unread post by odroid » Fri Jan 04, 2019 6:10 pm

Since we don't have the same camera, it is really hard to know what's wrong with Kernel 3.16.
Is there any way to change the firmware in your camera to have the UVC protocol?

mbonamusa
Posts: 189
Joined: Mon Feb 25, 2013 9:08 pm
languages_spoken: catalan, spanish, english
ODROIDs: ODROID-X2, U2, U3, XU4, C1, C2
Contact:

Re: USB (libusb) crash

Unread post by mbonamusa » Fri Jan 04, 2019 6:49 pm

We are not able to convert camnera to UVC device. Our camera uses a Cypress FX2 usb IC and it can't support UVC with its own firmware. This USB IC needs an extra hardware (FPGA) to add UVC headers to usb stream.

I'm going to perform more tests and let you know the results.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 2 guests