And one more thing, doublet.
Even if your script is not running, dvbsnoop -timeout 1000 -nph -pd 3 -n 1 -demux /dev/dvb/adapter0/demux0 0x0 gives the same list of PID's no matter what demux number I choose.
That's right. PAT (has PID 0) is broadcasted unencrypted so it shall be available anytime frontend is locked on some transponder.
We are hunting for descrambled PMT. PMT has different PID for each program (channel) - see PAT table.
While "viewing" BBC channel and script is not running, you'll get timeout when you try to get PMT with dvbsnoop:
dvbsnoop -timeout 1000 -nph -pd 3 -n 1 -demux /dev/dvb/adapter0/demux0 0x64
(example PMT PID 0x64 is BBC ONE SD)
But when script is running, expected behavior is to get PMT with above dvbsnoop command. If you like experimenting, you can run script with different numbers in
lsDemux = glob.glob("/dev/dvb/adapter0/demux*")
... in the place of *
And while script is running, to try catch PMT with dvbsnoop....