-
-
Notifications
You must be signed in to change notification settings - Fork 299
-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IR Emitters not turning on on Lenovo S740 #269
Comments
I'm having similar issues with my Lenovo T490s. I also have 4 cameras and Could you check your output of
|
Yep is the same
|
I found this in the Windows 10 SDK documentation: https://docs.microsoft.com/en-us/windows-hardware/drivers/stream/uvc-extensions-1-5#22211-ir-torch-control
I also stumbled over this: https://linuxtv.org/downloads/v4l-dvb-apis/v4l-drivers/uvcvideo.html |
After adding some debug prints to the uvcvideo kernel driver, I managed to figure out that the extension unit supports MSXU_CONTROL_EXPOSURE, MSXU_CONTROL_FACE_AUTHENTICATION, and MSXU_CONTROL_METADATA. The second one sounded promising. The code below sends a UVCIOC_CTRL_QUERY ioctl to
|
Nice findings. I don't have any experience on this low level c code so I can't help you develop but if you need someone to test I can surely do that on my device with some instructions on how to do it |
I think I found the right call. In the wireshark USB dump I found URB_CONTROL messages transmitting only 2 bytes of data:
The index tells us this corresponds to unit I don't know what the first byte of the data does. The second byte seems to control the brightness of the IR emitter. It's maxing out at 0x19 already. I've found another call with data = The following C code would turn on the emitter:
I've put a small tool written in C to toggle these values on https://github.com/PetePriority/chicony-ir-toggle. The repo also includes a python script that does the same. The IR emitter should turn on as soon as you start streaming video from the device. The emitter turns off for some reason as soon as the image turns too dark. Then it's necessary to reopen the device again. @DavidM42 could you test if this works for you? |
@PetePriority Wow very nice. That worked for me to enable the IR emitter. I used the gcc command to build it. Still have to work out adding a new face model now |
Try adjusting the |
Wow thanks! |
I'm in similar shoes with Lenovo Yoga X390 but in my case the device is: Assuming the only option is to "Wireshark" the communication with working Windows solution, could someone guide me to do it? Sorry for beginners question but actually never used it before. Do you work with Wireshark on the Windows Host, or Linux host (here Ubuntu) and Windows Guest on VirtualBox and USB redirects? If the second one, let me know, please if you use Wireshark on the Host side or Guest one? Thanks in advance, P. |
@pczekalski Could you post the output of I used wireshark on the Windows Host. It should also be possible to use it on a linux host with usb redirects to a VM. I recommend having a look at some guides/tutorials/videos on how to do it. |
Click to show lsusb output
|
@pczekalski Judging from the output your device seems to offer the same extension units as our cameras. Have you tried the workaround proposed in #269 (comment)? |
I have the same issue on X1 Extreme. Click to show lsusb output
However when I run: |
Interesting, i think integrating your code @PetePriority could help quite a few users that have been reporting very dark IR images without the blasters firing. (I've moved some |
I can confirm the code by @PetePriority working to turn on the flashers on Lenovo X395. |
L590 user here. ID 04f2:b681 Chicony Electronics Co., Ltd Integrated Camera lsusb -d 04f2:b681 -vDo 12 Dez 2019 11:39:53 CET Bus 001 Device 004: ID 04f2:b681 Chicony Electronics Co., Ltd Integrated Camera The patch from @PetePriority worked like a charm. IR Blaster is firing now. |
Lenovo X1 Extreme Gen2 04f2:b67c Chicony Electronics Co., Ltd Integrated Camera lsusb -d 04f2:b67c -vBus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd Integrated Camera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb67c bcdDevice 67.26 iManufacturer 3 Chicony Electronics Co.,Ltd. iProduct 1 Integrated Camera iSerial 2 6726 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x04cb bNumInterfaces 4 bConfigurationValue 1 iConfiguration 4 USB Camera bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 5 Integrated Camera Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 1 iInterface 5 Integrated Camera VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.50 wTotalLength 0x006d dwClockFrequency 15.000000MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x0020000e Auto-Exposure Mode Auto-Exposure Priority Exposure Time (Absolute) Region of Interest VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) bUnitID 2 bSourceID 1 wMaxMultiplier 0 bControlSize 3 bmControls 0x0000157f Brightness Contrast Hue Saturation Sharpness Gamma White Balance Temperature Backlight Compensation Power Line Frequency White Balance Temperature, Auto iProcessing 0 bmVideoStandards 0x00 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 6 iTerminal 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 4 guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938} bNumControl 2 bNrPins 1 baSourceID( 0) 2 bControlSize 2 bmControls( 0) 0x00 bmControls( 1) 0x16 iExtension 0 VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 6 guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e} bNumControl 6 bNrPins 1 baSourceID( 0) 4 bControlSize 4 bmControls( 0) 0x05 bmControls( 1) 0x90 bmControls( 2) 0x0c bmControls( 3) 0x00 iExtension 9 Realtek Extended Controls Unit Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 6 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 VideoStreaming Interface Descriptor: bLength 15 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 2 wTotalLength 0x025d bEndPointAddress 129 bmInfo 0 bTerminalLink 3 bStillCaptureMethod 1 bTriggerSupport 1 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 0 bmaControls( 1) 0 VideoStreaming Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 6 (FORMAT_MJPEG) bFormatIndex 1 bNumFrameDescriptors 9 bFlags 1 Fixed-size samples: Yes bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 1 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 442368000 dwMaxBitRate 442368000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 180 dwMinBitRate 27648000 dwMaxBitRate 27648000 dwMaxVideoFrameBufferSize 115200 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 240 dwMinBitRate 36864000 dwMaxBitRate 36864000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 352 wHeight 288 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 424 wHeight 240 dwMinBitRate 48844800 dwMaxBitRate 48844800 dwMaxVideoFrameBufferSize 203520 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 110592000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 147456000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 8 bmCapabilities 0x01 Still image supported wWidth 848 wHeight 480 dwMinBitRate 195379200 dwMaxBitRate 195379200 dwMaxVideoFrameBufferSize 814080 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 7 (FRAME_MJPEG) bFrameIndex 9 bmCapabilities 0x01 Still image supported wWidth 960 wHeight 540 dwMinBitRate 248832000 dwMaxBitRate 248832000 dwMaxVideoFrameBufferSize 1036800 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 2 bNumFrameDescriptors 9 guidFormat {32595559-0000-0010-8000-00aa00389b71} bBitsPerPixel 16 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 1280 wHeight 720 dwMinBitRate 147456000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 1843200 dwDefaultFrameInterval 1000000 bFrameIntervalType 1 dwFrameInterval( 0) 1000000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 180 dwMinBitRate 27648000 dwMaxBitRate 27648000 dwMaxVideoFrameBufferSize 115200 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 3 bmCapabilities 0x01 Still image supported wWidth 320 wHeight 240 dwMinBitRate 36864000 dwMaxBitRate 36864000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 4 bmCapabilities 0x01 Still image supported wWidth 352 wHeight 288 dwMinBitRate 48660480 dwMaxBitRate 48660480 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 5 bmCapabilities 0x01 Still image supported wWidth 424 wHeight 240 dwMinBitRate 48844800 dwMaxBitRate 48844800 dwMaxVideoFrameBufferSize 203520 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 6 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 110592000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 460800 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 7 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 480 dwMinBitRate 147456000 dwMaxBitRate 147456000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 8 bmCapabilities 0x01 Still image supported wWidth 848 wHeight 480 dwMinBitRate 130252800 dwMaxBitRate 130252800 dwMaxVideoFrameBufferSize 814080 dwDefaultFrameInterval 500000 bFrameIntervalType 1 dwFrameInterval( 0) 500000 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 9 bmCapabilities 0x01 Still image supported wWidth 960 wHeight 540 dwMinBitRate 124416000 dwMaxBitRate 124416000 dwMaxVideoFrameBufferSize 1036800 dwDefaultFrameInterval 666666 bFrameIntervalType 1 dwFrameInterval( 0) 666666 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0c00 2x 1024 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x1300 3x 768 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x1350 3x 848 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x1395 3x 917 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 5 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13fc 3x 1020 bytes bInterval 1 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 7 Integrated IR Camera Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 1 iInterface 7 Integrated IR Camera VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.50 wTotalLength 0x00a1 dwClockFrequency 15.000000MHz bInCollection 1 baInterfaceNr( 0) 3 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 8 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x00200000 Region of Interest VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) bUnitID 15 bSourceID 8 wMaxMultiplier 0 bControlSize 3 bmControls 0x00000000 iProcessing 0 bmVideoStandards 0x00 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 12 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 14 iTerminal 0 VideoControl Interface Descriptor: bLength 25 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 11 guidExtensionCode {45b5da73-23c1-4a3d-a368-610f078c4397} bNumControl 0 bNrPins 1 baSourceID( 0) 15 bControlSize 0 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 9 guidExtensionCode {1229a78c-47b4-4094-b0ce-db07386fb938} bNumControl 2 bNrPins 1 baSourceID( 0) 11 bControlSize 2 bmControls( 0) 0x00 bmControls( 1) 0x06 iExtension 0 VideoControl Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 10 guidExtensionCode {0f3f95dc-2632-4c4e-92c9-a04782f43bc8} bNumControl 9 bNrPins 1 baSourceID( 0) 9 bControlSize 2 bmControls( 0) 0x22 bmControls( 1) 0x01 iExtension 8 Microsoft Extended Controls Unit VideoControl Interface Descriptor: bLength 29 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 14 guidExtensionCode {26b8105a-0713-4870-979d-da79444bb68e} bNumControl 3 bNrPins 1 baSourceID( 0) 10 bControlSize 4 bmControls( 0) 0x00 bmControls( 1) 0xe0 bmControls( 2) 0x00 bmControls( 3) 0x00 iExtension 10 Realtek Extended Controls Unit Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 6 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 VideoStreaming Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 1 wTotalLength 0x006b bEndPointAddress 130 bmInfo 0 bTerminalLink 12 bStillCaptureMethod 1 bTriggerSupport 1 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 0 VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 1 bNumFrameDescriptors 2 guidFormat {00000032-0002-0010-8000-00aa00389b71} bBitsPerPixel 8 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 55296000 dwMaxBitRate 55296000 dwMaxVideoFrameBufferSize 230400 dwDefaultFrameInterval 666666 bFrameIntervalType 1 dwFrameInterval( 0) 666666 VideoStreaming Interface Descriptor: bLength 30 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x01 Still image supported wWidth 640 wHeight 360 dwMinBitRate 110592000 dwMaxBitRate 110592000 dwMaxVideoFrameBufferSize 230400 dwDefaultFrameInterval 333333 bFrameIntervalType 1 dwFrameInterval( 0) 333333 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0080 1x 128 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0100 1x 256 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0300 1x 768 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 5 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 1 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x03fc 1x 1020 bytes bInterval 1 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 0x0029 bNumDeviceCaps 2 Platform Device Capability: bLength 28 bDescriptorType 16 bDevCapabilityType 5 bReserved 0 PlatformCapabilityUUID {d8dd60df-4589-4cc7-9cd2-659d9e648a9f} CapabilityData[0] 0x00 CapabilityData[1] 0x00 CapabilityData[2] 0x03 CapabilityData[3] 0x06 CapabilityData[4] 0x64 CapabilityData[5] 0x03 CapabilityData[6] 0x15 CapabilityData[7] 0x00 ** UNRECOGNIZED: 08 10 11 01 03 00 00 00 can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0000 (Bus Powered) |
@PetePriority patch did not work on the ThinkPad TP25 (25th anniversary edition), Ubuntu 18.04, which appears to also use the Chicony camera. Building/installing patch and running 'chicony-ir-toggle on' as described on its project page results in
Is the TP25 using a different variation of the camera or am I missing a dependency? Make/build process went off without errors, only encountered at runtime. Without blasters firing, the attached screenshot is my result. In brighter light, you can make out a silhouette, but that's it. |
@dsneath Please review |
Confirmed using the toggle code with a T490, as well. |
Sorry for the question, seems like the patch fixed the issue and makes my IR works, but how can I integrate the patch with Howdy? |
Maybe I |
@JoaoVictorDaijo You're not crazy, I experienced that on the first reboot into Windows after running the fix as well. Mine kicked in after another reboot, though -- didn't resort to a backup. |
Well I managed to fix my issue, I went back to the forums and remembered that I have the option to say if my IR camera was working or not, so I removed Howdy installed again and cycled until it found my IR device. Now looks like its working. I also had to edit Howdy's dark threshold to 92 for it to work fine. |
I was having the same issue and managed to get the IR blaster to turn on with @PetePriority 's solution, however I noticed something interesting. I'm running a Manjaro 19.0.1/Windows 10 dual boot on a Razer Blade 15 (Mid 2019), and I was originally able to set up howdy with no issues. The IR blaster blinked until it found my face and unlocked flawlessly. My issue didn't start until I booted into Windows. I didn't have Windows Hello enabled at the time, however after messing with howdy I decided to set it up. Windows Hello worked great, and it seemed like I had no issues until booting back into Manjaro; the IR blaster stopped working all together.
Again this is mostly food for thought, but I figured I'd share. Edit: I tried to add my face to howdy after turning on the IR blaster, but even at an absurd |
I confirm that @PetePriority hack works on Thinkpad T495S with |
Hi, Here is the output of Here are the captured packets on windows The packet which I believe enables the IR emitters has the following payload
Any ideas? |
Just to update. I was able to enable the IR emitters, however they do not blink. They just stay on most of the time. Does howdy use the TOF principle to create a depth image or the IR emitter is used only to illuminate the face? |
How did you manage to turn them on? |
Added an issue as PetePriority/chicony-ir-toggle#11 to confirm that my Razer Blade 15" Advanced 2019 is now usable with Howdy. No changes required. However, the IR lamp isn't as bright as under Windows and I need to be much closer for it to produce usable images. You can see that the lamp is only a relatively small red dot, compared to under Windows. |
Hi Hnagzhi, |
Thank you for your answer! So when I run chicony-ir-toggle, it just says |
Do you have /dev/video0 up to /dev/video3? Use lsusb to find out which one
is the IR camera
…On Sat, Aug 15, 2020, 17:50 Hangzhi ***@***.***> wrote:
Just to update. I was able to enable the IR emitters, however they do not
blink. They just stay on most of the time. Does howdy use the TOF principle
to create a depth image or the IR emitter is used only to illuminate the
face?
How did you manage to turn them on?
Hi Hnagzhi,
I just used this <https://github.com/PetePriority/chicony-ir-toggle> code
as-is from @PetePriority <https://github.com/PetePriority> on
/dev/video2. Then, just configure howdy to source video from /dev/video2
instead of /dev/video0. This way the IR emitter will turn on, but it won´t
blink as windows hello.
Thank you for your answer! So when I run chicony-ir-toggle, it just says Error
code: -1, errno: 2, error: No such file or directory... Meanwhile, I
noticed that my device does not use exactly the same webcam model, but a
slightly different one with the ID 13d3:56fb
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#269 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMIBSCBPFTNQGNFNBDYV7TSA3YJ5ANCNFSM4JEFJKTQ>
.
|
Yes. I know that video2 is the IR cam. |
Great job @PetePriority ! Works even for Without changing unit, I get |
When I run |
https://github.com/EmixamPP/linux-enable-ir-emitter |
I tried your method but couldn't get it to work. My data from VM is below:
So I changed the c file:
When running the compiled code, I always got error:
I also tried swap unit and selector, but still got the same error. Any suggestion? |
@bobzhu418 0x14 is in hex base. So you must write either 0x14 (hex) or 20 (decimal). I will update the tutorial to make it clearer. |
@EmixamPP Thanks for your quick reply. I changed it but still got the same error. Is my Data Fragment part correct?
|
@bobzhu418 Have you tried another packet on wireshark ? Personally if I just open the test on windows without launching it, if the filter is applied I only have two packet which is displayed and only one of the two is the good one. However, the steps for your camera to find the packet that activates the transmitter may be sent at another time. For example, it may be sent at the beginning of the test, so you have to launch it. Or at the moment when Windows turns on. Because with my camera Windows turns off the transmitter every time it is no longer needed but maybe not with your camera. I can therefore only advise you to test as many cases as possible where the transmitter could receive a packet asking it to turn on. I remain available if you need more details, either here or on the repo I created. |
@EmixamPP Thank you so much for your help. I've managed to find the right setting for my IR camera. Now Howdy works great on my Manjaro setup. It did take me some time, but it was a great learning experience for me. For anyone who may have the same laptop, my settings are below:
|
I can confirm that the script by @EmixamPP works for me. (And thanks to @PetePriority for providing the initial attempts! Though they don't work on my machine.) Maybe it can be modified to read configuration file, so as to provide it as a package (e.g. AUR for archlinux)? |
@renyuneyun, yes it could be really nice ! Just having a script that reads the config file and modifies the C file could help those who have difficulty with this kind of manipulation. I'll try to do that soon. Regarding AUR, indeed it would be cool for those who don't go on GitHub. I've never done this kind of thing, I'll have to find out or simply have someone else do it. |
@EmixamPP I'm happy to help in packing it as an AUR package :) I can do the initial version and hand it to you (or maintain under my mybuilds repository if you are reluctant in updating it yourself XD). It's a simple process once you know it. |
You guys are geniuses. Confirm Lenovo Yoga Slim 7 Pro 2020 works with @EmixamPP script. |
Thank you for this - your project combined with setting the dark threshold above about 95 got the IR emitter working very reliably on my Thinkpad T14 Gen 2 AMD. |
I'm sorry but I have another one of these IR Emitters don't turn on issues and I couldn't resolve it with the solutions of previous issues.
My Lenovo Yoga S740 has 4 cameras registred under
/dev/video
(0-3):I read that setting different resolutions could help so I tested some resolutions but sadly no width/height I tried helped (including 640/360).
Below the debug output for video2 (IR webcam):
v4l2-ctl -d /dev/video2 --all
Device: Lenovo Yoga S740
Distro: Pop!OS 19.10 (Ubuntu 19.10)
Howdy version: 2.5.1 .deb installer because apt repository did not work
The text was updated successfully, but these errors were encountered: