On Thu, Nov 27, 2008 at 7:35 AM,
<[EMAIL PROTECTED]> wrote:
> Hello Markus,
>
> [EMAIL PROTECTED] schrieb am 27.11.2008 04:40:15:
>
>> Hi,
>>
>> On Wed, Nov 26, 2008 at 7:31 PM,
>> <[EMAIL PROTECTED]> wrote:
>> > ...
>> > Here it goes:
>> > kernel is 2.6.27
>> > em28xx is from mercurial, with some little extends (show'n below).
>> > Main Problem is, that if the driver try to send an control_urb from
>> > em28xx_init_dev()->em28xx_write_regs_req()
>> > I always get an ret = -32 -> -EPIPE...
>> > I would greatly appreciate some hints that help me to get this cam
>> > working, surely the extensions I'll made come back to you in form of
>> > Patches.
>> >
>>
>> did you check if the correct pipe is used?
>
> How can I find the correct pipe to use to init the cam?
> If I understand correctly, every altsetting have pipe[0](send to cam) and
> pipe[1](receive), correct?
>

you can look at eg. usbview

>> 40 --> 02 <-- 00 00 a0 00 01 00 >>> 23
>
> Send exactly this command, btw what should this actually do?
> IMHO: Write 0x23 to EEPROM Page 1, Reg 01 - correct?
> I just got all Information about I2C-Regs and Settings but nothing about
> normal comm. with the em2820.
>

I doubt that you're using an empia based device with the driver.
Other devices might implement i2c writes according to their
specifications, this is
not a generic task which can be taken from other existing drivers.

>> bus 02 as for em28xx based devices this means access on the i2c bus,
>> and this is the difference
>> between other normal chip control transfers.
>>
>> You might not try to access the i2c bus using that flag.
>
> Maybe I don't understand you correct, but I want to write to i2c bus so
> what do you mean with "You might not try to access using that flag."
>

Try to look at the datasheet how to access the i2c bus correctly and
what usb control commands
are required to submit i2c data requests.

>> if you have any further questions about it just let me know.
>
> Lot's of... ;)
> Thanks in advance!
>

best regards,
Markus
>> best regards,
>> Markus
>>
>> > Greetings,
>> > --
>> > Marcel Schmedes
>> > DIEHL Aerospace GmbH
>> > Abt.: CD-EC - Research, Graphics
>> > Tel.: +49 69 5805 1712
>> > E-mail: [EMAIL PROTECTED]
>> > Website: http://www.diehl-aerospace.de
>> >
>> > ...
>
> Some further Information:
> VVVVVVVVVVVVVVVVVVVVVVVVV
> Example from Videologic to write to Cam (0x70):
> Write DSP (0x30) register 04 and data 80 (Shutterspeed)
> Command-block:
> <start>70 ackn 00 ackn 30 ackn 04 ackn<stop>
> Data-block:
> <start>70 ackn 80 ackn<stop>
>
> Save to EEPROM Page 1 (0xa0):
> Command-block:
> <start>70 ackn 00 ackn A0 ackn 04 ackn<stop>
> Data-block:
> <start>70 ackn 80 ackn<stop>
>
> Read from EEPROM Page 1 (0xa1):
> Command-block:
> <start>70 ackn 01 ackn A1 ackn 04 ackn<stop>
> Data-block:
> <start>71 ackn Nackn<stop>
> VVVVVVVVVVVVVVVVVVVVVVVVV
>
> I USBsniffed Cam plug-in with Windows driver, sorry for flodding you:
> Can you point out some usefull data I maybe overlooked - unfortunaly I'm
> new to USB...
>
> [6 ms] UsbSnoop - FilterAddDevice(b7c9f748) : DriverObject 8444b988, pdo
> 8445ade8
> [9 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_INTERFACE)
> [10 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_INTERFACE)
> [12 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_LEGACY_BUS_INFORMATION)
> [12 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_LEGACY_BUS_INFORMATION)
> [13 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_RESOURCE_REQUIREMENTS)
> [13 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_RESOURCE_REQUIREMENTS)
> [13 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
> [13 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
> [14 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_START_DEVICE)
> [14 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_START_DEVICE)
> [32 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_INTERFACE)
> [32 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_INTERFACE)
> [34 ms] UsbSnoop - FilterDispatchAny(b7c9afd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [34 ms] UsbSnoop - FdoHookDispatchInternalIoctl(b7c9b1ea) : fdo=8445ade8,
> Irp=842eeca0, IRQL=0
> [35 ms]  >>>  URB 1 going down  >>>
> -- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
>  TransferBufferLength = 00000012
>  TransferBuffer       = bacf794c
>  TransferBufferMDL    = 00000000
>  Index                = 00000000
>  DescriptorType       = 00000001 (USB_DEVICE_DESCRIPTOR_TYPE)
>  LanguageId           = 00000000
> [37 ms] UsbSnoop - FilterDispatchAny(b7c9afd2) : IRP_MJ_SYSTEM_CONTROL
> [41 ms] UsbSnoop - MyInternalIOCTLCompletion(b7c9b126) : fido=00000000,
> Irp=842eeca0, Context=843f1b98, IRQL=2
> [42 ms]  <<<  URB 1 coming back  <<<
> -- URB_FUNCTION_CONTROL_TRANSFER:
>  PipeHandle           = 84cb6748
>  TransferFlags        = b7d662db (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000012
>  TransferBuffer       = bacf794c
>  TransferBufferMDL    = 84e46488
>    00000000: 12 01 00 02 00 00 00 40 bd 1b 43 00 00 00 01 02
>    00000010: 00 01
>  UrbLink              = 00000000
>  SetupPacket          =
>    00000000: 80 06 00 01 00 00 12 00
> [42 ms] UsbSnoop - FilterDispatchAny(b7c9afd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [42 ms] UsbSnoop - FdoHookDispatchInternalIoctl(b7c9b1ea) : fdo=8445ade8,
> Irp=842eeca0, IRQL=0
> [42 ms]  >>>  URB 2 going down  >>>
> -- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
>  TransferBufferLength = 00000009
>  TransferBuffer       = bacf7960
>  TransferBufferMDL    = 00000000
>  Index                = 00000000
>  DescriptorType       = 00000002 (USB_CONFIGURATION_DESCRIPTOR_TYPE)
>  LanguageId           = 00000000
> [45 ms] UsbSnoop - MyInternalIOCTLCompletion(b7c9b126) : fido=00000000,
> Irp=842eeca0, Context=843f1b98, IRQL=2
> [45 ms]  <<<  URB 2 coming back  <<<
> -- URB_FUNCTION_CONTROL_TRANSFER:
>  PipeHandle           = 84cb6748
>  TransferFlags        = 84cb670b (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000009
>  TransferBuffer       = bacf7960
>  TransferBufferMDL    = 84e46488
>    00000000: 09 02 65 00 01 01 00 80 32
>  UrbLink              = 00000000
>  SetupPacket          =
>    00000000: 80 06 00 02 00 00 09 00
> [45 ms] UsbSnoop - FilterDispatchAny(b7c9afd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [45 ms] UsbSnoop - FdoHookDispatchInternalIoctl(b7c9b1ea) : fdo=8445ade8,
> Irp=842eeca0, IRQL=0
> [45 ms]  >>>  URB 3 going down  >>>
> -- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
>  TransferBufferLength = 00000075
>  TransferBuffer       = 843a1640
>  TransferBufferMDL    = 00000000
>  Index                = 00000000
>  DescriptorType       = 00000002 (USB_CONFIGURATION_DESCRIPTOR_TYPE)
>  LanguageId           = 00000000
> [48 ms] UsbSnoop - MyInternalIOCTLCompletion(b7c9b126) : fido=00000000,
> Irp=842eeca0, Context=843f1b98, IRQL=2
> [48 ms]  <<<  URB 3 coming back  <<<
> -- URB_FUNCTION_CONTROL_TRANSFER:
>  PipeHandle           = 84cb6748
>  TransferFlags        = 0000000b (USBD_TRANSFER_DIRECTION_IN,
> USBD_SHORT_TRANSFER_OK)
>  TransferBufferLength = 00000065
>  TransferBuffer       = 843a1640
>  TransferBufferMDL    = 84e46488
>    00000000: 09 02 65 00 01 01 00 80 32 09 04 00 00 02 ff 00
>    00000010: 00 00 07 05 06 02 00 02 00 07 05 82 02 00 02 00
>    00000020: 09 04 00 01 02 ff 00 00 00 07 05 06 02 00 02 00
>    00000030: 07 05 82 01 00 14 01 09 04 00 02 02 ff 00 00 00
>    00000040: 07 05 06 02 00 02 00 07 05 82 01 00 0c 01 09 04
>    00000050: 00 03 02 ff 00 00 00 07 05 06 02 00 02 00 07 05
>    00000060: 82 01 00 04 01
>  UrbLink              = 00000000
>  SetupPacket          =
>    00000000: 80 06 00 02 00 00 75 00
> [48 ms] UsbSnoop - FilterDispatchAny(b7c9afd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [48 ms] UsbSnoop - FdoHookDispatchInternalIoctl(b7c9b1ea) : fdo=8445ade8,
> Irp=842eeca0, IRQL=0
> [49 ms]  >>>  URB 4 going down  >>>
> -- URB_FUNCTION_SELECT_CONFIGURATION:
>  ConfigurationDescriptor = 0x843a1640 (configure)
>  ConfigurationDescriptor : bLength             = 9
>  ConfigurationDescriptor : bDescriptorType     = 0x00000002
>  ConfigurationDescriptor : wTotalLength        = 0x00000065
>  ConfigurationDescriptor : bNumInterfaces      = 0x00000001
>  ConfigurationDescriptor : bConfigurationValue = 0x00000001
>  ConfigurationDescriptor : iConfiguration      = 0x00000000
>  ConfigurationDescriptor : bmAttributes        = 0x00000080
>  ConfigurationDescriptor : MaxPower            = 0x00000032
>  ConfigurationHandle     = 0x00000000
>  Interface[0]: Length            = 56
>  Interface[0]: InterfaceNumber   = 0
>  Interface[0]: AlternateSetting  = 0
> [94 ms] UsbSnoop - MyInternalIOCTLCompletion(b7c9b126) : fido=00000000,
> Irp=842eeca0, Context=843f1b98, IRQL=0
> [95 ms]  <<<  URB 4 coming back  <<<
> -- URB_FUNCTION_SELECT_CONFIGURATION:
>  ConfigurationDescriptor = 0x843a1640 (configure)
>  ConfigurationDescriptor : bLength             = 9
>  ConfigurationDescriptor : bDescriptorType     = 0x00000002
>  ConfigurationDescriptor : wTotalLength        = 0x00000065
>  ConfigurationDescriptor : bNumInterfaces      = 0x00000001
>  ConfigurationDescriptor : bConfigurationValue = 0x00000001
>  ConfigurationDescriptor : iConfiguration      = 0x00000000
>  ConfigurationDescriptor : bmAttributes        = 0x00000080
>  ConfigurationDescriptor : MaxPower            = 0x00000032
>  ConfigurationHandle     = 0x84325d40
>  Interface[0]: Length            = 56
>  Interface[0]: InterfaceNumber   = 0
>  Interface[0]: AlternateSetting  = 0
>  Interface[0]: Class             = 0x000000ff
>  Interface[0]: SubClass          = 0x00000000
>  Interface[0]: Protocol          = 0x00000000
>  Interface[0]: InterfaceHandle   = 0x8432b308
>  Interface[0]: NumberOfPipes     = 2
>  Interface[0]: Pipes[0] : MaximumPacketSize = 0x00000200
>  Interface[0]: Pipes[0] : EndpointAddress   = 0x00000006
>  Interface[0]: Pipes[0] : Interval          = 0x00000000
>  Interface[0]: Pipes[0] : PipeType          = 0x00000002
> (UsbdPipeTypeBulk)
>  Interface[0]: Pipes[0] : PipeHandle        = 0x8432b324
>  Interface[0]: Pipes[0] : MaxTransferSize   = 0x00001000
>  Interface[0]: Pipes[0] : PipeFlags         = 0x00000000
>  Interface[0]: Pipes[1] : MaximumPacketSize = 0x00000200
>  Interface[0]: Pipes[1] : EndpointAddress   = 0x00000082
>  Interface[0]: Pipes[1] : Interval          = 0x00000000
>  Interface[0]: Pipes[1] : PipeType          = 0x00000002
> (UsbdPipeTypeBulk)
>  Interface[0]: Pipes[1] : PipeHandle        = 0x8432b344
>  Interface[0]: Pipes[1] : MaxTransferSize   = 0x00001000
>  Interface[0]: Pipes[1] : PipeFlags         = 0x00000000
> [95 ms] UsbSnoop - FilterDispatchAny(b7c9afd2) :
> IRP_MJ_INTERNAL_DEVICE_CONTROL
> [95 ms] UsbSnoop - FdoHookDispatchInternalIoctl(b7c9b1ea) : fdo=8445ade8,
> Irp=842eeca0, IRQL=0
> [96 ms]  >>>  URB 5 going down  >>>
> -- URB_FUNCTION_SELECT_INTERFACE:
>  ConfigurationHandle     = 0x84325d40
>  Interface: Length            = 56
>  Interface: InterfaceNumber   = 0
>  Interface: AlternateSetting  = 0
>  Interface: Class             = 0x00000000
>  Interface: SubClass          = 0x00000000
>  Interface: Protocol          = 0x00000000
>  Interface: InterfaceHandle   = 00000000
>  Interface: NumberOfPipes     = 0
> [138 ms] UsbSnoop - MyInternalIOCTLCompletion(b7c9b126) : fido=00000000,
> Irp=842eeca0, Context=843f1b98, IRQL=0
> [138 ms]  <<<  URB 5 coming back  <<<
> -- URB_FUNCTION_SELECT_INTERFACE:
>  ConfigurationHandle     = 0x84325d40
>  Interface: Length            = 56
>  Interface: InterfaceNumber   = 0
>  Interface: AlternateSetting  = 0
>  Interface: Class             = 0x000000ff
>  Interface: SubClass          = 0x00000000
>  Interface: Protocol          = 0x00000000
>  Interface: InterfaceHandle   = 84578b20
>  Interface: NumberOfPipes     = 2
>  Interface: Pipes[0] : MaximumPacketSize = 0x00000200
>  Interface: Pipes[0] : EndpointAddress   = 0x00000006
>  Interface: Pipes[0] : Interval          = 0x00000000
>  Interface: Pipes[0] : PipeType          = 0x00000002 (UsbdPipeTypeBulk)
>  Interface: Pipes[0] : PipeHandle        = 0x84578b3c
>  Interface: Pipes[0] : MaxTransferSize   = 0xffffffff
>  Interface: Pipes[0] : PipeFlags         = 0x00000000
>  Interface: Pipes[1] : MaximumPacketSize = 0x00000200
>  Interface: Pipes[1] : EndpointAddress   = 0x00000082
>  Interface: Pipes[1] : Interval          = 0x00000000
>  Interface: Pipes[1] : PipeType          = 0x00000002 (UsbdPipeTypeBulk)
>  Interface: Pipes[1] : PipeHandle        = 0x84578b5c
>  Interface: Pipes[1] : MaxTransferSize   = 0xffffffff
>  Interface: Pipes[1] : PipeFlags         = 0x00000000
> [140 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_CAPABILITIES)
> [140 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_CAPABILITIES)
> [142 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_PNP_DEVICE_STATE)
> [142 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_PNP_DEVICE_STATE)
> [143 ms] UsbSnoop - FilterDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_DEVICE_RELATIONS)
> [143 ms] UsbSnoop - FdoHookDispatchPnp(b7c9f45c) : IRP_MJ_PNP
> (IRP_MN_QUERY_DEVICE_RELATIONS)
>
> .
> Der Inhalt dieser E-Mail ist für den Absender rechtlich nicht verbindlich.
> Informieren Sie uns bitte, wenn Sie diese E-Mail fälschlicherweise erhalten 
> haben (Fax: +49-7551-891-4001). Bitte löschen Sie in diesem Fall die 
> Nachricht. Jede Form der weiteren Benutzung ist untersagt.
> .
> The content of this e-mail is not legally binding upon the sender.
> If this e-mail was transmitted to you by error, then please inform us 
> accordingly (Fax: +49-7551-891-4001). In such case you are requested to erase 
> the message. Any use of such e-mail message is strictly prohibited.
>

_______________________________________________
Em28xx mailing list
[email protected]
http://mcentral.de/mailman/listinfo/em28xx

Reply via email to