I am developing a driver application and monitoring bus activity using a
Hitex USB Agent.
I need to send the USB device some set-up info shortly after enumeration and
prior to the commencement of polling. The crucial bit of the device
insertion callback goes as follows :
{
//---- Carry out enumeration and connect pipes
sleep(1);
if( pod->ep_cntl_buff ) {
pod->ep_cntl_buf[0] = 21;
turb = usbd_alloc_urb( NULL );
usbd_setup_bulk( turb, URB_DIR_OUT, pod->ep_cntl_buf, 6 );
usbd_io( turb, pod->ep_cntl, NULL, pod, USBD_TIME_INFINITY );
}
//---- Start polling
}
The result on the bus is…
__
1230____: Idle(14) EOP(0x2)
__
1231____: Idle(5) SYNC(00000001) SETUP(0x2d) ADDR(0x1) EP(0x0) CRC5(0x17)
__
1232____: Idle(5) SYNC(00000001) DATA0(0xc3) DATA(0 00 00 00 00 00 06 00)
CRC16(0x3d2a)
__
1233____: Idle(6) SYNC(00000001) ACK(0xd2)
__
1234____: Idle(16) EOP(0x2)
__
1235____: Idle(14) EOP(0x2)
__
1236____: Idle(4) SYNC(00000001) OUT(0xe1) ADDR(0x1) EP(0x0) CRC5(0x17)
__
1237____: Idle(5) SYNC(00000001) DATA1(0x4b) DATA(15 00 00 00 00 00)
CRC16(0xbf84)
__
1238____: Idle(6) SYNC(00000001) STALL(0x1e)
__
1239____: Idle(16) EOP(0x2)
The SETUP message (frames 1231 + 1232) is a GET_STATUS, and the bulk
transfer is 1236 + 1237.
The fact that the USB device does not respond to the GET_STATUS and the
subsequent STALL is my problem.
My question is, does the USB stack always send out a request for status
prior to performing an OUT data transfer to a device?
TIA
Jim Douglas