- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ;
after having followed https://community.infineon.com/t5/Knowledge-Base-Articles/Configuring-the-USB-serial-number-in-EZ-US... for configuring USB serial number.
I want to know if there is anything possible to read the string using EP0 ?
I did try this code in
BOOL DR_GetDescriptor(void)
{
BYTE length,i;
//pStringDscr = (WORD)&StringDscr;
//pStringDscr3 = (WORD)&StringDscr3;
//pStringDscr3End = (WORD)&StringDscr3End;
switch (SETUPDAT[2])
{
case GD_STRING: //STRING Descriptor
SUDPTRH = MSB(pStringDscr);
SUDPTRL = LSB(pStringDscr);
//return (FALSE);
//case GD_REPORT: //Report Descriptor
length = pStringDscr3End -pStringDscr3;
AUTOPTR1H = MSB(pStringDscr3);
AUTOPTR1L = LSB(pStringDscr3);
for(i=0;i<length;i++)
{
EP0BUF[i]=XAUTODAT1;
}
EP0BCL = length;
return (FALSE);
default:
return(TRUE);
}
}
This code compiles without any error but how do i check the data received ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
String descriptors will provide displayable information describing a descriptor in human-readable form. String descriptors will be obtained from the USB device as part of the device enumeration. USB host gets the set of descriptors including String descriptors from the device during enumeration as per the USB specification.
Based on the index provided in the descriptors, the USB host gets the String descriptors from the device for all the indexes.
You can see all the Strings(Unicode strings in the string descriptor) in the Device details Tab of the Device Manager.
If you want to know when exactly this data is sent to the host, you can use any Hardware Analyzer(like Lecroy) or Software Analyzer(like WireShark).
Thanks,
Ajeeth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
String descriptors will provide displayable information describing a descriptor in human-readable form. String descriptors will be obtained from the USB device as part of the device enumeration. USB host gets the set of descriptors including String descriptors from the device during enumeration as per the USB specification.
Based on the index provided in the descriptors, the USB host gets the String descriptors from the device for all the indexes.
You can see all the Strings(Unicode strings in the string descriptor) in the Device details Tab of the Device Manager.
If you want to know when exactly this data is sent to the host, you can use any Hardware Analyzer(like Lecroy) or Software Analyzer(like WireShark).
Thanks,
Ajeeth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Yes i wanted to check when exactly the data is being sent to the host and hence was checking the wireshark. However i can only see that the strings are being sent.
But I am trying to send that data to the control ep0 via the above method. I dont see anything related to EP0 , which ideally would contain the string data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you share the Wireshark trace(till the enumeration is complete)?
Thanks,
Ajeeth