Bug #1467

Oscam reconnect

Added by neil mac over 10 years ago. Updated over 10 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Found in version:
Affected Versions:


Hi Adam,

This one is probably for mario after adding the oscam feature with capmt.

I used to use newcamd, and have moved over to this - I am getting better EMM times which is great. The only small point is that it does require a tvheadend restart if oscam is restarted - where as newcamd would recover.




Updated by Adam Sutton over 10 years ago

  • Assignee set to Mariusz Białończyk
  • Affected Versions 3.4 added

Passing to Manio to take a look.


Updated by Mariusz Białończyk over 10 years ago

Hi Neil,
Oh in fact there is a problem, the connection is not restoring, I assume you have even a problem when you zap to another channel after oscam restart.
I will try to fix it when i have some time...


Updated by neil mac over 10 years ago

Mario - zapping to a new channel will reconnect to oscam.

So the only scenario is that while watching a channel with subscription, restarting oscam will not continue to play the channel once oscam is back online.

This is low priority but I thought it was still worth raising as its different to the capmt behaviour.



Updated by Adam Sutton over 10 years ago


Just trying to take a quick look at this (trying to mop some stuff up). Reading the capmt code it looks to me to have proper logic for handling failed connections (i.e. socket is closed and FD set to 0). This should result in the next send_msg() call re-opening the connection. Am I missing something?

Is it possible the error you're seeing here, given that its ok on channel change, is actually that the subcription is mishandling the failure to descramble somehow? and getting stuck in a state from which it will not recover and resume descrambling?



Updated by Mariusz Białończyk over 10 years ago

The problem here is that it is not enough to reconnect only. After reconnect the PMT data has to be send again to /tmp/camd.socket to oscam start descrambling.
In other words: oscam after restart doesn't know the state of clients, every client need to trigger it (which is done on every channel switch).


Updated by Mariusz Białończyk over 10 years ago

Oh i think i know how to fix it easily, will try to push something to test soon...


Updated by Mariusz Białończyk over 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:a0a6632299d5a329758d518b9981d0915a79e642.

Also available in: Atom PDF