Question about host usb hid on imxrt1010 connected with PS3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about host usb hid on imxrt1010 connected with PS3

866 Views
minhthuc2502
Contributor I

Hi all,

When i customized the example host_hid_generic_bm on board imxrt1010, i had a problem that the function callback USB_HostHidInCallback is not returned even the failed status. But after unplugging the joystick PS3,  this function will be called for one times. I can't understand what is  the influence of the action plugging on the function callback. Someone can figure out what is the problem in this case, please?

Can i create a host usb hid for imxrt1010 for the controller PS3 or this host usb can run only with mouse, keyboard, generic? 

 

Regards

Thuc 

Tags (4)
0 Kudos
5 Replies

756 Views
minhthuc2502
Contributor I

Hi,

Thank you for your reply. Maybe i didn't say clearly my problem. In fact, i checked several times and i'm sure that my controller PS3 having USB_HOST_CLASS_CODE is 3 so it is usb hid. My controller have been detected correctly with the example USB HID generic. The problem occurs in the phase communication between the controller and the board. I can set interface for the controller but 2 steps (Set idle and set protocol) can't be done with the message "This device is not supported". I found some information about that and i thought that theses request is not obligatory with a device which just support report protocol. So i commented theses steps and try to receive data from controller directly after setting interface. I recognized when i call USB_HostHidSend, the function callback is returned after that, it means that the board sent successfully somethings to the controller. But in the direction opposite, when i used USB_HostHidRecv, the function callback registered is never returned. I think that the controller never sent anything to board imx, so this transmission never end. I can't understand where is the problem, because of my configuration in usb_host_config.h not compatible with my controller or something like usb host stack NXP don't support some device special like PS3.

Best regards,

Thuc

0 Kudos

756 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Thuc,

 

I recommend you to check this using USB analyzer so you have more information on what's going on with the transactions. Unfortunately, we do not have information related to the usage of PS3 controller with our USB examples.

 

Best regards,

Felipe

0 Kudos

756 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Thuc,

 

Unfortunately, we do not have an implementation for this. However, I recommend you to download the documentation package for the corresponding SDK. MCUXpresso SDK USB Stack document gives some guidelines when developing a new USB host application.

 

Best regards,

Felipe

0 Kudos

756 Views
minhthuc2502
Contributor I

Hi,

thank you for your reply. In fact, i find the problem is that the event on in pipe never is never activated. It seem that the joystick doesn't send anything to host so that the callback function USB_HostHidInCallback is never called. But i think if anything is sent to host, it will call also callback function but with the status failed. Do you think this is the problem with my configuration for host usb or the driver usb host hid can't interact with my joystick and i can't use this driver ?

Best regards,

Thuc

0 Kudos

756 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Thuc,

 

I checked this on my side using a PS4 controller, please see my findings below.

 

When I attached my controller to the i.MX RT board, the kUSB_HostEventAttach was detected in USB_HostHidGenericEvent callback. However, it entered to the condition highlighted below.

USB_HOST_CLASS_CODE must be equal to 3, in the PS4 controller id is equal to 1.

pastedImage_4.png

This means that the controller is Audio class not HID class according to USB defined class codes (https://www.usb.org/defined-class-codes). You can try this with dualshock 3 to see if the behavior is the same.

pastedImage_9.png

Hope it helps!

 

Best regards,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored.

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

------------------------------------------------------------------------------ 

0 Kudos