The device appears, but data is missing

… visits
Parent Previous Next

When the PC recognizes and configures the device, the early control exchange has worked. Test the application data path next.

Match the symptom to a check

Symptom

Check next

HID app cannot find the device

Actual VID/PID, selected report profile, interface/usage filtering and report lengths.

A HID report is shifted by one byte

Whether the PC HID API expects an extra Report-ID placeholder; it is not automatically part of the firmware report.

USB_Write() repeatedly says busy

Whether the host is reading that endpoint, whether service continues, and whether earlier packets are still queued.

USB_Read() says no data

Whether the PC actually sent an output report/bytes; this result is normal when nothing has arrived.

CDC stays offline after opening the COM port

Configuration, suspend state and the selected DTR requirement.

CDC text arrives in bursts

Terminal read behavior, packet lengths, bulk short-packet/ZLP completion and application framing; see CDC serial communication.

Keyboard repeats a key

A missing or unsuccessful release report; preserve press/release order and check both send results.

MSC reports an I/O error

Foreground USB_MSCService(), correct file index/offset/length, one completion per request and successful backend storage.

Browser page displays but values do not change

Regular USB_NetworkService(), correct value count/names, correct fetch address and JavaScript request handling.

Browser input returns 409

The chosen input slot still contains an unread command; consume it with USB_NetReadValue().

If a serial program fails while opening the port

Check the CDC control-request exchange as well as your application code. Seeing a COM port does not prove that every line-setting request was accepted.

If the PC program stops when you unplug USB

A disconnect-related I/O exception may be the expected result of unplugging, rather than a failure during a connected transfer. The PC program should close the old handle, update its connection state and reconnect when appropriate. Firmware cannot keep an unplugged Windows handle usable.

See also

Created with the Personal Edition of HelpNDoc: Experience the power of a responsive website for your documentation