I m writing program for USB host Virtual com port(LPC1768). May be this question found silly but this is confusing me.
Im getting frames correctly upto get line coding After that host is not responding to the device.I m continously getting NACK after every IN after get line coding.
Second issue is i can see the comp port in com port list. I installed drivers through inf file. But when i tried to open the comp port it shows "error: unable to open the com port".reasone for this is the code issue or the drivers issue.
I m bit confuse with the flow of frames in the virtual com port. can any one tell me the flow of frames.which will be the next frame after get line coding.what happened when this frame comes in a picture in hardware point of view.
Hii John
Thank you so much for reply. I read the link you posted in the last reply. I understood resone of getting NACK after IN. But I m not cleared with the same question i asked before. Why i m unable to open the com port.
One more thing i wanted to discuss when i tried to debug code i fund that i m not acheieving the satisfactory conditions for code to process get line coding. That is before we look for get line coding as keil example tested index (16 bit wide) of control request is not equal to control interface number ( 8 bit wide).if those are not equal it will give error.And my processing will be stopped.
if (USB_ControlRequest.wIndex != CDCInterfaceInfo->Config.ControlInterfaceNumber) return;
as interface number is not matched i m not able to ON the com port. May i get the reasone for this.
When i asked for Get_IN_line coding what happens at device.i understand that after i ask for get line coding device reply ack to host then host send IN packet.As device dont have data to send to the device it sends NACK right? But what exactly the reasone device dont have data to send. Is it possible that com port is not properly set ? because of that I m unable to open com port.
I don't know much about USB and USBCDC. I had some experience in USBCDC development, but it was long ago (2010). And during that period, I had access to an TotalPhase Beagle USB 480 Protocol Analyzer; now I have nothing.
I would suggest you to use a working well USBCDC device, and an USB Analyzer, study how it works by looking at the class level communication monitored by USB Analyzer. Comparing the difference between the working well device and your device.