Need help with fanatec and rpi

Need help? Ask here and someone will help
Post Reply
Shinu
Posts: 5
Joined: Sat Jun 25, 2016 4:26 am

Need help with fanatec and rpi

Post by Shinu »

I'm using csw v2 in ps3 mode (It emulates g27)

I tested my USB adapter and It worked fine with PC, but Raspberry gave me libusb_get_string_descriptor_ascii Pipe error
After some investigating I noticed that fanatec wheels don't give Description string, so I edited that function to return true and recompiled.

Now it gives me "Reset sent to adapter" error and chokes. Any ideas? Thanks
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Need help with fanatec and rpi

Post by Matlo »

Moved to the support section.
Please provide full log files (one with the official GIMX package, and another one with your modifications).
GIMX creator
Shinu
Posts: 5
Joined: Sat Jun 25, 2016 4:26 am

Re: Need help with fanatec and rpi

Post by Shinu »

It changed a little

With my edit:

Code: Select all

  GNU nano 2.2.6                                            File: log.txt                                                                                               

global option -l with value `log.txt'
global option -c with value `LogitechG27_G29.xml'
controller #1: option -p with value `/dev/ttyUSB0'
now reading arguments for controller #2
status flag is set
subpos flag is set
force_updates flag is set
GIMX 0.00 ARMv6
Raspbian GNU/Linux 8.0 (jessie)
Linux 4.4.13+ #894 Mon Jun 13 12:43:26 BST 2016 unknown
Bus 001 Device 005: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 008: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter
Bus 001 Device 007: ID 054c:05c4 Sony Corp. DualShock 4
Bus 001 Device 011: ID 046d:c29b Logitech, Inc. G27 Racing Wheel
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. SMC9512/9514 USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 2: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 4: Dev 8, If 0, Class=Vendor Specific Class, Driver=rt73usb, 480M
        |__ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
native mode is already enabled for HID device 01:01:02:01 (PID=c29b)
Detected USB adapter: G29 PS4.
using default refresh period: 5.00ms
joystick not found: G27 Racing Wheel 0
closing unused uhid joysticks... done
Warning: can't open macro directory /home/pi//.gimx//macros/
0 1466882329.525996
Exiting
closing uhid joysticks (it may take a few seconds)


Original:

Code: Select all

  GNU nano 2.2.6                                            File: log.txt                                                                                               

global option -l with value `log.txt'
global option -c with value `LogitechG27_G29.xml'
controller #1: option -p with value `/dev/ttyUSB0'
now reading arguments for controller #2
status flag is set
subpos flag is set
force_updates flag is set
GIMX 5.8 ARMv6
Raspbian GNU/Linux 8.0 (jessie)
Linux 4.4.13+ #894 Mon Jun 13 12:43:26 BST 2016 unknown
Bus 001 Device 005: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 008: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter
Bus 001 Device 007: ID 054c:05c4 Sony Corp. DualShock 4
Bus 001 Device 011: ID 046d:c29b Logitech, Inc. G27 Racing Wheel
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. SMC9512/9514 USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 1: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 2: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 4: Dev 8, If 0, Class=Vendor Specific Class, Driver=rt73usb, 480M
        |__ Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M
src/linux/usbhidasync.c:474 get_string_descriptor_ascii: libusb_get_string_descriptor_ascii failed with error: Pipe error
Detected USB adapter: G29 PS4.
using default refresh period: 5.00ms
src/linux/usbhidasync.c:474 get_string_descriptor_ascii: libusb_get_string_descriptor_ascii failed with error: Pipe error
joystick not found: G27 Racing Wheel 0
closing unused uhid joysticks... done
Warning: can't open macro directory /home/pi//.gimx//macros/
0 1466882971.583458
1466883159.701918 timer fired 2 times...
Exiting
closing uhid joysticks (it may take a few seconds)
Got some free time and did a "dirty: hack and it seams to be working manualy overriding iProduct string

I will test it and later analyze the code more to make a cleaner solution.

Is it a known problem?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Need help with fanatec and rpi

Post by Matlo »

Instead of modifying the software, you should replace the joystick name in the configuration.
Replace "G27 Racing Wheel" with "HID 046d:c29b".
GIMX creator
Shinu
Posts: 5
Joined: Sat Jun 25, 2016 4:26 am

Re: Need help with fanatec and rpi

Post by Shinu »

Okay thanks.
But software to my understanding (after quick look, because rpi lags ) is getting descriptor from libusb function and then compares it. Libusb function itself returns error because the string is empty.
Non the less I will try it after RMA (cooling fan is acting up)
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: Need help with fanatec and rpi

Post by Matlo »

GIMX uses the device name to identify the device.
The operating system (GNU/Linux) builds the device name from the vendor and product strings.
If these strings are missing, it builds a device name from the vendor and product ids: "HID VID:PID".
Try detecting some event in gimx-config, you'll see what's the device name of your wheel.
GIMX creator
Post Reply