fx3 receives a control write transfer but the host receives a response with USB status: No such file or directory (-ENOENT) (-2)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Ready
Level 2
Level 2
10 sign-ins 10 replies posted 5 sign-ins

Hello, I met a following error recently on FX3:

  1. First I sent a control write transfer to the fx3 from the host
  2. The fx3 needs some time to process it, but the host receives a response with URB status: No such file or directory (-ENOENT) (-2)
  3. The host send the same control write transfer to the fx3 again
  4. This time the response becomes a USB status: URB status: Protocol error (-EPROTO) (-71)

Please see the attach capture, thanks in advance

0 Likes
1 Solution

Hello,

I noticed that you are using a different PID for your FX3 device.

Please confirm that you have included the VID PID in cyusb.conf (configuration file) of FX3 SDK for Linux

Regards,
Rashi

View solution in original post

0 Likes
17 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know which API is being used for sending the control request to FX3. If possible, please share the code snippet of the host application when the request is sent.

Are any transfers done to /from FX3 before sending the control request?

Regards,
Rashi
0 Likes

Hello, I send the control transfer through cyusb_linux, the configuration is shown below. It is the first command send to the fx3. 

Ready_0-1659685917215.png

 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know why is the device type coming up as "FX2" instead of "FX3". Could you please select the device from the list of devices and then do the transfers

Regards,
Rashi
0 Likes

Hello, even if I select the device, it still give the same results. 

Ready_0-1659687363434.png

 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know which firmware is being used for this test. Is the vendor command handled in the firmware?

Regards,
Rashi
0 Likes

Hello, this is developed by ourselves, and the vendor command is handled in the firmware. But before call CyU3PUsbGetEP0Data , there is some time delay in the firmware. Even though if the delay cause a timeout, it still shouldn't give No such file or directory (-ENOENT) (-2) error, right?

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Yes, your understanding is correct.

Does removing the delay before CyU3PUsbGetEP0Data improve the issue?

Also, let me know if any USB transfers are done before sending this vendor command. If yes, where the transfers successful?

 

Regards,
Rashi
0 Likes

Hello, I modified the cyfxbuldsrcsing demo (add a new case to handle bRequest=0xB4) and got the same error: No such file or directory (-ENOENT) (-2). I have attached the code and wireshark capture. 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know which driver version and OS/kernel version are you using. Also, can you try using command line applications in the fX3 SDK for Linux and check if that is working fine?

Regards,
Rashi
0 Likes

Hello, do you know how to check the driver version and OS/kernel version? I used the cyusb_linux to send control transfer.

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please let me know the driver/libusb version using this command.

dpkg -l libusb-1.0*

Also, let me know the OS/kernel version

uname -r/uname -a

 

Regards,
Rashi
0 Likes

Hello, thanks for your reply, here are the results:

 

~$ dpkg -l libusb-1.0*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================-================-============-===================================================
ii libusb-1.0-0:amd64 2:1.0.23-2build1 amd64 userspace USB programming library
ii libusb-1.0-0-dev:amd64 2:1.0.23-2build1 amd64 userspace USB programming library development files
ii libusb-1.0-doc 2:1.0.23-2build1 all documentation for userspace USB programming

 

~$ uname -r
5.15.0-46-generic

 

~$ uname -a
Linux yudi-office-ubuntu 5.15.0-46-generic #49~20.04.1-Ubuntu SMP Thu Aug 4 19:15:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

 

0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Apologies for the delay in response.

Please let me know if the default vendor requests in the USBBulkSrcSink pass on your setup. Please follow this  test sequence

- Program FX3 with Default BulkSrcSink firmware

- After the device enumerates (check using command lsusb -v ), try sending the the vendor request supported by UsbBulkSrcSink for example

Direction: IN Request: Vendor Target: Device

bReq = 0x82               wLength / bytes to transfer = 32

wValue = 0                    wIndex =0

Regards,
Rashi
0 Likes

Hello,

I noticed that you are using a different PID for your FX3 device.

Please confirm that you have included the VID PID in cyusb.conf (configuration file) of FX3 SDK for Linux

Regards,
Rashi
0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

Please try to use VID: PID  - 0x04b4: 0x00f1 (same as Usbbulksrcsink) in your firmware and let me know if it works

Regards,
Rashi
0 Likes
Ready
Level 2
Level 2
10 sign-ins 10 replies posted 5 sign-ins

Hello, do you have any update about it? I'm wondering if you could reproduce it on your side with the code 🙂

0 Likes