Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USB CDC not working under Windows
22-07-2014, 02:03 PM, (This post was last modified: 22-07-2014, 02:08 PM by aoc99p.)
RE: USB CDC not working under Windows
… short update on this topic:

CDC communication works fine under Linux... but not on Windows (as described previously). After some intensive time of debugging USB code of Pinguino and tracing & analyzing USB packets, I think I found a coding error...



outPtr = (__data u8 *)&line_config;
wCount = sizeof(USB_CDC_Line_Coding);
requestHandled = 1;

→ outPtr is wrong... it should be "inPtr":


inPtr = (__data u8 *)&line_config;

… same applies on …


outPtr = (__data u8 *)&zlp;
wCount = sizeof(Zero_Packet_Length);
requestHandled = 1;

→ correct is:
inPtr = (__data u8 *)&zlp;

After these two changes, CDC communication is perfectly working under Windows (tested with Windows 7, Vista and XP). Also USB protocol trace shows now a correct protocol behaviour. For me, it seems as if Linux is not really taking care of parameter negotiation (like baudrate, bit size, …), but Windows (or perhaps CDC driver of Microchip) does.


P.S.: in contrast to Linux, not every terminal program under Windows is using flow control when opening a serial connection. Because of

if (SetupPacket.wValue0==3) CONTROL_LINE=1;

this is essential in current Pinguino code. Suggest to introduce a software switch in next Pinguino version to let the user decide if handshake/flow control is wanted or not. Guess this would be a big benefit for Windows community...

Messages In This Thread
USB CDC not working under Windows - by aoc99p - 29-06-2014, 11:22 AM
RE: USB CDC not working under Windows - by aoc99p - 22-07-2014, 02:03 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)