Jump to content

DMS hangs when using two CAMs


cyberreality

Recommended Posts

hi,

 

i have TBS6590 dvb-s2 card and using Kodi as a client (i'm observing same issue in DVBViewer as well, just DMS problem).

 

i used to have only one CAM (Skylink) to watch pay TV and multifocus dish for 13e 19e 23e 28e. so far no problem to watch and to switch channels, no matter satellite/transponder.

recently i bought second CAM (Telly) to watch another set of pay TV together with Skylink's CAM, TBS6590 has two tuners and two CIs, so should be no problem BUT when i tried to switch channel from one provider (CAM) to another one DMS will freeze. all i can do is either reboot computer or kill service and restart.

there is no problem when i'm changing channels from one CAM provider or FTAs, problem occur every time i try to change channel from one CAM to second one, no matter Skylink > Telly or Telly > Skylink. the only solution is to stop watching and then tune another channel, this way works ...

 

BUT EPG update is the same issue, so no client is watching any channel, DMS will start EPG update and ... 13e OK, 28e OK, 19e OK, 23e (Skylink) OK and now when changing to transponders on 1w (Telly) it hung. so no more able to tune any channel and just reboot computer or kill service ...

 

so it is not client based (EPG update is done on DMS only), the question is is there problem in DMS when switching from one tuner with CAM to another tuner with CAM? no problem when switching between FTAs. or is the problem in TBS card and i must buy Digital Devices Octopus CI S2 card?

 

tuner1: 1w 13e 28e

tuner2: 19e 23e

 

thanks!

Kamil

support.zip

Link to comment
Am 8.7.2020 um 08:49 schrieb cyberreality:

problem occur every time i try to change channel from one CAM to second one, no matter Skylink > Telly or Telly > Skylink.

 

What about using the two CAMs at the same time? You can try it in DVBViewer with PiP (right-click a channel in the channel list -> Picture in Picture). For tests I would use the two tuners and CAMs directly in DVBViewer, not via virtual RTSP devices, because in this way it's easier to see what actually happens. The hardware handling in DVBViewer and the DMS is almost identical.

 

Am 8.7.2020 um 08:49 schrieb cyberreality:

is there problem in DMS when switching from one tuner with CAM to another tuner with CAM?

 

No general (known) problem. But there may be a problem with using two instances of the TbsCIapi.dll. As far as I can see you have done the right thing by renaming a copy to TbsCIapi1.dll. However, I've never tested it. It's a bit difficult to simulate your setup here because I have to use two TBS USB boxes (both with CI), one of them quite old, but I will try in the next days... I'm not using them regularly, because I have experienced some annoying instabilities with them, particularly when using the TBS CI and TbsCIapi.dll, in contrast to Digital Devices and also DVBSky, that  proved to be trouble-free in this respect.

 

Link to comment

PIP works well, see attached pic. main screen is telly while smaller one is skylink. and again, controlling card directly from DVBViewer i have problem to switch channel from one CAM to second one.

no problem to do telly > FTA > skylink > FTA > telly or telly > turn it off > skylink ...

seems like i'm going to buy DD Octopus CI S2 ...

IMG_20200710_0940484.jpg

Link to comment
Am 10.7.2020 um 09:51 schrieb cyberreality:

PIP works well, see attached pic. main screen is telly while smaller one is skylink. and again, controlling card directly from DVBViewer i have problem to switch channel from one CAM to second one.

 

Thanks for the test. I've now set up DVBViewer with two TBS CI USB boxes and could see under debugger control that the TbsCIapi DLLs are not handled correctly in DVBViewer when switching between two TBS tuners with CAMs. The following happens:

  1. Initially (after DVBViewer has been launched) tuner A with CAM A and TbsCIapi.dll is used. The TBS DLL count is 1
  2. Switching to tuner B with CAM B: DVBViewer tries to allocate hardware for the new channel before releasing the hardware for the previous one. This standard behaviour enables re-using already allocated hardware in many cases, thus accelerating channel switching, but not in your case. Since TbsCIapi.dll is still occupied, DVBViewer loads TbsCIapi1.dll into memory. The TBS DLL Count is now 2
  3. DVBViewer releases tuner A with CAM A and TbsCIapi.dll. The TBS DLL Count drops to 1.
  4. Switching back to tuner A with CAM A: Again DVBViewer tries to allocate hardware for the new channel before releasing the hardware for the previous one. Since the TBS DLL count is still 1, DVBViewer again uses TbsCIapi1.dll, though it is still in use by tuner B (it should use the unoccupied TbsCIapi.dll). This finally results in an access violation and a crash.

In a nutshell: Bad book keeping. I think I can at least fix the desaster in step 4. Can you confirm the crash in step 4, or does your setup already crash in step 2 or 3?

 

Link to comment

it dies in step 2, as soon as i switch from cam1 to cam2 ...

if you want we can do teamviewer session so you can check my setup and it's behavior, so just PM me to find good time for it.

Link to comment

Next attempt: I've uploaded a DVBViewer version that does the following:

  1. Initially (after DVBViewer has been launched) tuner A with CAM A and TbsCIapi.dll is used.
  2. Switching to tuner B with CAM B: DVBViewer first releases the hardware (tuner A with CAM A) used for the previous channel including TbsCIapi.dll. Then it allocates tuner B / CAM B and re-loads TbsCIapi.dll, so there is no overlapping usage of two tuners anymore and only one DLL instance is needed.

This means a general change of the tuner allocation strategy. When DVBViewer realises that a tuner change is necessary, it will now always first release the used tuner before allocating the other one. I'm not yet clear about the overall implications, but I think it's worth a test.

 

Link to comment
vor 2 Stunden schrieb cyberreality:

would you make same change to DMS, i'd try epg update

 

Uploaded. The interesting thing is that the EPG updater doesn't use the CI mechanisms. So in your case the crash only seems to be caused by overlapping tuner usage. On the other side, using both tuners with CI/CAM simultaneously in the DVBViewer main window and PiP works, as you have reported... not really logical. I don't trust this TBS stuff. A lot seems to depend on timing differences.

 

Link to comment

WAU, thanks!

 

EPG works flawlessly, went thru all transponders i have tuned.

then i tried to use Kodi and DVBViewer as a clients to DMS ... and the problem is still here, when i tried to tune channel from cam1 to cam2 it died again ...

Link to comment
vor 14 Stunden schrieb cyberreality:

then i tried to use Kodi and DVBViewer as a clients to DMS ... and the problem is still here, when i tried to tune channel from cam1 to cam2 it died again ...

 

Again caused by overlapping TBS tuner usage, due to the tuner allocation/deallocation strategy of the HTTP and RTSP server. Both release tuners with a timer-driven delay of 3 seconds, in order to avoid time-consuming release/allocate cycles that would slow down channel switching in clients. In most cases the already allocated tuner can be reused for the next channel.

 

However, in your case the speed-up collides with the inability of the TBS driver to handle tuner changes cleanly. I will probably find another work-around for it, but it will not fix the basic problem.  Sooner or later you will encounter it again in one way or the other ;)

 

