Sunday 21 August 2011

kinect psl1ght video stream done

:) video rgb output streaming on my Bravia. Stream for video endpoint done.
Next i need to fix depth endpoint don't get valid frames by now...

Kinect Driver for PlayStation 3
Copyright (C) 2010,2011 Antonio José Ramos Márquez aka bigboss
Creating a send_sema semaforo...
Creating a send_cmd mutex...
Mutex 2231383040 is created.
initializing event queue attr
Event queue created with id=(0x000000008D003500)
Function name kinectSetNotifyEventQueue
event port created with id 234894848
event port connected to queue
Function name kinect_probe dev_id=33
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_MOTOR idProduct b002
Function name kinect_attach dev_id=33
Getting device descriptor
Function name nuimotor_attach dev_id=33
Kinect NUI_MOTOR detected
Getting configuration descriptor
Number of interfaces 1
Getting interface descriptor
Verifying number of endpoints
Getting control endpoint descriptor for NUI_MOTOR 0
tryng to open control endpoint 0
Function name nuimotor_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Registering kinect driver return (0)
Function name nuimotor_control_done result=0x0 count=0 arg=0x0
Function name nuimotor_control_transfer step=1 arg=0
Function name nuimotor_control_transfer step=2 arg=0
init motor
Sending event NUIMOTOR_READY
Function name nuimotor_control_done result=0x0 count=1 arg=0x2
Received event NUIMOTOR_READY now it's time to angle and led settings
Function name kinectSetTiltDegs
NUIMOTOR angle received to 0
NUIMOTOR angle set to 0
Function name nuimotor_control_transfer step=3 arg=0
set angle
kinectSetTiltDegs return 0
Function name kinectSetLed
Function name nuimotor_control_transfer step=4 arg=1
Function name nuimotor_control_done result=0x0 count=0 arg=0x3
set led
motor ready time to camera and audio sending NUIMOTOR_ENABLED
kinectSetLed return 0
Function name nuimotor_control_done result=0x0 count=0 arg=0x4
Nuimotor initialized set angle and led set to red done...
Function name kinect_probe dev_id=34
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_AUDIO idProduct ad02
Function name kinect_attach dev_id=34
Getting device descriptor
Function name nuiaudio_attach dev_id=34
Kinect NUI_AUDIO detected
Getting configuration descriptor
Verifying number of endpoints 4
Getting control endpoint descriptor for NUI_AUDIO 1
Function name nuiaudio_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Function name nuiaudio_control_done result=0x0 count=0 arg=0x0
Function name nuiaudio_control_transfer step=1 arg=0
Set Interface (bInterfaceNumber=0, bAlternateSetting=0)
Sending event NUIAUDIO_READY
Received event NUIAUDIO_READY TODO audio initialization and isoc stuff
Function name kinect_probe dev_id=35
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_CAMERA idProduct ae02
Function name kinect_attach dev_id=35
Getting device descriptor
Function name nuicamera_attach dev_id=35
Kinect NUI_CAMERA detected
Getting configuration descriptor
Verifying number of endpoints 2
Getting control endpoint descriptor for NUI_CAMERA 2
Verifying endpoint 129
Found video camera endpoint 129
Getting endpoint for NUI_CAMERA color pipe_id3
Verifying endpoint 130
Found depth camera endpoint 130
Getting endpoint for NUI_CAMERA depth pipe_id 4
Function name nuicamera_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Function name nuicamera_control_done result=0x0 count=0 arg=0x0
Function name nuicamera_control_transfer step=1 arg=0
Sending event NUICAMERA_READY
Received event NUICAMERA_READY
Function name kinect_find_video_mode
Function name kinectSetVideoMode
Function name kinect_find_depth_mode
Function name kinectSetDepthMode
Function name kinect_find_video_mode
Function name kinect_find_depth_mode
local rgb buffer 50000420
local depth buffer 52100870
Function name kinectSetVideoBuffer buf=50000420
Function name stream_setbuf
Function name kinectSetDepthBuffer buf=52100870
Function name stream_setbuf
Unhandled event: 00000122
startdepth
Function name kinectStartDepth
Function name kinect_find_depth_mode
Function name kinect_find_depth_mode
Function name stream_init
framesize 422400 last_pkt_size 1132 pkt_size 1748
Function name write_register reg=0105 <= data=00
Write Reg 0x0105 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0000 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0105 <= 0x00
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad len 0001 != 0006
send_cmd return FFFFFFFF
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0006 <= 0x00
Function name write_register reg=0012 <= data=03
Write Reg 0x0012 <= 0x03
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0002 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0012 <= 0x03
Function name write_register reg=0013 <= data=01
Write Reg 0x0013 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0003 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0013 <= 0x01
Function name write_register reg=0014 <= data=1e
Write Reg 0x0014 <= 0x1e
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0004 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x0014 <= 0x1e
Function name write_register reg=0006 <= data=02
Write Reg 0x0006 <= 0x02
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0006 <= 0x02
Function name read_register reg=0006
Read Reg 0x0006 =>
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0002 tag=0006 len=0002: 0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=22 arg=0x1
Function name setCount count=22 result=0
Function name getCount
actual_len 22
send_cmd: Bad cmd 300 != 200
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0002 tag=0006 len=0002: 0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x1
Function name setCount count=12 result=0
Function name getCount
actual_len 12
send_cmd return 4
Read Reg 0x0006 => 0x100
Function name write_register reg=0017 <= data=00
Write Reg 0x0017 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0007 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0007 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0017 <= 0x00
Function name kinectStartVideo
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
Function name kinect_find_video_mode
Function name stream_init
framesize 614400 last_pkt_size 24 pkt_size 1908
Function name write_register reg=000c <= data=05
Write Reg 0x000c <= 0x05
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad tag 0700 != 0800
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x000c <= 0x05
Function name write_register reg=000d <= data=01
Write Reg 0x000d <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0009 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x000d <= 0x01
Function name write_register reg=000e <= data=0f
Write Reg 0x000e <= 0x0f
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000a len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Write Reg OK 0x000e <= 0x0f
Function name write_register reg=0005 <= data=01
Write Reg 0x0005 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000b len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000b len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0005 <= 0x01
Function name write_register reg=0047 <= data=00
Write Reg 0x0047 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000c len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0b00 != 0c00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000c len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0047 <= 0x00
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 1 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 3d3ea7f2
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 11 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 2 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 46c5b40a
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
usb_transfer depth enabled
usb_transfer depth enabled
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 3 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 54d34c47
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 51 packets in buf (323 total), resyncing...
[Stream 80] Inconsistent flag 81 with 52 packets in buf (323 total), resyncing...
[Stream 70] Inconsistent flag 82 with 7 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 4 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 5a4dc008
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 10 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 5 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 5e5a585f
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 2 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 6 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 676770a9
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 7 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 6c2af6b5
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 8 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 712b76a8
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 9 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 75eefcb4
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 10 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 7fb302b3
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 11 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 88832116
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 12 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 8d46a722
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 11 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 13 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 92472715
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 2 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 13 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 14 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 9b174578
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 50 packets in buf (323 total), resyncing...
fram_size 614400 valid_frames 15 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS 9fdacb84
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 16 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS a4db4b77
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 50 packets in buf (323 total), resyncing...
[Stream 80] Inconsistent flag 81 with 51 packets in buf (323 total), resyncing...
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 17 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS a99ed183
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 18 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS ae62578f
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 19 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS b2abe9cd
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
fram_size 614400 valid_frames 20 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS b76f6fd9
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 9 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 5 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 6 packets in buf (242 total), resyncing...
[Stream 70] Inconsistent flag 82 with 14 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 21 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS c5400e2f
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 70] Inconsistent flag 82 with 8 packets in buf (242 total), resyncing...
fram_size 614400 valid_frames 22 flag 85
Got color frame of size 614400/614400, 323/323 packets arrived, TS ca7d8809
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
video buffer ready
[Stream 80] Inconsistent flag 85 with 52 packets in buf (323 total), resyncing...
[Stream 80] Inconsistent flag 81 with 53 packets in buf (323 total), resyncing...
Function name kinectStopDepth
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000d len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0c00 != 0d00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000d len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0006 <= 0x00
Function name stream_freebufs
Function name kinectStopVideo
Function name write_register reg=0005 <= data=00
Write Reg 0x0005 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000e len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0d00 != 0e00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000e len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad len 0001 != 0006
send_cmd return FFFFFFFF
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=000e len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd return 2
Write Reg OK 0x0005 <= 0x00
Function name stream_freebufs
Exiting for real.


