scchn / CamPrefs

10 stars 2 forks source link

Need build instructions #3

Open bplein opened 3 years ago

bplein commented 3 years ago

Hi!

I'm not a developer but I do have Xcode and a developer's account and can compile applications.

How do I compile the Cam Prefs.app? I am building and running the testlibusb successfully, but am unsure how to create the prefs app.

Thanks in advance. Found this from your suggestion on the uvc-util GitHub.

bplein commented 3 years ago

Figured out how to successfully compile by using the "all" scheme and ensuring I cleaned up any inconsistent settings I had introduced when stumbling about :)

macOS Monterey 12.0 Beta (21A5284e)

Cam Prefs.app builds successfully, but cannot see my Razer Kiyo camera. image also seeing that libobjc.dylib is missing?

image

The following appears in the debug output:


2021-07-26 09:49:51.754291-0500 Cam Prefs[1370:12872] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002d76280> 30010C1C-93BF-11D8-8B5B-000A95AF9C6A```
bplein commented 3 years ago
./listdevs
1532:0e03 (bus 20, device 8) path: 5.1.1
2109:2817 (bus 20, device 7) path: 5.1
24f0:0141 (bus 20, device 6) path: 1.4
2109:0817 (bus 1, device 3) path: 2.1
2109:2817 (bus 20, device 5) path: 5
2109:2812 (bus 20, device 4) path: 1
174c:55aa (bus 0, device 1) path: 1
2109:0812 (bus 20, device 1) path: 15
1058:25fb (bus 20, device 2) path: 11
2109:0817 (bus 1, device 2) path: 2
04e8:61f5 (bus 1, device 1) path: 1

from System Information:

Razer Kiyo:

  Product ID:   0x0e03
  Vendor ID:    0x1532
  Version:  79.13
  Speed:    Up to 480 Mb/s
  Manufacturer: Alpha Imaging Tech. Corp.
  Location ID:  0x14511000 / 8
  Current Available (mA):   500
  Current Required (mA):    500
  Extra Operating Current (mA): 0
sudo ./xusb 1532:0e03
Password:
Using libusb v1.0.24.11584

Opening device 1532:0E03...

Reading device descriptor:
            length: 18
      device class: 239
               S/N: 0
           VID:PID: 1532:0E03
         bcdDevice: 7913
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading BOS descriptor: no descriptor

Reading first configuration descriptor:
             nb interfaces: 4
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 0E.01.00
       endpoint[0].address: 84
           max packet size: 0040
          polling interval: 08
              interface[1]: id = 1
interface[1].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 0E.02.00
interface[1].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 0E.02.00
       endpoint[0].address: 81
           max packet size: 13FC
          polling interval: 01
              interface[2]: id = 2
interface[2].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 01.01.00
              interface[3]: id = 3
interface[3].altsetting[0]: num endpoints = 0
   Class.SubClass.Protocol: 01.02.00
interface[3].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 01.02.00
       endpoint[0].address: 83
           max packet size: 00C4
          polling interval: 04

Claiming interface 0...
libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
   Failed.

Claiming interface 1...
libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
   Failed.

Claiming interface 2...
libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
   Failed.

Claiming interface 3...
libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
   Failed.

Reading string descriptors:
   String (0x01): "Alpha Imaging Tech. Corp."
   String (0x02): "Razer Kiyo"

Releasing interface 0...
Releasing interface 1...
Releasing interface 2...
Releasing interface 3...
Closing device...
scchn commented 3 years ago

Hi!

I haven't tested it on Monterey, not sure what the problem is. You can try my app on the Mac app store that provides the same functionality and more. It's free and stable. But still, I haven't tested it on Monterey.

https://apps.apple.com/app/xcap/id1569525013?mt=12

bplein commented 3 years ago

Cap can see the Razer Kiyo, but Cam Prefs cannot.

scchn commented 3 years ago

🤯 Still have no clue. I'll update my mac and see if there are any differences.

scchn commented 3 years ago

It seems that apple has blocked unprivileged apps from directly accessing USB devices. Just sent a request to apple for that.

Thanks!

i

zer0err commented 2 years ago

It seems that apple has blocked unprivileged apps from directly accessing USB devices. Just sent a request to apple for that.

Thanks!

i

Hi, thanks for your trying. I'm facing the same issue, is there any update about this, cause macOS 12 has released its official version and seems like this issue remains.

scchn commented 2 years ago

Try run your app as root or add the entitlement 'com.apple.vm.device-access'.

But the Apple tech support mentioned that the entitlement is for vm apps only. So, still no luck...

https://github.com/libusb/libusb/blob/1a906274a66dd58bf81836db1306902d4a7dc185/libusb/os/darwin_usb.c#L2442

zer0err commented 2 years ago

Try run your app as root or add the entitlement 'com.apple.vm.device-access'.

But the Apple tech support mentioned that the entitlement is for vm apps only. So, still no luck...

https://github.com/libusb/libusb/blob/1a906274a66dd58bf81836db1306902d4a7dc185/libusb/os/darwin_usb.c#L2442

Thanks. I tried ran as root, and added entitlement key as mentioned and values, still doesn't work. Any suggestion if I need to control and stream a camera based UVC on macOS12?