Link to comment

well, i'm close to buy DD anyway and sell TBS on ebay :)

i'd don't care how much time i'll take to switch channel cam1 to cam2 as i'm not doing that so often, for now i have to turn current channel off and then tune to another one.

Link to comment
  • 8 months later...

ok, it used to work fine until v7, now i have same issue again ... plz check attached logs and let me know whether you need to test something, also is downgrade possible?

 

thank you

support.zip

Edited by cyberreality
Link to comment

i downgraded to latest DVBViewer v6.1.7.2 and DMS v2.1.7.2, so far no issue, i'll try it for one week to see whether no issue in v6

Edited by cyberreality
Link to comment
vor 4 Stunden schrieb cyberreality:

now i have same issue again

 

Which issue when on which occasion? I can't see a crash or something similar in the svcdebug.log.

 

Link to comment
50 minutes ago, Griga said:

 

Which issue when on which occasion? I can't see a crash or something similar in the svcdebug.log.

 

well, not sure now ... i installed newest dvbviever v7 and DMS v3 and had same issue like before. in particular when i tried to switch channel from Telly CAM to any channel on Skylink CAM it stopped working and i had to restart computer or kill service and restart it.

no matter what client was used, dvbviever or kodi.

 

no more issues when i downgrade back to older versions. so i'll try to install v7/v3 tomorrow again to see whether this issue will occur again.

