Hi Folks,
OK - The short of what we are trying to do:
We built a camera that uses SBP-2/1394 to talk to Windows 2000/XP. We need
to be able to build a custom interface (i.e. Not using WIA/STI) to talk to
our camera
Solution: We planned on using sbp2port.sys & SCSI Pass-through IOCTLS to
read/write to our device.
Problem: See Below,
The behavior we are seeing is as follows
Windows does an SBP-2 Login to our Camera
Camera (Responds to Windows with valid response)
Windows sends a SBP-2 Inquiry command to our camera
Our Camera responds with what we think is a good response.
And then that’s it -
So we decided to try and debug the driver using the Checked build, turning
on logging messages to WinDbp for the 1394 Bus Driver, sbp2port.sy and the
OHCI Driver, see what was going on.
And guess what, we found an error logged by the sbp2port.sys driver.
Now we just need to figure out what we are doing wrong
Here is a snippet of the DebugPrints from the Windows drivers when things
seem to go bad.
The snippet starts while windows is waiting for a response to its login
request to our camera.
I have added comments where I think things are going bad (Bottom on the
trace).
We are pretty clueless at this point, not sure what we are doing wrong. It
looks like sbp2port.sys is attempting to continue talking to us, but then
receives notification that the device has been stopped/removed. We are
confused as to why this would happen as we have not removed the device. The
only think we can think of is the fact that we are not using an .inf file,
and maybe we need to add an entry to the registry. Maybe the PNP Manager in
Windows without that windows disables/removes the device? Just a guess
Thoughts on where we are going wrong.
(* Windows Kernel Debug Trace Begin *)
Sbp2StartDevice: Enabling SPC Command set
Sbp2Port:Sbp2Login: waiting for login status
'Bus1394IOCtl: enter
Sbp2SendRequest: waiting for pending Irp
'Bus1394Indication: tCode = 1
'Bus1394Indication: RequestPacket = 8184ccd0
'Bus1394Indication: RequestPacketLength = 1c
'Bus1394Indication: Node attempting to access 3 20
'Bus1394Indication: First storage entry 817e5e88
'Bus1394Indication: Storage entry 817e5e88 prior to InRange
'Bus1394NotificationDpc: PostNotify on ulOffset = 0, ulLength = 8
fulNotificationOption = 2
Sbp2Port:Sbp2GlobalStatusCallback: Mgmt, Ext=xFFA98C10, Flags=x149
Sbp2Port:Sbp2Login: login status received
'Bus1394IOCtl: enter
Sbp2Port:Sbp2GlobalStatusCallback: Leaving Callback, Depth 0
'Bus1394NotificationDpc: back from PostNotify rtn
'Bus1394IOCtl: enter
Sbp2SendRequest: waiting for pending Irp
'Bus1394IOCtl: enter
Sbp2SendRequest: waiting for pending Irp
Sbp2IssueInternal: Sending scsiop x12, irp=x810CD2A8
Sbp2busMap allocating new page table for ctx FFA805C0!!
Sbp2AllocateComplete, ctx FFA805C0, flags 4
Sbp2AllocateComplete, ctx FFA805C0, flags 8
Sbp2Port:Sbp2StartIo: Writing to ORB_POINTER, cxt FFA805C0
'Bus1394IOCtl: enter
Sbp2Port: Create1394TransactionForSrb: doing async alloc of pagetable
'Bus1394Indication: tCode = 1
'Bus1394Indication: RequestPacket = 8184ccec
'Bus1394Indication: RequestPacketLength = 1c
'Bus1394Indication: Node attempting to access 3 20
'Bus1394Indication: First storage entry 817e5e88
'Bus1394Indication: Storage entry 817e5e88 prior to InRange
'Bus1394NotificationDpc: PostNotify on ulOffset = 0, ulLength = 8
fulNotificationOption = 2
Sbp2Port:Sbp2GlobalStatusCallback: got completion of FFA805C0
Sbp2Port:Sbp2GlobalStatusCallback: Leaving Callback, Depth 1
'Bus1394NotificationDpc: back from PostNotify rtn
Sbp2StartDevice: DeviceType in ConfigRom 6, In Inquiry 6
Sbp2:FreeAsyncRequestContext: Pushed context ffa805c0 Back to Free List
'Bus1394IOCtl: enter
Sbp2SendRequest: waiting for pending Irp
'Bus1394Indication: tCode = 1
'Bus1394Indication: RequestPacket = 8184cd08
'Bus1394Indication: RequestPacketLength = 1c
'Bus1394Indication: Node attempting to access 2 10
'Bus1394Indication: First storage entry 87a77108
'Bus1394Indication: Storage entry 87a77108 prior to InRange
'Bus1394NotificationDpc: PostNotify on ulOffset = 0, ulLength = 8
fulNotificationOption = 2
Sbp2Port:Sbp2MgmtOrbStatusCb: Type=7, Sts=xc0000001, Ext=xFFA98C10,
Flags=x301
'Bus1394NotificationDpc: back from PostNotify rtn
'GetRegistryParameters: status 0x0, diag 0 Transfer 200000
Sbp2Adddevice, maxTransferSize 200000
'Sbp2PnP: Got pnp irp 8169C648, minor 9
'Sbp2PnP: Got pnp irp 8169C648, minor 9
'Sbp2PnP: Got pnp irp 8169C648, minor 20
'Sbp2PnP: Got pnp irp 8169C648, minor 20
Sbp2Port: Sbp2PnpDeviceControl: QUERY_DEVICE_STATE, extension Flags 301.
'Sbp2PnP: Got pnp irp 8169C648, minor 255
'Sbp2Port: Sbp2PnpDeviceControl: PNP IRP NOT HANDLED. Passing it down.
'Sbp2PnP: Got pnp irp 8169C648, minor 255
'Sbp2Port: Sbp2PnpDeviceControl: PNP IRP NOT HANDLED. Passing it down.
'Sbp2PnP: Got pnp irp 8169C648, minor 7
'Sbp2PnP: QUERY_DEVICE_RELATIONS on FFA7E038
'Sbp2PnP: Type = 0
Sbp2Port:AllocatePacket: allocating new one!!!
****** OK - HERE IS THE ERROR, WE ARE NOT SURE WHY THE SYSTEM THINKGS THE
DEVICE IS REMOVED/STOPPED ******
****************************************************************************
*************************************************
Sbp2Port: Sbp2ScsiRequests: Device removed/stopped 301,aborting with status
80000011.
Sbp2Get1394ConfigInfo: Error 80000011 while trying to get configuration info
(1)
'Sbp2PnP: Got pnp irp 8169C648, minor 7
'Sbp2PnP: QUERY_DEVICE_RELATIONS on PDO FFA98B58
'Sbp2PnP: Type = 0
'Sbp2PnP: Got pnp irp 8169C648, minor 7
'Sbp2PnP: QUERY_DEVICE_RELATIONS on FFA81038
'Sbp2PnP: Type = 0
****************************************************************************
*************************************************
Sbp2Port:AllocatePacket: allocating new one!!!
'Bus1394IOCtl: enter
'Bus1394IOCtl: enter
'Bus1394IOCtl: enter
'Bus1394PnP: enter with DeviceObject = 81693258 Cmd = 7
'Sbp2PnP: Got pnp irp 8169C648, minor 7
'Sbp2PnP: QUERY_DEVICE_RELATIONS on FFA7E038
'Sbp2PnP: Type = 0
Sbp2Port:AllocatePacket: allocating new one!!!
Sbp2Port: Sbp2ScsiRequests: Device removed/stopped 301,aborting with status
80000011.
Sbp2Get1394ConfigInfo: Error 80000011 while trying to get configuration info
(1)
'Sbp2PnP: Got pnp irp 8169C648, minor 7
'Sbp2PnP: QUERY_DEVICE_RELATIONS on PDO FFA98B58
'Sbp2PnP: Type = 0
Christopher Pane
Principal Embedded Software Engineer
Vanteon
2851 Clover Street
Pittsford, NY 14534
office: 585.248.0510 ext 232
http://www.vanteon.com http:</http:>