v-ivanyshyn / mqb-steering-wheel-adapter

MQB steering wheel adapter to retrofit into PQ46 platform (VW Passat b6/b7, CC)
44 stars 20 forks source link

Short Questions about Timing etc #1

Closed EliasKotlyar closed 2 years ago

EliasKotlyar commented 3 years ago

Hello @v-ivanyshyn

I am currently tinkering around with my new steering wheel(VW Golf 7 Sport Steering Wheel) and trying to adopt it to my PQ35 Car (VW EOS 2008). I stumbled across your project and need to express my gratitude. It really helps to see an implementation! Before i was using certain blog-posts for getting some results.

It would really help if you could answer my questions:

  1. My Steering Wheel looks different to the ones described in "firmwares". It has a button with a "shacking car" instead of "CNL" Button. Does it need special LIN-IDs/something different to drive it? Here is a picture: Steering Wheel

  2. I am currently sending different LIN-IDs to poll it with following timings: RTR Message - 0x0F - every 100ms RTR Message - 0x0E - every 100ms Normal Message - 0x0F with Payload (0x1A ,0xF9, 0xFF,0xFF) - every 200ms

However the background stays off and there is no change in messages. I am getting following messages:

0x0F:

  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  F4 41 80 2A 00 00 00 00
  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  50 42 80 2A 00 00 00 00
  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  08 43 80 2A 00 00 00 00
  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  88 44 80 2A 00 00 00 00
  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  2D 45 80 2A 00 00 00 00
  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  34 46 80 2A 00 00 00 00
  sllin0       00F   [0]  remote request
  sllin0       00F   [8]  11 47 80 2A 00 00 00 00

0x0E:

  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  90 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  81 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  92 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  83 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  94 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  85 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  86 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  87 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  88 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  89 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  8A 00 00 00 90 00 00 00
  sllin0       00E   [0]  remote request
  sllin0       00E   [8]  8B 00 00 00 90 00 00 00

It does not matter if i press some button or not, it does not change anything. Also if i send 0x0F with payload, it does not light up

Any Idea how i can get it working? Am i missing something? My code can be found here: https://github.com/EliasKotlyar/MQB-SteeringWheel

Many thanks in Advance Greatings Elias

Georgy-Garnov commented 2 years ago

Exists code in your repository did not provide clear vision how is it working. Which device are you using? can.interface.Bus(channel="sllin0", bustype="socketcan") what is this stack/class? how is it workinп? Why is it called CAN but not LIN? Did transfer for LIN starts with SYNC 0x55? But since you getting answers it seems that it's working. Maybe there is some wrong connections with steering wheel? No power on some pin for example? Also you can try to query other responders not only 0x0F, 0x0E. Also you have error in sending Light data it's ID is 0x0D not 0x0F. There is also not clear if you sending checksum with light data.

EliasKotlyar commented 2 years ago

@Georgy-Garnov: I figured it out by now. My hardware which i was using was an macchina p1, which is a linux based device having automotive interfaces. I was using the default implementation of lin-bus called "linux-lin" based on socketcan. Thats why its confusing with "can" and "lin". The library should be responsible for all checksum calculations etc. However it turned out that the library is not very stable, so i stopped progress on that.

I was able to make it run on a ESP32 Board which had the interfaces already applied. My implementation can be found here: https://github.com/EliasKotlyar/MQB-SteeringWheel/tree/master/esp32/MQB-SteeringWheel/src

Its basically the same - I am using a different LIN-Library so i could use a more modular approach. I want to do the same on a PQ35 Golf 5 Platform, and considering using CAN-Messages instead of Opto-Couplers.

@v-ivanyshyn Many thanks for sharing this library!