berarma / oversteer

Steering Wheel Manager for GNU/Linux
GNU General Public License v3.0
575 stars 59 forks source link

Add support for Asetek Tony Kanaan wheelbase, wheel and pedals #160

Open IOBYTE opened 10 months ago

IOBYTE commented 10 months ago

I just purchased an Asetek Tony Kannan bundle from Microcenter. I would like to see this setup supported.

IOBYTE commented 10 months ago

Here is the USB information and a patch that adds the USB ids to oversteer. The wheelbase is detected and displays the wheel rotation. Nothing else works. The wheel is detected as a separate device but trying to select it doesn't work.

file:///home/bob/Asetek%20Tony%20Kanaan.zip file:///home/bob/oversteer/oversteer.diff

IOBYTE commented 10 months ago

The wheel sometimes works for a few seconds and then it switches back to the wheelbase device. You will need to add support for more buttons.

The pedals device is not detected.

Can the software handle a product with different wheelbase, wheel and pedal devices?

IOBYTE commented 10 months ago

Here is the patch:

diff --git a/oversteer/.device_manager.py.swp b/oversteer/.device_manager.py.swp
deleted file mode 100644
index f9f26fe..0000000
Binary files a/oversteer/.device_manager.py.swp and /dev/null differ
diff --git a/oversteer/device_manager.py b/oversteer/device_manager.py
index 2d632d1..3c8f15a 100644
--- a/oversteer/device_manager.py
+++ b/oversteer/device_manager.py
@@ -41,6 +41,9 @@ class DeviceManager:
             wid.FT_PDD2: 1080,
             wid.FT_CSL_DD: 1080,
             wid.XX_FFBOARD: 1080,
+            wid.AT_TK_BASE: 1080,
+            wid.AT_TK_WHEEL: 1080,
+            wid.AT_TK_PEDALS: 1080,
         }
         self.devices = {}
         self.changed = True
diff --git a/oversteer/wheel_ids.py b/oversteer/wheel_ids.py
index 045cdd9..e5219b9 100644
--- a/oversteer/wheel_ids.py
+++ b/oversteer/wheel_ids.py
@@ -1,6 +1,7 @@
 VENDOR_LOGITECH = '046d'
 VENDOR_THRUSTMASTER = '044f'
 VENDOR_FANATEC = '0eb7'
+VENDOR_ASETEK = '2433'

 LG_G29 = '046d:c24f'
 LG_G920 = '046d:c262'
@@ -34,4 +35,7 @@ FT_PDD1 = '0eb7:0006'
 FT_PDD2 = '0eb7:0007'
 FT_CSL_DD = '0eb7:0020'
 XX_FFBOARD = '1209:ffb0'
+AT_TK_BASE = '2433:f306'
+AT_TK_WHEEL = '2433:f206'
+AT_TK_PEDALS = '2433:f106'

Here is the wheelbase:

[Port1]  :  USB Input Device

Is Port User Connectable:         yes
Is Port Debug Capable:            no
Companion Port Number:            0
Companion Hub Symbolic Link Name: 
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "Tony Kanaan Wheelbase"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: Full (is not SuperSpeed or higher capable)
Device Address:                    0x04
Open Pipes:                           2

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
bDeviceSubClass:                   0x00
bDeviceProtocol:                   0x00
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x2433 = Asetek A/S
idProduct:                       0xF306
bcdDevice:                       0x0200
iManufacturer:                     0x01
     English (United States)  "Asetek SimSports"
iProduct:                          0x02
     English (United States)  "Tony Kanaan Wheelbase"
iSerialNumber:                     0x03
     English (United States)  "317E38573031"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0029  -> Validated
bNumInterfaces:                    0x01
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0xC0  -> Self Powered
MaxPower:                          0x32 = 100 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x02
bInterfaceClass:                   0x03  -> HID Interface Class
bInterfaceSubClass:                0x00
bInterfaceProtocol:                0x00
iInterface:                        0x00

          ===>HID Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x21
bcdHID:                          0x0111
bCountryCode:                      0x00
bNumDescriptors:                   0x01
bDescriptorType:                   0x22 (Report Descriptor)
wDescriptorLength:               0x05B9

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

Here is the wheel:

[Port2]  :  USB Input Device

Is Port User Connectable:         yes
Is Port Debug Capable:            no
Companion Port Number:            0
Companion Hub Symbolic Link Name: 
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "Tony Kanaan Wheel"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: Full (is not SuperSpeed or higher capable)
Device Address:                    0x02
Open Pipes:                           2

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
bDeviceSubClass:                   0x00
bDeviceProtocol:                   0x00
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x2433 = Asetek A/S
idProduct:                       0xF206
bcdDevice:                       0x0200
iManufacturer:                     0x01
     English (United States)  "Asetek SimSports"
iProduct:                          0x02
     English (United States)  "Tony Kanaan Wheel"
