I am very new to USB programming.
I am working on a full speed USB peripheral.
For now I have two problems, which may be connected to each other.
- The host asks for a device qualifier, which should cause the peripheral to generate a STALL, because the device qualifier should get a reply only from a high speed USB device.
So I am generating the STALL, and the host keeps asking for the device qualifier.
The host keeps resetting the peripheral and it keeps asking for the device qualifier all the time.
At one time I programmed and generated a reply to the device qualifier request, and the host accepted it and continued normally. It enumerates the device, it asks for configuration etc. I still don’t know why it kept insisting. Any ideas?
- After that, it sends me a SETUP with a class request of SET LINE CODING. After the STATUS exchange, it sends a very strange OUT packet at endpoint zero, without first sending a SETUP token: 0x80 0x25 0x00 0x00 0x00 0x00 0x08.
My hardware of course replies with a NAK, because it doesn’t know what to do with it.
I am suspecting that, perhaps, since I answered to the device qualifier, the host could send data at faster rates, and perhaps I am losing data? But this could manifest itself as garbage data, while I am always getting the above message.
Any ideas?