Index - Search - Usergroups - Register - Private Message - Log in
Tuner locking via hdhomerun_config

 
Post new topic   Reply to topic    Silicondust Forum Index -> Development - HDHomeRun
View previous topic :: View next topic  
Author Message
mbm
Silicondust


Joined: 28 Sep 2006
Posts: 634

PostPosted: Thu Mar 26, 2009 3:09 pm    Post subject: Tuner locking via hdhomerun_config Reply with quote

The latest beta adds support for using tuner locking via hdhomerun_config.

Each tuner can be locked individually; tuner0's lock is controlled through /tuner0/lockkey.

Code:
KEY=$RANDOM
hdhomerun_config FFFFFFFF set /tuner0/lockkey $KEY
hdhomerun_config FFFFFFFF key $KEY set /tuner0/channel 128
hdhomerun_config FFFFFFFF key $KEY set /tuner0/program 3
hdhomerun_config FFFFFFFF key $KEY save /tuner0 capture.ts
hdhomerun_config FFFFFFFF key $KEY set /tuner0/lockkey none


Once the lockkey has been set, any "set" command that isn't signed with the key will return a "resource locked" error, preventing other applications from changing the tuner status; "get" commands are still allowed and do not need to be signed.

The lockkey will expire automatically if the tuner is left idle (no recent commands, not streaming video). The lockkey can be cleared without the key by using a set command to set the lockkey to "force". The force command should not be used without prompting the user for confirmation.

Tuner locking can be used to implement dynamic tuner allocation:
- generate a random key
- attempt to set lockkey to random key
- if lockkey returned an error, proceed to the next tuner
- set channel/target, signing the set commands with the key
- when finished with the tuner, lockkey is set to "none"
Back to top
View user's profile Send private message
Digital Corpus



Joined: 10 Mar 2008
Posts: 18

PostPosted: Thu Mar 26, 2009 6:55 pm    Post subject: w00t! Reply with quote

Thank you for supporting the efforts of the few!
Back to top
View user's profile Send private message
Mac The Knife



Joined: 02 Mar 2009
Posts: 25

PostPosted: Thu Mar 26, 2009 8:16 pm    Post subject: Reply with quote

Oh. that's pretty cool.

But everything is working so well for me that right now, that I'm afraid to flash new firmware (I hate mucking with anything that's working perfectly). I'll have to gather up some courage before I try it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Silicondust Forum Index -> Development - HDHomeRun All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB