0
\$\begingroup\$

I used a logic analyzer to read the data line from a small camera battery and would like to understand the authentication my camera is doing to the battery over the one data line. Is there any way to identify the communication protocol and other relevant data using pulseview or other logic analyzer software? I see there is a decoder option but my understanding is that will tell you what's going on if you already know the protocol. Is there some type of protocol detection setting?

I cannot ID the chip sending the data to figure out the pinout and have tried to decode the signals with random protocols in PulseView but nothing has come of it. I am new to this so maybe I haven't tried the right protocol yet. It's also possible it's just reading an EPROM ID number but I'm not sure how I can confirm this or the difference between reading eprom vs actually communicating. When the camera cannot communicate with the battery (a third party battery) it powers itself off after a few seconds.

Here's a picture of the data:

enter image description here

\$\endgroup\$
3
  • 1
    \$\begingroup\$ can you perform a capture with the third party battery installed? I suspect the initial short part is the camera asking the battery for the goods, and the second longer part is the battery responding. \$\endgroup\$
    – Bryan
    Jul 3, 2022 at 5:40
  • 1
    \$\begingroup\$ Verify with an oscilloscope first that the data line uses voltages that the logic analyzer can discriminate into logic high and low. A logic analyser capture is only useful if you know that is what is actually happening on wire. \$\endgroup\$
    – Justme
    Jul 3, 2022 at 6:23
  • 1
    \$\begingroup\$ 1-wire communication is usually some sort of pulse-width code. you're going to need finer resolution to see the individual pulses and measure their widths.. \$\endgroup\$ Jul 3, 2022 at 11:03

1 Answer 1

1
\$\begingroup\$

I have to admit that the long times between messages seem rather "fishy" to me : standard protocols are seldomly such low frequency (even if some can be). It might quite well be a custom protocol. Or maybe just 1-wire protocol.

The other bad news is that even if you know the protocol, you still have to make out the meaning of data.

On the other hand, there is probably quite few communication going on, so you might be able to "mimic" the communication without understanding it. You just have to find out what messages the camera is sending the battery, and what the camera has to answer to it.

For this, the first step is to find out who send which data.

For this, you can try to add a small resistor (100 ohms) into the communication line , and measure the voltage at both sides with a scope : it works for example for I2C. If you get no voltage difference, then try adding pull-ups or pull downs. If this works, then you now know who sends which message.

Now all you have to do is monitor all messages sent by the battery itself and send them at the same time, and detect the data paterns sent by the camera and if you see it, send the same answer as observed.

I would also take a look at the data with far bigger zoom, to see the timing of the data (for example 0 might be 33% of period, 1 66%)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.