Source code upload
[framework/connectivity/libgphoto2.git] / camlibs / sipix / blink.txt
1 Sipix blink usb "toy" camera
2
3 Stuff you need to know to control the *still* part of the camera
4 These are probably incomplete! but they do appear to work
5
6 usb vendor id = 0x0851
7 usb product id = 0x1542
8
9 device has 8megs ram and can take images at 640x480 and 320x240(ish)
10
11 usb requests (snooped from doze driver - there listed in the order they appear)
12 all control requests are on the control pipe
13 bulk is only used to read data and is on interface 1
14
15
16 Request
17 -------
18 no idea what this is for probably camera init?
19
20 bmRequestType=c0 Vendor,device to host
21 bRequest = 5
22 wValue = 1
23 Index = 0
24 Length = 2
25
26 Result:2bytes
27 contains: 01 00
28
29
30
31 Request
32 -------
33 again no idea - possibly camera id? - only first 6 bytes used
34 bmRequestType=c0 Vendor,device to host
35 bRequest = 5
36 wValue = 0
37 Index = 0
38 Length = 8
39
40 Result:8bytes
41 contains:01 06 79 10 3e 1e 00 00
42
43
44 Request
45 -------
46 Get picture count
47
48 bmRequestType=c0 Vendor,device to host
49 bRequest = 0
50 wValue = 0
51 Index = 0
52 Length = 8
53
54 Result:2bytes
55 contains:04 00 (there were 4 pics in device)
56
57
58
59 Request
60 -------
61
62 Gets size of specified image, odd in that request is repeated untill
63 first byte in returned data changes to 0
64
65 The returned size is in "blocks" these are 0x100 bytes long eithr that
66 or ive cocked up where the size field is by a byte ;-)
67
68 bmRequestType=c0 Vendor,device to host
69 bRequest = 1
70 wValue = 0 (image index from 0)
71 Index = 1
72 Length = 8
73
74 Result:8bytes
75 contains:01 00 00 00 00 00 00 00
76
77 untill value changes
78 Result:8bytes
79 contains:00 00 10 01 00 00 00 00
80
81
82 8 bytes break down into
83 byte 00:ready 0 - yes 1 -no
84
85 byte 01: size 0
86      02: size 1
87      03: size 2
88      04: size 3
89      05: format flags
90
91         Image Size: Upper 3 bits: (x >> 5)
92
93         0 - 640x480
94         1 - 352x288
95         2 - 176x144
96         3 - 320x240
97         4 - 800x592
98         5 - 160x120
99
100         Unknown: Lower 2 bits   ( x & 0x03)
101         
102                 0 -> 2
103                 2 -> 1
104                 3 -> 0
105                 1 -> ? 
106                 
107         Unknown: Mid 3 bits     ( (x >> 2) & 0x07)
108         
109         
110
111      06
112      07
113
114
115 request
116 -------
117 Positions bulk pipe ready to download image
118 Again request is repeated untill returned data byte 0 is set to 0
119
120 bmRequestType=c0 Vendor,device to host
121 bRequest = 2
122 wValue = 0 (image index)
123 Index = 0
124 Length = 6
125
126 Result:6bytes
127 contains:01 00 00 00 00 00
128
129 untill data changes to:
130 contains:00 00 00 00 00 00
131
132
133 opens bulk pipe and starts reading data in 0x100(256) byte chunks
134 closes bulk pipe