mc0110 / inetbox2mqtt

communicate over mqtt protocol to simulate a truma inetbox
MIT License
86 stars 19 forks source link

Lin frame problem on Rpico #69

Closed florent314 closed 5 months ago

florent314 commented 7 months ago

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:

mc0110 commented 5 months ago

Your description sounds a little bit tricky. I'm not sure, the explanation will overload the descriptions. My production system is a Rpico without problems using the repo