Link to comment
Am 30.3.2021 um 18:44 schrieb cyberreality:

i downgraded to latest DVBViewer v6.1.7.2 and DMS v2.1.7.2, so far no issue,

 

I've compared the DMS 2.1.7.2 and 3.0.2.0 code and couldn't find evidence that the fixes from summer 2020 (see above) have been disabled again. There were two main issues:

  • Wrong book keeping of two or moreTbsCIapi.dll instances in case of two or more tuners with CI. This fix is still in effect.
  • Overlapping usage of tuners when switching between them (due to a channel change that requires using another tuner than before), which the TBS driver could not handle cleanly. The DMS 3.0.2 still avoids it.

Your svcdebug.log is also proving it. Let's have a look at the entries beginning with 30.03.21 13:49:16.876, when the DMS was started (Start App):

  • At 13:49:27.315 Kodi accesses the DMS, recognizable by the two API_HandleStatus queries.
  • At 13:50:35.740 a channel on 12226 V, Pos A/Opt A belonging to channel group A gets tuned. It requires the first tuner and its CI
  • At 13:51:01.500  channel  on 12015 H, Pos A/Opt A belonging to channel group A gets tuned. It reuses the first (already initialized) tuner.
  • At 15:15:11.513 Windows signals a system time change (maybe just a small correction due to time server query).
  • At 16:40:18.841 a channel on 11973 V, Pos A/Opt B belonging to channel group E gets tuned. It requires the second tuner and its CI. As intended, the DMS first frees the first tuner, then it allocates the second tuner without overlapping usage.
  • At 16:40:42.583 the second tuner is released.
  • At 16:41:39.685 the server gets stopped in a regular way. There is no evidence for a crash, freezing, an error or something like that.

So what is the problem?

 

Link to comment

o don't know, strange things happen like when i tried to ttunne any channel from Skylink cam it hang, now either restart service or stop it or tune any ch. from second cam and then tune channel from first cam :) i know looks strange, gimme a week to play with it ...

 

anyway thanks for checkinng on your side!

Link to comment

NOW again, plz check logs. you can see that i tried to tune this freq 11875

 

05.04.21 10:05:36.437 TRTSPUDPClient       SetTuner         TType: 1, Freq: 11875, Symrate: 29900, LOF: 10600, Tone: 1, Pol: 0, DiseqC: 5, FEC: 3, APID: 7043, VPID: 7041, PMT: 7040, SID: 13203, TID: 3209, NID: 3, SatMod: 6, DiseqCVal: 0, Flags: 25, Group: 4

 

i tried to use DVBViewer as a client and saw no signal there. so i restarted service and it went fine.

 

btw how about all those records started at 05.04.21 09:51:53.822 ?? epg update? is it possible that this issue is caused by this?

 

support.zip

Link to comment
Am 5.4.2021 um 10:18 schrieb cyberreality:

NOW again, plz check logs. you can see that i tried to tune this freq 11875 (...)

i tried to use DVBViewer as a client and saw no signal there

 

Both tuners were used at this time, the first one by the EPG Updater and the second one for supplying DVBViewer.  I think the following applies:

 

Am 13.7.2020 um 09:46 schrieb Griga:

Again caused by overlapping TBS tuner usage (...)

However, in your case the speed-up collides with the inability of the TBS driver to handle tuner changes cleanly. I will probably find another work-around for it, but it will not fix the basic problem.  Sooner or later you will encounter it again in one way or the other

 

Particularly TBS devices that are using a CI don't work stably. I made the same experience, and all my attempts to fix it didn't work out. To be true, I'm tired of having to handle this again and again... ;)

 

Link to comment

strange ... i tried swap CAMs and cables, still the same ...

 

when i tried tune something from skylink cam i can see this in log

 

