PS4 Joystick with Drive PX2

Hi,

I’m currently working on a vehicle that requires to have a joystick connected to a Drive PX2. I just had to re-flash the board due to an issue that no one in my team was able to solve. I did that using
DriveInstall_5.0.5.0bL_SDK_b3.run
following the steps given at
https://docs.nvidia.com/drive/driveinstall_docs/
The flashing process was successful (or at least I didn’t get any error), and I was able to login and start working on the board. The only thing that I did up to now is installing ROS as explained here:
https://devtalk.nvidia.com/default/topic/1032204/faq/drive-px2-ros-installation/

My problem now is that the system doesn’t recognize the PS4 joystick I was using before the re-flashing. The joystick doesn’t appear in /dev/input as it used to (usually it was shown as js0). I tried using jstest-gtk and, as expected, the joystick is not listed.

I’m not an expert Linux user, so I don’t know if this makes sense or not, but my feeling is that a driver is missing. My understanding is that the drivers for the main joystick brands should be included in the kernel of the most recent versions of Linux, but I cannot find them in the Drive PX. I think (please correct me if I’m wrong), that this:
https://www.kernel.org/doc/html/v4.17/input/joydev/index.html
is the piece of kernel I should be looking for, but doing modprobe joydev gives me a “module not found” error.

I tried googling for an answer but I cannot find any easy solution, and I don’t want to compromise the board by doing something “deeper” that I don’t fully understand.

Any help on this would be much appreciated!
Thanks,
Filippo

Dear Filippo,

I have a quick question about ‘My problem now is that the system doesn’t recognize the PS4 joystick I was using before the re-flashing.
Does the PS4 joystick not work after flash the PDK? After installing the ROS, does the PS4 joystick not work? Thanks.

It doesn’t work after flash the PDK. It doesn’t work right after the flash and neither after installing ROS (and the relative joystick package, ‘joy’).

Before the re-flash I was able to interface the joystick without installing any driver, just the ROS package. However, I’m not the one who set up the Drive PX2 the first time, so I’m not sure about how the PDK was set up before the re-flash…

Dear Filippo,

I’d like to make two suggestions on this matter.

  1. Here’s how to try flash with the older PDK.
    The reason is that it is likely to be deleted from the latest PDK version default kernel config.
    https://developer.nvidia.com/drive-archive

  2. The fastest path would be for them to rebuild the kernel with the correct kernel config option.
    https://docs.nvidia.com/drive/nvvib_docs/index.html#page/NVIDIA%2520DRIVE%2520Linux%2520SDK%2520Development%2520Guide%2FSystem%2520Programming%2Fsys_programming_kernel_toolchain.html%23wwconnect_header

Thanks Steve, solution 1 is exactly what I was looking for and it worked perfectly! I have another Drive PX on which I’ll try solution 2, and I’ll post here the results.

Thank you again for your help!!!

Hi Steve,

I’m testing your solution 2. on the second platform (flashed with 5050bL_SDK). I almost succeeded, but I’m probably missing a step or doing something wrong. This is the first time I manually build the kernel, and even if I did some research I’m still not sure I got all the steps correctly.

These are the steps that I have been following:

  1. Compile the kernel following steps 1 to 5 as per https://docs.nvidia.com/drive/nvvib_docs/index.html#page/NVIDIA%2520DRIVE%2520Linux%2520SDK%2520Development%2520Guide%2FSystem%2520Programming%2Fsys_programming_kernel_toolchain.html%23wwconnect_header%234
  2. Change the .config using ``` make -C kernel O=${PWD}/out-t186ref-linux xconfig ```

    In particular I just ticked ‘Joystick interface’ under Device Drivers/Input device support/Joystick interface

  3. Build the kernel following steps 6 to 9 as per the previous link
  4. Flash it on the board using ``` cd /drive-t186ref-foundation/ make -f Makefile.bind BOARD=p2379c01-t186a PCT=linux make -f Makefile.bind BOARD=p2379c01-t186b PCT=linux ./utils/scripts/bootburn/bootburn.sh -b p2379c01-t186 -R -x /dev/ttyUSB1 ```

Now, as soon as the kernel was flashed I logged into the TegraA, connected the joystick and it was indeed displayed as js0 under /dev/input. However, after switching the board of and then back on the joystick was not recognized anymore as js*, but just as event*.

Am I missing something? It looks like the driver I needed was loaded with the flash but not permanently…

Thanks,
Filippo

Dear fparrav,

I’m checking and will update you as soon as I check. Thanks.

I have the same issue here. @fparrav Do you have the same error listed below?

/home/$USERNAME/NVIDIA/Drive/5050bL_SDK/DriveSDK/drive-t186ref-foundation/utils/scripts/bootburn/bootburn_lib.sh: line 130: 19351 Killed                  tail -f ${s_FlashLogFiles[@]}
stty: /dev/ttyUSB1: unable to perform all requested operations
Unable to restore Aurix Console Params

