fpv-wtf / voc-poc

A PoC for USB video out from the DJI FPV Goggles, inspired by The Video Out Club
MIT License
431 stars 80 forks source link

Goggles device opens, but has no interfaces? (linux) #18

Open petertorelli opened 2 years ago

petertorelli commented 2 years ago

The goggles are found and open, but the interface list is empty:

goggles.open()
if(!goggles.interfaces) {
    console.error("Couldn't open Goggles USB device")
    process.exit(1)
}
console.log(goggles)
console.log(goggles.interfaces)

Results in:

$ node index.js 
Device {
  busNumber: 3,
  deviceAddress: 6,
  deviceDescriptor: {
    bLength: 18,
    bDescriptorType: 1,
    bcdUSB: 528,
    bDeviceClass: 0,
    bDeviceSubClass: 0,
    bDeviceProtocol: 0,
    bMaxPacketSize0: 64,
    idVendor: 11427,
    idProduct: 31,
    bcdDevice: 1033,
    iManufacturer: 1,
    iProduct: 2,
    iSerialNumber: 3,
    bNumConfigurations: 1
  },
  portNumbers: [ 6 ]
}
[]

Here is my udev rule:

$ cat /etc/udev/rules.d/99-dji.rules 
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2ca3", ATTRS{idProduct}=="001f", MODE="0666", GROUP="plugdev"

and dmesg output:

[51369.855069] usb 3-6: new high-speed USB device number 6 using xhci_hcd
[51372.071157] usb 3-6: device descriptor read/64, error -71
[51372.330603] usb 3-6: New USB device found, idVendor=2ca3, idProduct=001f, bcdDevice= 4.09
[51372.330614] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[51372.330617] usb 3-6: Product: pigeon
[51372.330621] usb 3-6: Manufacturer: DJI
[51372.330623] usb 3-6: SerialNumber: 987654321ABCDEF
[51377.575919] usb 3-6: can't set config #1, error -110

Advice?

FYI: I got this to work on Win10 (works fine) and MacOS (sluggish, even with lots of polling, still working on the issue).