more to come...


Monday 15 August 2011

kinect psl1ght work in progress

nuimotor: i can move it, get tilt status, set led, all fine. One only control endpoint.
nuicamera: i can write and read commands using control endpoint some command to start video and depth sometimes fail i must implement retry for write_register and send_cmd stuff. Two additional endpoints enabled for depth and video.Next step will be learn to parsing streams. I must rewrite some stuff for isoc stream and processing packets.
nuiaudio: 1 control endpoint and four exta endpoint detected. Todo almost everything for audio, i have some code from eyetoy in ps2 perhaps i can port it.

Output from actual sample driver code using psl1ght. Libfreenect was a good start point however usb stuff is something different in PlayStation:

PS3Load v0.1
Waiting for connection...
Receiving data... (0x00010687/0x00041d60)
Launching...
Initializing pad...
Function name kinectInit
Kinect Driver for PlayStation 3
Copyright (C) 2010,2011 Antonio José Ramos Márquez aka bigboss
Creating a send_sema semaforo...
Creating a send_cmd mutex...
Mutex 2231383040 is created.
initializing event queue attr
Event queue created with id=(0x000000008D003500)
Function name kinectSetNotifyEventQueue
event port created with id 234894848
event port connected to queue
Function name kinect_probe dev_id=4
USB device probe for kinect getting device descriptor
Usb device found has idVendor 5e04
New usb device found has NUI_MOTOR idProduct b002
Function name kinect_attach dev_id=4
Getting device descriptor
Function name nuimotor_attach dev_id=4
Kinect NUI_MOTOR detected
Getting configuration descriptor
Number of interfaces 1
Getting interface descriptor
Verifying number of endpoints
Getting control endpoint descriptor for NUI_MOTOR 0
tryng to open control endpoint 0
Function name nuimotor_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Function name kinect_probe dev_id=12
USB device probe for kinect getting device descriptor
init motor
Getting endpoint for NUI_CAMERA depth pipe_id 4
Function name nuicamera_control_transfer step=0 arg=1
Set Configuration (bConfigurationValue=1)
Registering kinect driver return (0)
Sending event NUICAMERA_READY
Function name kinectSetTiltDegs
NUIMOTOR angle received to 20
NUIMOTOR angle set to 40
Function name nuimotor_control_transfer step=3 arg=40
set angle
kinectSetTiltDegs return 0
Function name kinectSetLed
Function name nuimotor_control_transfer step=4 arg=1
set led
motor ready time to camera and audio sending NUIMOTOR_ENABLED
kinectSetLed return 0
Function name kinectUpdateTiltState
Sending event NUIAUDIO_READY
updating tilt state
kinectUpdateTiltState return 0
Function name nuimotor_control_done result=0x0 count=0 arg=0x3
Function name kinectGetTiltStatus
tilt status=0
Function name kinectGetTiltDegs
Function name nuimotor_control_done result=0x0 count=0 arg=0x4
Function name kinectGetMksAccel
Received event NUICAMERA_READY
Nuimotor initialized set angle and led set to red done...
Function name kinect_find_video_mode
Function name nuimotor_control_done result=0x0 count=10 arg=0x5
Function name kinect_find_depth_mode
Function name kinectSetDepthMode
Function name kinect_find_video_mode
local rgb buffer 50000830
Function name kinectSetVideoBuffer buf=50000830
Function name stream_setbuf
Received event NUIAUDIO_READY TODO audio initialization and isoc stuff
Function name kinectStartDepth
Function name kinect_find_depth_mode
Function name kinect_find_depth_mode
Function name stream_init
Function name usb_transfer type=1
Function name write_register reg=0105 <= data=00
Write Reg 0x0105 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0000 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0001 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0012 <= data=03
Write Reg 0x0012 <= 0x03
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0002 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0013 <= data=01
Write Reg 0x0013 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0003 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Control cmd=0003 tag=0004 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0006 <= data=02
Write Reg 0x0006 <= 0x02
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
send_cmd returned 0 [0000 f000], 0000 expected
Function name write_register reg=0017 <= data=00
Write Reg 0x0017 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0005 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name kinectStartVideo
Function name kinect_get_current_video_mode
Function name kinect_find_video_mode
Function name kinect_find_video_mode
Function name stream_init
Function name usb_transfer type=0
Function name write_register reg=000c <= data=05
Write Reg 0x000c <= 0x05
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0006 len=0004: 0
Function name stream_done type=0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=20 arg=0x1
Function name setCount count=20 result=0
Function name getCount
actual_len 20
send_cmd: Bad tag 0500 != 0600
send_cmd return FFFFFFFF
Function name write_register reg=000d <= data=01
Write Reg 0x000d <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0006 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=000e <= data=0f
Write Reg 0x000e <= 0x0f
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0007 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name write_register reg=0005 <= data=01
Write Reg 0x0005 <= 0x01
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=0 arg=0x1
Function name setCount count=0 result=0
Function name getCount
actual_len 0
actual_len 0 send_cmd: Input control transfer failed (0)
send_cmd returned 0 [0000 f000], 0000 expected
Function name write_register reg=0047 <= data=00
Write Reg 0x0047 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0008 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name kinectStopDepth
Function name write_register reg=0006 <= data=00
Write Reg 0x0006 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0009 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
send_cmd: Bad tag 0800 != 0900
send_cmd return FFFFFFFF
Function name stream_freebufs
Function name kinectStopVideo
Function name write_register reg=0005 <= data=00
Write Reg 0x0005 <= 0x00
Function name send_cmd
usbdControlTransfer return 0
Control cmd=0003 tag=0009 len=0004: 0
Function name nuicamera_send_cmd_done result=0x0 count=12 arg=0x0
Function name nuicamera_send_cmd_done result=0x0 count=10 arg=0x1
Function name setCount count=10 result=0
Function name getCount
actual_len 10
Function name stream_freebufs
Exiting for real.


more to come

Wednesday 10 August 2011

usbd at last

Finally i got usbd stuff running fine on PSL1GHT, so next step will be refactory my kinect sprx module and port it to PSL1GHT.

Time to code.

credits must go to an0nym0u5 https://github.com/an0nym0u5/PSL1GHT