Bootburn operation successful

I have the same issue here. @fparrav Do you have the same error listed below?

/home/$USERNAME/NVIDIA/Drive/5050bL_SDK/DriveSDK/drive-t186ref-foundation/utils/scripts/bootburn/bootburn_lib.sh: line 130: 19351 Killed                  tail -f ${s_FlashLogFiles[@]}
stty: /dev/ttyUSB1: unable to perform all requested operations
Unable to restore Aurix Console Params

Bootburn operation successful

Dear sf2584,

We’ve posted new PDK and DW on developer.com.
Could you please check if this symptom is reproduced after updating with new PDK and DriveWorks? Thanks.

Hi SteveNV

Do you mean the NVIDIA™ SDK Manager Version: 0.9.8.2002? Do you know where is the release note and dev guide about this? My current system relies on the NVIDIA DRIVE 5.0.5.0bL, I’m not sure if it will work if I move everything to the new platform.

Hi sf2584,

Yes, please use the NVIDIA™ SDK Manager to move your DRIVE PX2 to newer PDK and SDK version.
The support on new platform will be more sufficient while met issue.

Thanks

Dear sf2584,

We’ve posted new PDK and SDK doc on below, please refer to the links. Thanks.
https://docs.nvidia.com/drive/active/5.0.10.3L/nvvib_docs/index.html
https://docs.nvidia.com/drive/active/5.0.10.3L/pdfs/NVIDIA_DRIVE_5.0_Linux_DPX2_Release_Notes_5.0.10.3.pdf

Hello,

We are trying to do the same in enabling a game controller to work with the PX2 (specifically the Logitech Gamepad F310), but we’re getting an error with bootburn. This is the full output we get when we attempt to run bootburn similar to how fparrav did.

./bootburn.sh -b p2379c01-t186 -x /dev/ttyUSB1

Successfully acquired lock over /var/lock/LCK..bootburn_seq
Successfully acquired lock over /var/lock/LCK..ttyUSB1
Disabling SIGINT <Ctrl+C> temporarily
Setting Tegra-A on hold.../dev/ttyUSB1:       
cat: /dev/ttyUSB1: Resource temporarily unavailable
Could not execute command "tegrareset a h" on aurix. Log follows,

 ------------ Stack Trace ------------
stack frame 0 - 384 AbnormalTermination /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_lib.sh
stack frame 1 - 284 ExecuteAurixCommand /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_target.sh
stack frame 2 - 134 GetTegrasAssocWithAurix /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_target.sh
stack frame 3 - 360 CheckRecoveryTargets /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_target.sh
stack frame 4 - 457 SequencerSetupTarget /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_sequencer.sh
stack frame 5 - 475 SeqFlashTarget /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_sequencer.sh
stack frame 6 - 518 source /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_sequencer.sh
stack frame 7 - 318 source /home/mdas/nvidia/nvidia_sdk/DRIVE/Linux/5.0.10.3/OS/DriveSDK/drive-t186ref-foundation/tools/host/flashtools/bootburn/bootburn_core.sh
stack frame 8 - 44 main ./bootburn.sh
-------------------------------------

error-aurix-command
stty: /dev/ttyUSB1: unable to perform all requested operations
Unable to restore Aurix Console Params

Bootburn operation unsuccessful

The following tips can help troubleshoot bootburn failures. These are based on
known issues related to setup or missing configuration. If it doesn't help
resolve the issue, contact module owners with a copy of the full log.

error= error-aurix-command

* The Aurix console did not regognize the command given to it.  Please review
  the logs and make sure that the command that you are sending is valid

Dear bjsmyth,

Could you please check you have done “2. Close the AURIX console and make sure no other process is accessing it.” below?

https://docs.nvidia.com/drive/active/5.0.10.3L/nvvib_docs/index.html#page/NVIDIA%2520DRIVE%2520Linux%2520SDK%2520Development%2520Guide%2FFlashing%2Fflashing_lnx.html%23wwpID0E0NF0HA

Flash both DRIVE PX 2 ACh Tegra devices in parallel
For DRIVE™ PX 2 ACh (P2379), both Tegra devices can be flashed in parallel, using this procedure. The procedure also eliminates the need to put the Tegra processor(s) in recovery.

  1. Determine the serial port of the AURIX port on your host.
    2. Close the AURIX console and make sure no other process is accessing it.
  2. Flash both DRIVE PX 2 Tegra devices in parallel with the following command (where AURIX enumerates at /dev/ttyUSB1):
    ./bootburn.sh -b -x /dev/ttyUSB1 <other_options_and_parameters>
    Where is:
    • p2379c01-t186 to flash Tegra A and B simultaneously
    • p2379c01-t186a to flash Tegra A only
    • p2379c01-t186b to flash Tegra B only