07.04.21 17:44:25.582 TBDA_TBS             OpenDevice       bvTurbosightNew
07.04.21 17:44:25.582 TLiveStream          AllocateHardware TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:25.582 TBDA_TBS             SetTuner         TType: 1, Freq: 11875, Symrate: 29900, LOF: 10600, Tone: 1, Pol: 0, DiseqC: 5, FEC: 3, APID: 7043, VPID: 7041, PMT: 7040, SID: 13203, TID: 3209, NID: 3, SatMod: 6, DiseqCVal: 0, Flags: 25, Group: 4
07.04.21 17:44:31.372 TBDACITBSModule CI Base SetTuner Entering
07.04.21 17:44:31.372 TBDACITBSModule CI Base SetTuner Leaving
07.04.21 17:44:48.219 Release              TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:48.219 Free                 TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:48.224 Freed                TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:48.224 hamDeleted           TBS 6590 DVB CI Tuner 0 (2)

 

while using another cam from telly:

 

07.04.21 17:50:27.866 TBDA_TBS             OpenDevice       bvTurbosightNew
07.04.21 17:50:27.866 TLiveStream          AllocateHardware TBS 6590 DVB CI Tuner 1 (1)
07.04.21 17:50:27.866 TBDA_TBS             SetTuner         TType: 1, Freq: 12245, Symrate: 30000, LOF: 10600, Tone: 1, Pol: 0, DiseqC: 3, FEC: 3, APID: 2203, VPID: 2202, PMT: 2201, SID: 4022, TID: 2804, NID: 187, SatMod: 6, DiseqCVal: 0, Flags: 57, Group: 0
07.04.21 17:50:30.248 TBDACITBSModule CI Base SetTuner Entering
07.04.21 17:50:30.248 TBDACITBSModule CI Base SetTuner Leaving
07.04.21 17:50:30.383 TBDACITBSModule WndProc Received PMT ready

 

see the difference?

 

why i see this

 

07.04.21 17:44:48.219 Release              TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:48.219 Free                 TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:48.224 Freed                TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:44:48.224 hamDeleted           TBS 6590 DVB CI Tuner 0 (2)

 

insted of

 

07.04.21 17:50:30.383 TBDACITBSModule WndProc Received PMT ready

 

? drives issue? so now telly cam works and i can watch channel so lets try skylink cam while this is running

 

07.04.21 17:58:13.605 Release              TBS 6590 DVB CI Tuner 1 (1)
07.04.21 17:58:13.605 Free                 TBS 6590 DVB CI Tuner 1 (1)
07.04.21 17:58:13.614 Freed                TBS 6590 DVB CI Tuner 1 (1)
07.04.21 17:58:13.614 hamDeleted           TBS 6590 DVB CI Tuner 1 (1)
07.04.21 17:58:13.784 TBDA_TBS             OpenDevice       bvTurbosightNew
07.04.21 17:58:13.784 TLiveStream          AllocateHardware TBS 6590 DVB CI Tuner 0 (2)
07.04.21 17:58:13.784 TBDA_TBS             SetTuner         TType: 1, Freq: 11875, Symrate: 29900, LOF: 10600, Tone: 1, Pol: 0, DiseqC: 5, FEC: 3, APID: 7043, VPID: 7041, PMT: 7040, SID: 13203, TID: 3209, NID: 3, SatMod: 6, DiseqCVal: 0, Flags: 25, Group: 4
07.04.21 17:58:16.184 TBDACITBSModule CI Base SetTuner Entering
07.04.21 17:58:16.184 TBDACITBSModule CI Base SetTuner Leaving
07.04.21 17:58:16.491 TBDACITBSModule WndProc Received PMT ready

 

 

NOW works fine so it seems like i need to warm-up card with telly cam and then switch to skylink :) this way works, so really driver issue?

Link to comment

simply it's freed 17 seconds later for some reason

 

07.04.21 19:24:32.931 TBDACITBSModule CI Base SetTuner Entering
07.04.21 19:24:32.931 TBDACITBSModule CI Base SetTuner Leaving
07.04.21 19:24:50.139 Release              TBS 6590 DVB CI Tuner 0 (2)
07.04.21 19:24:50.139 Free                 TBS 6590 DVB CI Tuner 0 (2)
07.04.21 19:24:50.143 Freed                TBS 6590 DVB CI Tuner 0 (2)
07.04.21 19:24:50.143 hamDeleted           TBS 6590 DVB CI Tuner 0 (2)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...