dji-sdk / Manifold-Cam

The project realizes to get the video data from X3 camera on M100.
34 stars 25 forks source link

Usb Write Error #15

Open enricotoi opened 7 years ago

enricotoi commented 7 years ago

We have our M-100 set up with the manifold and guidance with newest firmwares. And we set-up a simple script to launch the manifold-cam test file to feed the DJI Go app with the Z3 camera feed when the drone is on and manifold gets turned on, but after a varying length of time (from seconds to a minute or two) there is a problem.

The camera feed on the DJI Go app goes gray/inactive and won't update anymore, even though when checked on the manifold itself (with the -d) it is still working fine and live, but just won't transfer the feed further. And pretty much the only thing we can get out of the logs is:

usb write err -1, 11366
rrret -1
usb write err -1, 11367
rrret -1
usb write err -1, 11368
rrret -1
usb write err -1, 11369
rrret -1
usb write err -1, 11370
rrret -1
usb write err -1, 11371
rrret -1

the problem shouldn't be about user rights as the manifold_cam/test is being run as root

Some help with this would be appreciated.

lanyusea commented 7 years ago

did you run through SSH?

enricotoi commented 7 years ago

Both with and without SSH, first noticed it after just quick testing it at the office to see that the executable works and the feed works, then went out to fly the drone and after a second or two noticed that the cam feed died, landed the drone restarted the manifold and same thing happened. Then we tested it at the office with the launch script, manually starting it on the manifold and over SSH, but everything lead to that error sooner or later. If we were lucky it took minutes and if unlucky it just took a couple seconds.

adalava commented 7 years ago

I have the same issue here, and I'm trying to explain this to DJI support since 7 Oct. In addition, I also see this in kernel logs, on an endless loop:

Oct 5 14:17:17 tegra-ubuntu kernel: [ 4936.237591] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:17 tegra-ubuntu kernel: [ 4936.237594] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:20 tegra-ubuntu kernel: [ 4938.852079] usb 1-2.2: USB disconnect, device number 25 Oct 5 14:17:20 tegra-ubuntu kernel: [ 4939.139292] usb 1-2.2: new high-speed USB device number 26 using tegra-xhci Oct 5 14:17:20 tegra-ubuntu kernel: [ 4939.237570] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:20 tegra-ubuntu kernel: [ 4939.237578] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 5 14:17:20 tegra-ubuntu kernel: [ 4939.237583] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:20 tegra-ubuntu kernel: [ 4939.237587] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:23 tegra-ubuntu kernel: [ 4941.668068] usb 1-2.2: USB disconnect, device number 26 Oct 5 14:17:23 tegra-ubuntu kernel: [ 4942.346222] usb 1-2.2: new high-speed USB device number 27 using tegra-xhci Oct 5 14:17:23 tegra-ubuntu kernel: [ 4942.357590] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:23 tegra-ubuntu kernel: [ 4942.357596] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 5 14:17:23 tegra-ubuntu kernel: [ 4942.357601] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:23 tegra-ubuntu kernel: [ 4942.357604] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:26 tegra-ubuntu kernel: [ 4944.740071] usb 1-2.2: USB disconnect, device number 27 Oct 5 14:17:26 tegra-ubuntu kernel: [ 4945.162168] usb 1-2.2: new high-speed USB device number 28 using tegra-xhci Oct 5 14:17:26 tegra-ubuntu kernel: [ 4945.237457] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:26 tegra-ubuntu kernel: [ 4945.237465] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 5 14:17:26 tegra-ubuntu kernel: [ 4945.237469] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:26 tegra-ubuntu kernel: [ 4945.237473] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:29 tegra-ubuntu kernel: [ 4947.812071] usb 1-2.2: USB disconnect, device number 28 Oct 5 14:17:29 tegra-ubuntu kernel: [ 4948.234124] usb 1-2.2: new high-speed USB device number 29 using tegra-xhci Oct 5 14:17:29 tegra-ubuntu kernel: [ 4948.245652] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:29 tegra-ubuntu kernel: [ 4948.245659] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 5 14:17:29 tegra-ubuntu kernel: [ 4948.245663] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:29 tegra-ubuntu kernel: [ 4948.245667] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:32 tegra-ubuntu kernel: [ 4950.884084] usb 1-2.2: USB disconnect, device number 29 Oct 5 14:17:32 tegra-ubuntu kernel: [ 4951.151020] usb 1-2.2: new high-speed USB device number 30 using tegra-xhci Oct 5 14:17:32 tegra-ubuntu kernel: [ 4951.236206] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:32 tegra-ubuntu kernel: [ 4951.236214] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 5 14:17:32 tegra-ubuntu kernel: [ 4951.236218] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:32 tegra-ubuntu kernel: [ 4951.236221] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:35 tegra-ubuntu kernel: [ 4953.713221] usb 1-2.2: USB disconnect, device number 30 Oct 5 14:17:35 tegra-ubuntu kernel: [ 4954.395415] usb 1-2.2: new high-speed USB device number 31 using tegra-xhci Oct 5 14:17:35 tegra-ubuntu kernel: [ 4954.414272] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:35 tegra-ubuntu kernel: [ 4954.414298] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 5 14:17:35 tegra-ubuntu kernel: [ 4954.414307] usb 1-2.2: Product: EZ-USB FX2 Oct 5 14:17:35 tegra-ubuntu kernel: [ 4954.414316] usb 1-2.2: Manufacturer: enc V1.1.2.0 Oct 5 14:17:38 tegra-ubuntu kernel: [ 4956.772184] usb 1-2.2: USB disconnect, device number 31 Oct 5 14:17:38 tegra-ubuntu kernel: [ 4957.219556] usb 1-2.2: new high-speed USB device number 32 using tegra-xhci Oct 5 14:17:38 tegra-ubuntu kernel: [ 4957.260344] usb 1-2.2: New USB device found, idVendor=0547, idProduct=1002 Oct 5 14:17:38 tegra-ubuntu kernel: [ 4957.260582] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0

This is seen sometimes too, on an endless loop:

usb 1-2.2: usbfs: process 6671 (test) did not claim interface 0 before use usb 1-2.2: usbfs: process 6671 (test) did not claim interface 0 before use usb 1-2.2: usbfs: process 6671 (test) did not claim interface 0 before use usb 1-2.2: usbfs: process 6671 (test) did not claim interface 0 before use

I did everything support recommended: replaced Manifold unit, cables, reinstalled system image, replaced the smartphone. With the camera connected directly to N1 stream works fine, always. A software running on Manifold can also see camera frames without problem most of times, but sometimes it gets stuck and the following error message is also seen on an endless loop:

usbRead_loop:usb_gadget_endpoint_read:: Invalid argument usbRead_loop:usb_gadget_endpoint_read, get = -1 usbRead_loop:usb_gadget_endpoint_read:: Invalid argument usbRead_loop:usb_gadget_endpoint_read, get = -1

The problem seems to be between Manifold and N1. I don't have access to the .so source code, so I can't debug futher, need DJI developers help.

Please let me know if you need more info to help investigating the issue.