Need Help: LPF2 UART Protocol / Technical Documentation #2457
Replies: 2 comments 1 reply
-
|
Did you change the baud rate after the handshake? And do you keep sending NACK every 100ms or so to keep the connection alive? If you have a logic analyzer, that makes it easy to see what is actually going on over the wires. That is how I solve most issues like this. |
Beta Was this translation helpful? Give feedback.
-
|
Hey! Thank you for your help! Good point, I tested this with my usb consumer logic analyzer.
After the ACK to the device, I see no data from the device, no data at 2400 baud, and no data at 115200 baud. Interrestingly TX from device to hub stays high for ~700ms after it sends an ack to the hub at the end of the handshake, drops to zero with a framing error, and after around 500ms the handshake starts again. Any ideas? Maybe the UART wiring is faulty, as RX from device to hub is correct, and hub generates the correct handshake data , but maybe the ACK from the hub does not reach the device. A quick connection test showed no issues here. I am a little bit clueless now... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'd like to say thank you for this great project!
I tried to study the technical documentation for the LPF2 UART Protocol, do get in touch with the data flow behind the firmware, just to understand the low level stuff a little bit better.
I also tried to implement the UART device handshake with a Boost Distance Sensor by myself, and I am also getting the TYPE, SPEED and MODE Informational messages. So the documentation is really helpful to implement this.
Now comes the tricky part: After the UART handshake and sending an ACK to the device, I am just getting zeroes back, so SYNC Messages from the device. According to the documentation I should see data messages. I checked the baud rate and the whole serial configuration and it seems to be correct to me. However, If someone has a hint where to continue my investigation about what is going on I would really appreciate this. I tested the implementation with a Lego technic motor, and I am getting the same effect, so I assume my implementation is faulty. I can rule out wiring issues as UART communication works well with a simple loopback (TX->RX) wiring.
I know this protocol is not officially documented, and of course it is not the role of the pybricks community so support it and fill the gap, but if someone has an idea where to take a look at, maybe the pybricks firmware part handling the handschake, I would love to by a coffee for that!
Thank you all,
Mirko
Beta Was this translation helpful? Give feedback.
All reactions