title: How to listen/snoop on all HDMI-CEC traffic?
body: <p>I'd like to see all traffic between connected HDMI devices using a Raspberry PI 4. I need to do this to debug incorrect CEC behaviour. (To sus out what's switching active sources unexpectedly, and where are remote control passthrough messages disappearing.)</p>
  <p>I tried  launching <code>cec-client -m</code> in monitor mode, expecting it would not talk on the CEC line and not influence normal behaviour, although this behaviour is poorly specified. It outputs <code>DEBUG:   [             290]     logical address changed to Free use (e)</code> which I cannot reconcile with the assumption that cec-client doesn't generate traffic in this mode. Why does it need a logical address if it's only listening?</p>
  <p>I've also observed that my Sony Bravia TV periodically says <code>&gt;&gt; 0e:83</code> (give physical address), which is strange considering no device should be seen with logical address E.</p>
  <p>It could be, that the TV is trying to discover new devices, hence it pings addresses that are seemingly empty. This would also explain why the cec-adapter assumes logical adress E on the PI: to filter messages. cec-client only outputs messages addressed to E and F. I see no traffic between my TV (0) and amplifier (5). To test this, I tried changing the logical address to something else <code>la 13</code>, but i get</p>
  <pre><code>la 13
  NOTICE:  [           10167]     setting primary logical address to d
  Segmentation fault
  </code></pre>
  <p>This command doesn't work in monitoring mode. In standard mode it doesn't crash the client, but it's still unable to change the device type from the default Recording 1 to Playback 1 (<code>la 4</code> as an example). I verify this by <code>scan</code>.</p>
  <p>I would like to silently listen in on all messages passed thruogh the CEC line. This question is similar to an unaswered one asked 3 years ago: <a href="https://stackoverflow.com/questions/43394400/spy-with-libcec-on-raspberry-pi">spy with LibCEC on Raspberry pi</a></p>