diwi / PS3Eye

Sony PS3Eye Java/Processing Library.
MIT License
18 stars 9 forks source link

OSX 10.14 >> changed vendor and product IDs #4

Open LFSaw opened 5 years ago

LFSaw commented 5 years ago

Hey there,

out of whatever reason, the product and vendor IDs of my PS3EYE changed when updating to OSX 10.14 (Mojave), leading to PS3Eye not detecting the camera.

quick fix (in PS3Eye.java):

  // static final public short VENDOR_ID  = 0x1415;
  // static final public short PRODUCT_ID = 0x2000;
  static final public short VENDOR_ID  = 5141;
  static final public short PRODUCT_ID = 8192;

How I got there:

find external USB cam with

ioreg -p IOUSB -l -w 0

and extract information on idProduct resp. idVendor from its return. This is what I got for the camera:

$ ioreg -p IOUSB -l -w 0
[...]
+-o USB Camera-B4.09.24.1@14300000  <class AppleUSBDevice, id 0x100000d1c, registered, matched, active, busy 0 (12 ms), retain 18>
        {
          "sessionID" = 1712473030119
          "iManufacturer" = 1
          "bNumConfigurations" = 1
          "idProduct" = 8192
          "bcdDevice" = 512
          "Bus Power Available" = 250
          "USB Address" = 24
          "bMaxPacketSize0" = 64
          "iProduct" = 2
          "iSerialNumber" = 0
          "bDeviceClass" = 0
          "Built-In" = No
          "locationID" = 338690048
          "bDeviceSubClass" = 0
          "bcdUSB" = 512
          "USB Product Name" = "USB Camera-B4.09.24.1"
          "PortNum" = 3
          "non-removable" = "no"
          "IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
          "bDeviceProtocol" = 0
          "IOUserClientClass" = "IOUSBDeviceUserClientV2"
          "IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
          "kUSBCurrentConfiguration" = 1
          "Device Speed" = 2
          "USB Vendor Name" = "OmniVision Technologies, Inc."
          "idVendor" = 5141
          "IOGeneralInterest" = "IOCommand is not serializable"
          "IOClassNameOverride" = "IOUSBDevice"
        }

this works like a charm.

LFSaw commented 5 years ago

so... embarrassingly,

(0x1415 == 5141) && (0x2000 == 8192)

however, after touching (and again reverting) the code, everything "just works". I even did a full restart before without success... really strange.