09/06/2022 at 20:09 •
The groundwork for getting started on this project was laid out in this 2018 EEVBlog forum post.
In it, Luiz Renault suggests the data rate is 512kbit/s based on the smallest pulse width. My results before vary slightly but should be in the same range.
The minimal bit length looks to be ~1.740us, not far off Luiz's 1.960us that can be seen in the scope shot in the second post. So 512kbit/s seems like a reasonable rounding point. Luiz also indicated they were able to decode the data, but not what the content looked like. There was also no indication of byte size, start/stop bits. So more digging....
The next image is a single frame.
Yellow is STM32 #PA9 (USART1_TX) <> VP230 #D (input)
Cyan is STM32 #PA10 (USART1_RX) <> VP230 #R (output)
Connecting a UART RX pin to the STM TX pin yields some results but things are inconsistent. At 512kbit/s nothing seems to change in the stream when messages are sent, to say, activate a feeder. Instead the same 3 bytes are seen, 0x00, 0xe0, 0xf0. By contrast when I previously thought the baud rate was 460800 I could see a noticeable 'shift' when sending commands. I've tried both 1 or 2 stop bits but cannot notice any change.
When connecting RXs together to listen to 'return data' only the 0x00 and 0xf0 bytes are seen. When sending commands this time, it seems like that data... might be changing but it's inconsistent, and seemingly no matter which feeder I test the same byes is sent. 0xf8.
Not sure what to poke next here, I've been looking into using TIOCGICOUNT to check for framing errors, possibly yielding the (in)correct baud rate, but its always returning 0 so unsure if that's even working.
Looking forward to some suggestions.