I'm needing to reset my CAM periodically, and in order to do this I need to check it's status from outside VDR.

I've been doing the following, which is not ideal:
if [ $((`tail -n $LINES /var/log/messages | grep 'vdr:' | grep 'ERROR' | grep 'CI' | wc -l`)) = 0 ]
to test for:
"May 22 00:49:45 freddy vdr: [9061] ERROR: can't write to CI adapter on device 1: Input/output error " messages



and then:
"while [ $((`tail -n $LINES /var/log/messages | grep 'dvb_ca adapter 1: DVB CAM detected and initialised successfully' | wc -l`)) = 0 ]" to test it's recovered


Does anyone have any better suggestions???


Ideally, I'd like a way to "ask vdr" the status of the CAM from a script. I know this is available on the OSD by going into the "SETUP > CAM" menu where the CAM is displayed as "CAM Ready", "CAM Present" or "Alhpacrypt" but I need to do this outside the OSD.


Any ideas?

_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to