Permalink
Browse files

Added preliminary support for the Kinect4Windows sensor.

1 parent 4204f59 commit 9a461886f91e2e150a84d8304cef0f4ed72b0c10 @avin2 committed May 24, 2012
@@ -11,3 +11,5 @@ SUBSYSTEM=="usb", ATTR{idProduct}=="0601", ATTR{idVendor}=="1d27", MODE:="0666",
SUBSYSTEM=="usb", ATTR{idProduct}=="02ae", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
SUBSYSTEM=="usb", ATTR{idProduct}=="02ad", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="audio"
SUBSYSTEM=="usb", ATTR{idProduct}=="02b0", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
+SUBSYSTEM=="usb", ATTR{idProduct}=="02be", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="audio"
+SUBSYSTEM=="usb", ATTR{idProduct}=="02bf", ATTR{idVendor}=="045e", MODE:="0666", OWNER:="root", GROUP:="video"
@@ -22,7 +22,7 @@ Signature="$WINDOWS NT$"
Class=PrimeSense
ClassGuid={dce97d75-aef7-1980-1909-531357633222}
Provider=%PS%
-DriverVer=11/21/2011,3.1.3.1
+DriverVer=05/22/2012,3.1.3.1
CatalogFile=psdrv3.cat
; ================= Class section =====================
@@ -68,6 +68,10 @@ DefaultDestDir = 12 ; Driver Dir
%USB\VID_045E&PID_02AD.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02AD
%USB\VID_045E&PID_02AE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02AE&MI_00
%USB\VID_045E&PID_02AE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02AE
+%USB\VID_045E&PID_02BE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BE&MI_00
+%USB\VID_045E&PID_02BE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BE
+%USB\VID_045E&PID_02BF.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BF&MI_00
+%USB\VID_045E&PID_02BF.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BF
[PrimeSense.NTamd64]
%USB\VID_1D27&PID_0200.DeviceDesc%=psdrv3.Dev, USB\VID_1D27&PID_0200&MI_00
@@ -95,6 +99,10 @@ DefaultDestDir = 12 ; Driver Dir
%USB\VID_045E&PID_02AD.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02AD
%USB\VID_045E&PID_02AE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02AE&MI_00
%USB\VID_045E&PID_02AE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02AE
+%USB\VID_045E&PID_02BE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BE&MI_00
+%USB\VID_045E&PID_02BE.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BE
+%USB\VID_045E&PID_02BF.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BF&MI_00
+%USB\VID_045E&PID_02BF.DeviceDesc%=psdrv3.Dev, USB\VID_045E&PID_02BF
[psdrv3.Dev.NT]
CopyFiles=psdrv3.Files.Ext
@@ -178,4 +186,6 @@ USB\VID_1D27&PID_2200.DeviceDesc="PrimeSense Sensor Development Kit NG 2200"
USB\VID_1D27&PID_F9DB.DeviceDesc="PrimeSense Sensor Development Kit NG Debug"
USB\VID_045E&PID_02B0.DeviceDesc="Kinect Motor"
USB\VID_045E&PID_02AD.DeviceDesc="Kinect Audio"
-USB\VID_045E&PID_02AE.DeviceDesc="Kinect Camera"
+USB\VID_045E&PID_02AE.DeviceDesc="Kinect Camera"
+USB\VID_045E&PID_02BE.DeviceDesc="Kinect4Windows Audio"
+USB\VID_045E&PID_02BF.DeviceDesc="Kinect4Windows Camera"
View
@@ -9,6 +9,9 @@ You must use this kinect mod version with the unstable OpenNI release which is a
http://www.openni.org/Downloads/OpenNIModules.aspx
Changes:
+v0.93:
+ 1) Added preliminary support for the Kinect4Windows sensor.
+
v0.92:
1) Updated codebase to the latest OpenNI / Sensor version (1.5.4.0 / 5.1.2.1)
@@ -82,7 +85,8 @@ TIPs:
Todo:
1) Add motor & led control.
- 2) Add support for the K4W device.
+ 2) Add windows 8 support - it's not working at the moment due to manually modified INF files.
+ 3) Fix kinect4windows on Linux/MacOSX - it's very unstable.
The source code for this version is available at:
https://github.com/avin2/SensorKinect
@@ -48,6 +48,7 @@ typedef enum
XnUInt16 XnSensorIO::ms_supportedProducts[] =
{
0x02AE,
+ 0x02BF,
};
XnUInt32 XnSensorIO::ms_supportedProductsCount = sizeof(XnSensorIO::ms_supportedProducts) / sizeof(XnSensorIO::ms_supportedProducts[0]);
@@ -141,6 +142,8 @@ XnStatus XnSensorIO::OpenDataEndPoints(XnSensorUsbInterface nInterface, const Xn
{
XnStatus nRetVal = XN_STATUS_OK;
+// --avin mod--
+/*
// try to set requested interface
if (nInterface != XN_SENSOR_USB_INTERFACE_DEFAULT)
{
@@ -158,13 +161,12 @@ XnStatus XnSensorIO::OpenDataEndPoints(XnSensorUsbInterface nInterface, const Xn
XN_ASSERT(FALSE);
XN_LOG_WARNING_RETURN(XN_STATUS_USB_INTERFACE_NOT_SUPPORTED, XN_MASK_DEVICE_IO, "Unknown interface type: %d", nInterface);
}
-// --avin mod--
-/*
+
xnLogVerbose(XN_MASK_DEVICE_IO, "Setting USB alternative interface to %d...", nAlternativeInterface);
nRetVal = xnUSBSetInterface(m_pSensorHandle->USBDevice, 0, nAlternativeInterface);
XN_IS_STATUS_OK(nRetVal);
-*/
}
+*/
xnLogVerbose(XN_MASK_DEVICE_IO, "Opening endpoints...");
@@ -174,39 +176,24 @@ XnStatus XnSensorIO::OpenDataEndPoints(XnSensorUsbInterface nInterface, const Xn
XnBool bNewUSB = TRUE;
// Depth
- m_pSensorHandle->DepthConnection.bIsISO = FALSE;
+
+ // --avin mod--
+ m_pSensorHandle->DepthConnection.bIsISO = TRUE;
+ bNewUSB = TRUE;
xnLogVerbose(XN_MASK_DEVICE_IO, "Opening endpoint 0x81 for depth...");
- nRetVal = xnUSBOpenEndPoint(m_pSensorHandle->USBDevice, 0x81, XN_USB_EP_BULK, XN_USB_DIRECTION_IN, &m_pSensorHandle->DepthConnection.UsbEp);
+ nRetVal = xnUSBOpenEndPoint(m_pSensorHandle->USBDevice, 0x81, XN_USB_EP_ISOCHRONOUS, XN_USB_DIRECTION_IN, &m_pSensorHandle->DepthConnection.UsbEp);
if (nRetVal == XN_STATUS_USB_ENDPOINT_NOT_FOUND)
{
- bNewUSB = FALSE;
- xnLogVerbose(XN_MASK_DEVICE_IO, "Endpoint 0x81 does not exist. Trying old USB: Opening 0x82 for depth...");
- nRetVal = xnUSBOpenEndPoint(m_pSensorHandle->USBDevice, 0x82, XN_USB_EP_BULK, XN_USB_DIRECTION_IN, &m_pSensorHandle->DepthConnection.UsbEp);
+ nRetVal = xnUSBSetInterface(m_pSensorHandle->USBDevice, 0, 1);
XN_IS_STATUS_OK(nRetVal);
- }
- else
- {
- if (nRetVal == XN_STATUS_USB_WRONG_ENDPOINT_TYPE)
- {
- nRetVal = xnUSBOpenEndPoint(m_pSensorHandle->USBDevice, 0x81, XN_USB_EP_ISOCHRONOUS, XN_USB_DIRECTION_IN, &m_pSensorHandle->DepthConnection.UsbEp);
-
- m_pSensorHandle->DepthConnection.bIsISO = TRUE;
- }
-
- bNewUSB = TRUE;
+ nRetVal = xnUSBOpenEndPoint(m_pSensorHandle->USBDevice, 0x81, XN_USB_EP_ISOCHRONOUS, XN_USB_DIRECTION_IN, &m_pSensorHandle->DepthConnection.UsbEp);
XN_IS_STATUS_OK(nRetVal);
-
- if (m_pSensorHandle->DepthConnection.bIsISO == TRUE)
- {
- xnLogVerbose(XN_MASK_DEVICE_IO, "Depth endpoint is isochronous.");
- }
- else
- {
- xnLogVerbose(XN_MASK_DEVICE_IO, "Depth endpoint is bulk.");
- }
}
+
+ xnLogVerbose(XN_MASK_DEVICE_IO, "Depth endpoint is isochronous.");
+
m_pSensorHandle->DepthConnection.bIsOpen = TRUE;
nRetVal = xnUSBGetEndPointMaxPacketSize(m_pSensorHandle->DepthConnection.UsbEp, &m_pSensorHandle->DepthConnection.nMaxPacketSize);
@@ -159,14 +159,14 @@ XnStatus XnHostProtocolInitFWParams(XnDevicePrivateData* pDevicePrivateData, XnU
pDevicePrivateData->FWInfo.nOpcodeGetPlatformString = OPCODE_INVALID;
pDevicePrivateData->FWInfo.nOpcodeGetUsbCore = OPCODE_GET_USB_CORE_TYPE;
-
- pDevicePrivateData->FWInfo.nUSBDelayReceive = 100;
- pDevicePrivateData->FWInfo.nUSBDelayExecutePreSend = 1;
- pDevicePrivateData->FWInfo.nUSBDelayExecutePostSend = 10;
- pDevicePrivateData->FWInfo.nUSBDelaySoftReset = 800;
- pDevicePrivateData->FWInfo.nUSBDelaySetParamFlicker = 3000;
+ // --avin mod--
+ pDevicePrivateData->FWInfo.nUSBDelayReceive = 1;
+ pDevicePrivateData->FWInfo.nUSBDelayExecutePreSend = 0;
+ pDevicePrivateData->FWInfo.nUSBDelayExecutePostSend = 0;
+ pDevicePrivateData->FWInfo.nUSBDelaySoftReset = 1;
+ pDevicePrivateData->FWInfo.nUSBDelaySetParamFlicker = 300;
pDevicePrivateData->FWInfo.nUSBDelaySetParamStream0Mode = 1;
- pDevicePrivateData->FWInfo.nUSBDelaySetParamStream1Mode = 300;
+ pDevicePrivateData->FWInfo.nUSBDelaySetParamStream1Mode = 1;
pDevicePrivateData->FWInfo.nUSBDelaySetParamStream2Mode = 1;
pDevicePrivateData->FWInfo.bGetImageCmosTypeSupported = FALSE;

4 comments on commit 9a46188

@achalaggarwal

Hi Avin

What is the best way to get in touch with you?

@Axioures

Hi Avin,

I try to install SensorKinect in Ubuntu 11.10 but when i execute ./RedistMaker i take this error:

../../../../Source/XnDeviceSensorV2/
XnDeviceSensorIO.h:98:51: error: ‘XnUSBEventArgs’ has not been declared
../../../../Source/XnDeviceSensorV2/XnDeviceSensorIO.h:105:10: error: ‘XnRegistrationHandle’ was not declared in this scope
../../../../Source/XnDeviceSensorV2/XnDeviceSensorIO.h:105:30: error: template argument 1 is invalid

Any idea how to fix it? I've tried every solution that i found in the web but the problem remains.

@ejardimTrea

Hello Axioures, did you find the solution to this problem? We're having exactly the same problem here

@Axioures

Hi. If you click on the label "Tags" on the right top of your screen, three packages for installing the Kinect sensor's drivers will appear. I downloaded the third package (.zip) and followed the exact same instructions. The above error didn't appear and the installation process continued without any other problems. I wish this is the solution for you too.

Hope it helps! Good luck!

Please sign in to comment.