iSerialNumber:                     0x03
     English (United States)  "5D8D484B3135"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0029  -> Validated
bNumInterfaces:                    0x01
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0x80  -> Bus Powered
MaxPower:                          0xFA = 500 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x02
bInterfaceClass:                   0x03  -> HID Interface Class
bInterfaceSubClass:                0x00
bInterfaceProtocol:                0x00
iInterface:                        0x00

          ===>HID Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x21
bcdHID:                          0x0111
bCountryCode:                      0x00
bNumDescriptors:                   0x01
bDescriptorType:                   0x22 (Report Descriptor)
wDescriptorLength:               0x0062

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

Here is the pedals:

[Port3]  :  USB Input Device

Is Port User Connectable:         yes
Is Port Debug Capable:            no
Companion Port Number:            0
Companion Hub Symbolic Link Name: 
Protocols Supported:
 USB 1.1:                         yes
 USB 2.0:                         yes
 USB 3.0:                         no

Device Power State:               PowerDeviceD0

       ---===>Device Information<===---
English product name: "Tony Kanaan Pedals"

ConnectionStatus:                  
Current Config Value:              0x01  -> Device Bus Speed: Full (is not SuperSpeed or higher capable)
Device Address:                    0x03
Open Pipes:                           2

          ===>Device Descriptor<===
bLength:                           0x12
bDescriptorType:                   0x01
bcdUSB:                          0x0200
bDeviceClass:                      0x00  -> This is an Interface Class Defined Device
bDeviceSubClass:                   0x00
bDeviceProtocol:                   0x00
bMaxPacketSize0:                   0x40 = (64) Bytes
idVendor:                        0x2433 = Asetek A/S
idProduct:                       0xF106
bcdDevice:                       0x0200
iManufacturer:                     0x01
     English (United States)  "Asetek SimSports"
iProduct:                          0x02
     English (United States)  "Tony Kanaan Pedals"
iSerialNumber:                     0x03
     English (United States)  "8D7028964954"
bNumConfigurations:                0x01

          ---===>Open Pipes<===---

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

       ---===>Full Configuration Descriptor<===---

          ===>Configuration Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x02
wTotalLength:                    0x0029  -> Validated
bNumInterfaces:                    0x01
bConfigurationValue:               0x01
iConfiguration:                    0x00
bmAttributes:                      0x80  -> Bus Powered
MaxPower:                          0xFA = 500 mA

          ===>Interface Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x04
bInterfaceNumber:                  0x00
bAlternateSetting:                 0x00
bNumEndpoints:                     0x02
bInterfaceClass:                   0x03  -> HID Interface Class
bInterfaceSubClass:                0x00
bInterfaceProtocol:                0x00
iInterface:                        0x00

          ===>HID Descriptor<===
bLength:                           0x09
bDescriptorType:                   0x21
bcdHID:                          0x0111
bCountryCode:                      0x00
bNumDescriptors:                   0x01
bDescriptorType:                   0x22 (Report Descriptor)
wDescriptorLength:               0x0046

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x81  -> Direction: IN - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01

          ===>Endpoint Descriptor<===
bLength:                           0x07
bDescriptorType:                   0x05
bEndpointAddress:                  0x01  -> Direction: OUT - EndpointID: 1
bmAttributes:                      0x03  -> Interrupt Transfer Type
wMaxPacketSize:                  0x0040 = 0x40 bytes
bInterval:                         0x01
berarma commented 10 months ago

I have to make some fundamental changes to Oversteer for this and similar wheels. I'm thinking of adding dropdown boxes for: base, wheel and pedals. After this is done we can think about mapping controls.

If you want you could already send me the events generated by the devices when acting on them. You can use evtest for this. Simply run evtest on each device, act on each input (axes, buttons, etc.) and copy/paste the output adding comments about which action produced each of the events. I don't need to know the button placement or its name, since Oversteer isn't showing it. You can type "testing buttons" and then paste all the events for the buttons. I need the exact information for correctly mapping the axes though.

Thanks.

IOBYTE commented 10 months ago

Here are the USB ids for all asetek products:

Pedals: 0xF100 - Invicta 0xF101 - Forte 0xF102 - Pagani 0xF103 - La Prima 0xF104 - Invicta S 0xF105 - Forte S 0xF106 - Tony Kanaan Steering Wheels: 0xF201 - Forte 0xF203 - La Prima 0xF206 - Tony Kanaan 0xF207 - Forte Steering Wheel Button Box 0xF208 - La Prima Steering Wheel Button Box Wheelbases: 0xF300 - Invicta 0xF301 - Forte 0xF303 - La Prima 0xF306 - Tony Kanaan

protoz commented 6 days ago

Support for the individual controls for pedals would be great. I have Forte pedals and the g923 Xbox wheel+shifter with plans to go all Asetek. I'm glad the kernel driver for the g923 finally merged in 6.3 but now I'm waiting on pedals before I can make the jump.