Ping protocol communication

I have tried to communicate with the sensor according to the request-answer negotiation example present on the website Ping Protocol. I have sent the 12 bytes packet (66-82-2-6-0-0-5-161 dec) but no answer occurred. I have so connected the pinger to the pc and used the ping viewer software with good results as I expected. When I peeked the exchanged data on the serial port I have noticed the ASCII header “BR” in some messages but the packet is not accordant with the message format of the protocol shown on the website (i.e after the BR heading should be specified the payload length which is instead 00 or e2). I would like to replicate this communication without using the software but instead with a ECU. I attach two screenshots of the peeking.

Hi @lorenzo1, welcome to the forum :slight_smile:

I’d recommend you have a read of this comment (and the post it’s in as relevant).

00 00 is a payload length of 0 bytes. The following two bytes BD 04 ends up as message ID 1213 ((0x04 << 8) + 0xBD), which is a processor temperature message from the sonar, which should have two bytes of payload but apparently doesn’t in this case.

The next message is voltage_5, and for some reason also has no payload. Both messages have correct checksums, so I assume you’re using a firmware that doesn’t properly support those messages.

Can you confirm which firmware version you’re using?
Ping1D Firmware

If the “Current Firmware” is not already listed as 3.28 then I’d recommend you select that from the dropdown menu and update to it.

Is there a particular reason you’re looking at individual bytes for this? We provide multiple libraries that can be used to parse and send ping protocol messages in a convenient manner: