braice / MuMuDVB

A DVB IPTV streaming software
http://mumudvb.braice.net/
GNU General Public License v2.0
216 stars 133 forks source link

"The card has lost the lock (antenna unplugged ?)" after some time in dual tunner scenario #248

Closed pszemus closed 4 years ago

pszemus commented 5 years ago

Hi I'm receiving DVB-T signal via a dual tunner DVB-T card DVBSky T982 and mumudvb 2.1.0 build from sources (commit: 5d04a12). My mumudvb configuration looks like this:

mumudvb -d --card 0 --config /etc/mumudvb/mux3.conf
mumudvb -d --card 1 --config /etc/mumudvb/mux1.conf

$ cat /etc/mumudvb/mux3.conf
freq=522000
autoconfiguration=full
multicast_iface4=lo

$ cat /etc/mumudvb/mux1.conf
freq=770000
autoconfiguration=full
multicast_iface4=lo

Those two instances are being run at the same time and after some time there's a problem with the second one (card id: 1). At first it runs correctly: mumudvb-ok.log But after some time it stops receiving stream: first reporting scrabled packets and then that the card has lost the lock: mumudvb-error-host-no1.log Restarting this instance is not helping. First instance that uses card id: 0 is running just fine. I've even managed to test if it's a problem with this particular card - I run the same configuration on different host and it stopped working at the same time the first host did: mumudvb-error-host-no2.log - so it's not a card hardware issue.

I can make it receive the stream again by:

  1. stop both mumudvb instances
  2. remove kernel modules (rmmod): cx23885 and si2168
  3. add those kernel modules (modprobe): si2168 and cx23885
  4. start both mumudvb instances

Could you help me debug this problem? Is it a problem with card firmware or mumudvb?

pszemus commented 5 years ago

It happened again during the weekend. One of my dual tunners (Card 1) got:

is now partially unscrambled (5% of scrambled packets). Card 1
WARN:  DVB:  The card has lost the lock (antenna unplugged ?). Detailed status
Info:  Tune:  FE_STATUS:
Info:  Tune:       FE_HAS_SIGNAL : found something above the noise level
Info:  Tune:       FE_HAS_CARRIER : found a DVB signal
Info:  DVB:  Card is still not locked but status changed. Detailed status
Info:  Tune:  FE_STATUS:
Info:  DVB:  Card is still not locked but status changed. Detailed status
Info:  Tune:  FE_STATUS:
Info:  Tune:       FE_HAS_SIGNAL : found something above the noise level
Info:  Tune:       FE_HAS_CARRIER : found a DVB signal
Info:  DVB:  Card is still not locked but status changed. Detailed status
Info:  Tune:  FE_STATUS:
Info:  DVB:  Card is still not locked but status changed. Detailed status
Info:  Tune:  FE_STATUS:
Info:  Tune:       FE_HAS_SIGNAL : found something above the noise level
Info:  Tune:       FE_HAS_CARRIER : found a DVB signal
Info:  DVB:  Card is locked again.
WARN:  DVB:  The card has lost the lock (antenna unplugged ?). Detailed status

last few lines are being repeated over and over again...

pszemus commented 5 years ago

Now if Card 1 is in that state, even restarting mumudvb does not help. The same mumudvb configuration can be run successfully with Card 0 but running it with Card 1 does not detect any channels until I readd those kernel modules as described before:

$ sudo mumudvb -v -d --card 1 --config /etc/mumudvb/mux1.conf
MuMuDVB Version 2.1.0_20181020_mumudvb2
 --- Build information ---
Built without CAM support.
Built without SCAM support.
Built with ATSC support.
Built with support for DVB API Version 5.11.
Built with support for DVB-T2.
---------
Originally based on dvbstream 0.6 by (C) Dave Chapman 2001-2004
Released under the GPL.
Latest version available from http://mumudvb.net/
Project from the cr@ns (http://www.crans.org)
by Brice DUBOST (mumudvb@braice.net)

Info:  Main:  Autoconfiguration, we activate SAP announces. if you want to disable them see the README.
Info:  Main:  Autoconfiguration, we activate PAT rewriting. if you want to disable it see the README.
Info:  Main:  Autoconfiguration, we activate SDT rewriting. if you want to disable it see the README.
Info:  Main:  ========== End of configuration, MuMuDVB version 2.1.0_20181020_mumudvb2 is starting ==========
WARN:  Main:  Can't create /var/run/mumudvb/channels_streamed_adapter1_tuner0: No such file or directory
WARN:  Main:  Can't create /var/run/mumudvb/channels_unstreamed_adapter1_tuner0: No such file or directory
Info:  Main:  Streaming. Freq 770000000.000000
Info:  Tune:  Using DVB card "Silicon Labs Si2168" tuner 0
Info:  Tune:  Tuning Terrestrial to 770000000 Hz, Bandwidth: 8000000
Deb0:  Tune:  polling....
Info:  Tune:  FE_STATUS:
Deb0:  Tune:  polling....
Info:  Tune:  FE_STATUS:
Info:  Tune:       FE_HAS_SIGNAL : found something above the noise level
Info:  Tune:       FE_HAS_CARRIER : found a DVB signal
Info:  Tune:       FE_HAS_VITERBI : FEC is stable
Info:  Tune:       FE_HAS_SYNC : found sync bytes
Info:  Tune:       FE_HAS_LOCK : everything's working... 
Info:  Tune:  Event:  Frequency: 0
Info:  Main:  Card 1, tuner 0 tuned
main 0x7ffe36a73170
WARN:  DVB:  An issue happened during the IOCTLS to take BER measurements error: Operation not supported
WARN:  DVB:  An issue happened during the IOCTLS to take strength measurements error: Operation not supported
WARN:  DVB:  An issue happened during the IOCTLS to take SNR measurements error: Operation not supported
WARN:  DVB:  An issue happened during the IOCTLS to take uncorrected blocks measurements error: Operation not supported
Info:  Common chan:  Looking through all services to update their filters
Deb0:  Common chan:  Open the new filters
Deb0:  SAP:  init sap v4
Info:  Autoconf:  Autoconfiguration is now ready to work for you !
braice commented 5 years ago

Hello

When I had such issues it was driver related. MuMuDVB cannot do much if the card stop sending data randomly Look if there is an updated driver or kernel module parameters you can tweak

Brice

On Mon, Jun 3, 2019 at 4:12 AM pszemus notifications@github.com wrote:

Now if Card 1 is in that state, even restarting mumudvb does not help. The same mumudvb configuration can be run successfully with Card 0 but running it with Card 1 does not detect any channels until I readd those kernel modules as described before:

sudo mumudvb -v -d --card 1 --config /etc/mumudvb/mux1.conf MuMuDVB Version 2.1.0_20181020_mumudvb2 --- Build information --- Built without CAM support. Built without SCAM support. Built with ATSC support. Built with support for DVB API Version 5.11. Built with support for DVB-T2.

Originally based on dvbstream 0.6 by (C) Dave Chapman 2001-2004 Released under the GPL. Latest version available from http://mumudvb.net/ Project from the cr@ns (http://www.crans.org) by Brice DUBOST (mumudvb@braice.net)

Info: Main: Autoconfiguration, we activate SAP announces. if you want to disable them see the README. Info: Main: Autoconfiguration, we activate PAT rewriting. if you want to disable it see the README. Info: Main: Autoconfiguration, we activate SDT rewriting. if you want to disable it see the README. Info: Main: ========== End of configuration, MuMuDVB version 2.1.0_20181020_mumudvb2 is starting ========== WARN: Main: Can't create /var/run/mumudvb/channels_streamed_adapter1_tuner0: No such file or directory WARN: Main: Can't create /var/run/mumudvb/channels_unstreamed_adapter1_tuner0: No such file or directory Info: Main: Streaming. Freq 770000000.000000 Info: Tune: Using DVB card "Silicon Labs Si2168" tuner 0 Info: Tune: Tuning Terrestrial to 770000000 Hz, Bandwidth: 8000000 Deb0: Tune: polling.... Info: Tune: FE_STATUS: Deb0: Tune: polling.... Info: Tune: FE_STATUS: Info: Tune: FE_HAS_SIGNAL : found something above the noise level Info: Tune: FE_HAS_CARRIER : found a DVB signal Info: Tune: FE_HAS_VITERBI : FEC is stable Info: Tune: FE_HAS_SYNC : found sync bytes Info: Tune: FE_HAS_LOCK : everything's working... Info: Tune: Event: Frequency: 0 Info: Main: Card 1, tuner 0 tuned main 0x7ffe36a73170 WARN: DVB: An issue happened during the IOCTLS to take BER measurements error: Operation not supported WARN: DVB: An issue happened during the IOCTLS to take strength measurements error: Operation not supported WARN: DVB: An issue happened during the IOCTLS to take SNR measurements error: Operation not supported WARN: DVB: An issue happened during the IOCTLS to take uncorrected blocks measurements error: Operation not supported Info: Common chan: Looking through all services to update their filters Deb0: Common chan: Open the new filters Deb0: SAP: init sap v4 Info: Autoconf: Autoconfiguration is now ready to work for you !

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/248?email_source=notifications&email_token=AACRID4IUGBD4RR6ECPZYM3PYTG55A5CNFSM4HQKV3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWYUPGI#issuecomment-498157465, or mute the thread https://github.com/notifications/unsubscribe-auth/AACRID4XYXBNPSVLGNHZLZDPYTG55ANCNFSM4HQKV3JA .

pszemus commented 5 years ago

Thanks @braice In my production environment I'm using DVB drivers from kernel 4.14 and card drivers/firmware from http://www.dvbsky.net/download/linux/firmware.zip But reading the (somehow unclear) instructions from http://www.dvbsky.net/Support_linux.html do you think it's a good idea to replace kernel modules by those compiled from http://git.linuxtv.org/cgit.cgi/media_build.git/about/ and then copy the card firmware, as before, from http://www.dvbsky.net/download/linux/firmware.zip ?

braice commented 5 years ago

Hello

Unfortunately such kind of issues are very hard to fix on the mumudvb sido. Mumudvbb ask for a data stream from the card and mess with the tuning but that is pretty much all it does on the card side

If the driver freezes there is the watchdog you are seeing so a script can restart stuff. If not enough unfortunately you will have to find a more reliable combination card + driver + driver parameters by tweaking on one or several of these three aspects

Brice

On Thu, Jun 6, 2019, 05:31 pszemus notifications@github.com wrote:

Thanks @braice https://github.com/braice In my production environment I'm using DVB drivers from kernel 4.14 and card drivers/firmware from http://www.dvbsky.net/download/linux/firmware.zip But reading the (somehow unclear) instructions from http://www.dvbsky.net/Support_linux.html do you think it's a good idea to replace kernel modules by those compiled from http://git.linuxtv.org/cgit.cgi/media_build.git/about/ and then copy the card firmware, as before, from http://www.dvbsky.net/download/linux/firmware.zip ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/248?email_source=notifications&email_token=AACRID2Q57BBDLZ3U7CZBZTPZDKNXA5CNFSM4HQKV3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXCJDIQ#issuecomment-499421602, or mute the thread https://github.com/notifications/unsubscribe-auth/AACRID6E66AXPNCOH4KEUVLPZDKNXANCNFSM4HQKV3JA .

malakudi commented 4 years ago

Probably fixed with https://github.com/braice/MuMuDVB/commit/6fd60d6d0f2ea7340414a5e5b6eccfe7404e8c86 (add option tuning_no_diff=300 to retune after of 300 seconds of no data)

braice commented 4 years ago

Closing, reopen if the issue arises again