Skip to content

Lin frame problem on Rpico #69

@florent314

Description

@florent314

Hello !

first of all, thank you very much for the work accomplished for this project.

I've encounter lot of pains to make it working. My setup is a brand new CP+ along with a Combi6E. I used a Rpico W with the Lin2UART TJA1020 interface. It did not work and I spent long time to double check hardware connexions.

I finally made a small program to read UART and see something strange, I got frames like the following:
55 3c 7f 06 b2 00 17 46 40 03 27
Indeed, there was no 00 starting byte. Thus the hardware was working but software did not recognize any frame since it is waiting 00 55 !

I guess that sync_break is not recognized since in linbus protocol it should be longer (about 13 bits at 0 > 9bits (8+1stop)).
Is it a Rpico concern ? Is anybody got a similar problem ?

Then I tried to understand how the program works -that is not an easy task, great job!- and slightly modify the loop_serial function in lin.py. A serial.read() is able to read all the frame. I finally successfully registered the fake inetbox.

Would it be possible to share my code ? Maybe it would simplify a little the loop_serial function but I am not sure it will/can work on other devices.

Best regards,

PS: tell me if I can improve the manual. It would be great:

  • to clarify wiring (my RJ12 wire colors seem inverted compared to available pictures ; we must connect RX pin of the lin2UART module to TX pin of the Rpico ; RX pin is TX pin of the TJA1020 ie [TX pin of TJA1020 <-> TX pin of RPico] as in the TJA1020 documentation.
  • Propose a small program to test/debug hardware connexions before configuring in order to check if frames can be read.
  • Give a small explanation of the format of a frame
  • Give a small explanation of the process of registering the device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions