- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to read the serial number(SN) from the descriptor in a C++ code in Linux by libusb_get_string_descriptor_ascii.
I read the SN first, then program a new .img file with a different serial number, a soft reset, and then read SN again. So I read the SN twice in my code.
The first time that I read SN, it is ok. but at the second read, it gives me garbage values for SN. It looks like that libusb_get_string_descriptor_ascii has some problem after doing a board soft reset.
I added a delay after soft reset by usleep to let the board reset properly, but if it was more than a few milliseconds, the interface claiming failed as well. Small delay didn't solve the problem.
Do you have any idea for that? If it is libusb_get_string_descriptor_ascii problem, is there any command instead of that to solve the problem? I should mention that I don't have this issue in windows version.
Thanks
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
After reset libusb_get_string_descriptor_ascii return -4 (no device found) for all commands.
The problem was solved by pause and open it again.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
To understand the problem better, please let me know if reading of other descriptors for example configuration descriptor happens as expected after the soft reset or garbage is seen.
Also, let me know if libusb_get_string_descriptor_ascii returns success for second time
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
After reset libusb_get_string_descriptor_ascii return -4 (no device found) for all commands.
The problem was solved by pause and open it again.
Thanks