Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All ,

I am facing one issue while communicating with device which is connected via SCSI port.

All calls which we are making with device is like below, and they are working properlly

DeviceIoControl(hPort,
IOCTL_SCSI_PASS_THROUGH,
m_sptWithBuffer,
sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS),
m_sptWithBuffer,
length,
&dwReturned,
NULL);
Problem I am facing:-

1) While reading data from device we use DeviceIoControl(), it works fine but sometime I face below issue,
After DeviceIoControl() call, m_sptWithBuffer->spt.ScsiStatus is coming as 02h and after this if we make any further calls with device DeviceIOControl() call returns m_sptWithBuffer->spt.ScsiStatus as 28h as status and all next call will return 28h only.
To make my application work I need to restart my System(PC).
From Wikipedia I got to know 02h is for Check Condition and 28h Task Set Full but don’t know how to handle them.

Can any device driver exters please help me on this.
Why I am getting 02h and 28h error? Is there any way to avoid this error or any way after getting this error to make it work.

2) Also I have observed one thing if my application is connected and read data from device and if launch another application which also do same job like my application if it trys to connect on same SCSI port. I will get 02H error onces and after that 28H error on every call. And other application is not also connecting, so I need to reboot my system to make it work. Same problem will come if other application is running and we launch our application.

Can you please share your thoughts on this.

Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900