Giter Club home page Giter Club logo

Comments (14)

JvanKatwijk avatar JvanKatwijk commented on August 17, 2024 1

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on August 17, 2024

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on August 17, 2024

from dab-cmdline.

vale-max avatar vale-max commented on August 17, 2024

I had already tried with longer tineouts and with autogain too, but it does not seem to change anything.

time ./dab-rtlsdr-2 -Q -D 20 -d 20 -C 12C -P "M DUE O"
dab_cmdline example II,
Copyright 2017 J van Katwijk, Lazy Chair Computing
options are T:D:d:M:B:P:O:A:C:G:p:Q
going for rtlsdr 227360000 50
OK, functions seem to be loaded
Found Rafael Micro R820T/2 tuner
samplerate set to 2048000
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
effective gain: gain 25.4
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5222:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5222:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
connect(2) call to /dev/shm/jack-0/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Hostapis: 2
Api 0 is ALSA
Api 1 is OSS
selecting device default
device bcm2835 HDMI 1: - (hw:0,0) seems available as 0
device bcm2835 Headphones: - (hw:1,0) seems available as 1
device SMSL USB AUDIO: Audio (hw:2,0) seems available as 2
device sysdefault seems available as 3
device front seems available as 4
device surround40 seems available as 5
device iec958 seems available as 6
device spdif seems available as 7
device default seems available as 8
device dmix seems available as 9
Suggested size for outputbuffer = 1280
Allocating 15 zero-copy buffers
ensemble * DAB Italia * is (5009) recognized
program * RDS * Relax is part of the ensemble
program 105 DAB is part of the ensemble
program Deejay 30 Songs is part of the ensemble
program Radio 24 is part of the ensemble
program * RDS * is part of the ensemble
15:23
there might be a DAB signal here

we try to start program M DUE O
Because of is_audioservice: sorry we cannot handle service M DUE O
program Radio Maria is part of the ensemble
program RR News is part of the ensemble
program Deejay is part of the ensemble
program Kc1Test is part of the ensemble
program Radio Radicale is part of the ensemble
program Kc2Test is part of the ensemble
program Kc3Test is part of the ensemble
program RMALB.IA is part of the ensemble
program Capital Funky is part of the ensemble
program EPG (data) is part of the ensemble
program R101 is part of the ensemble
program Capital is part of the ensemble
program M DUE O DANCE is part of the ensemble
program Radio 24 +1 is part of the ensemble
program M DUE O is part of the ensemble
dab processor will stop

real 0m10.308s
user 0m2.000s
sys 0m0.214s

As you can see it didn't have to wait the timeout to sync and find the ensemble, nevertheless it reported the service as not possible to handle.

Just a few seconds later I restarted it with exactly the same command line and it worked, the signal quality is always very good, the lowest number I've seen is 93

we try to start program M DUE O
protection handler is eep_protection
we have now DAB+
startaddress = 720
length = 24
subChId = 18
protection = 2
bitrate = 32
msc quality = 98 100 100
msc quality = 100 100 100
msc quality = 100 100 100
msc quality = 100 100 100
msc quality = 100 100 100
msc quality = 100 100 100

from dab-cmdline.

vale-max avatar vale-max commented on August 17, 2024

I added the "because of is_audioservice" text as I had found the same "sorry" message in two different calls in the code

from dab-cmdline.

andimik avatar andimik commented on August 17, 2024

@vale-max

Have you tried to use another gain setting instead of -Q?

Do you have RAI on 12B or 12D which is stronger than DAB Italia on 12C?

from dab-cmdline.

andimik avatar andimik commented on August 17, 2024

This is strange

-D 20 -d 20

But

real 0m10.308s
user 0m2.000s

So, you fear the options -d and -D are ignored?

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on August 17, 2024

from dab-cmdline.

vale-max avatar vale-max commented on August 17, 2024

Yes, I've seen the "sorry cannot handle service" error on several programs on any channel which is tunable here and trying gain values from 10 to 90.
It is important to note that the audio is almost always ok, the interruptions happen very rarely, yesterday morning for example I listened perfectly to Radio2 on 12B and Virgin Radio on 12A for hours without issues, however starting the service sometimes requires two or three attempts.

Several times when the service fails to start the error message is displayed when the program list is still being completed and the name of the program I wanted is listed after the "we try to start program" message is logged.

Is it possible that the service start is attempted when the program list completion is still in progress and the program does not wait enough, despite the timeout settings?

Edit: I had started writing this update before seeing last @JvanKatwijk comment.

from dab-cmdline.

gvanem avatar gvanem commented on August 17, 2024

Maybe it's related to this bug I found in devices/rtlsdr-handler/rtlsdr-handler.cpp while
playing with the Python module.

A python cmdline.py -g 100 reports:

Supported gain values (16): 0.0 3.4 6.8 10.2 13.7 17.1 20.7 24.0 27.8 31.2 34.6 38.2 41.6 45.3 48.8 52.7
effective gain: gain -188739530.-7

Seems to be an off-by-1 index-error in rtlsdrHandler::rtlsdrHandler() which I fixed by:

--- a/devices/rtlsdr-handler/rtlsdr-handler.cpp 2021-04-25 12:42:53
+++ b/devices/rtlsdr-handler/rtlsdr-handler.cpp 2021-05-15 13:14:55
@@ -178,10 +178,12 @@
        if (autogain)
           rtlsdr_set_agc_mode (device, 1);
        (void)(this -> rtlsdr_set_center_freq (device, frequency));
+
+       int16_t _gainsCount = gainsCount - 1;
        fprintf (stderr, "effective gain: gain %d.%d\n",
-                                     gains [theGain * gainsCount / 100] / 10,
-                                     gains [theGain * gainsCount / 100] % 10);
-       rtlsdr_set_tuner_gain (device, gains [theGain * gainsCount / 100]);
+                                     gains [theGain * _gainsCount / 100] / 10,
+                                     gains [theGain * _gainsCount / 100] % 10);
+       rtlsdr_set_tuner_gain (device, gains [theGain * _gainsCount / 100]);

        if ( this       -> deviceOptions && rtlsdr_set_opt_string )
                rtlsdr_set_opt_string(device, deviceOptions, 1);

from dab-cmdline.

vale-max avatar vale-max commented on August 17, 2024

Hi @JvanKatwijk
with the sleep added it works perfectly, 100% working at first attempt.

I increased the sleep to 4 at line 471 of dab-scanner/main.cpp too as it was often missing services.

Still in dab-scanner, I also modified the layout of the service lines to include the channel and a leading field that indicates whether it is an audio or data service, just to make life easier when parsing the channel list.

Now a service line looks like:
audioservice;BBC WorldService;12A;C238;7;528;42;56;DAB+;1;EEP 3-A;1/2;English;

I pushed my changes to my fork of your repository, to eventually merge them in case you consider them useful.

Thanks a lot for this wonderful piece of software.

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on August 17, 2024

from dab-cmdline.

vale-max avatar vale-max commented on August 17, 2024

In the optic of speeding up the scan, it maybe would be useful to have the possibility to provide a list of the channels to be scanned rather than just the starting channel.
In my area only 5 channels have a signal, nevertheless the scanner goes through the whole spectrum even if I start from the first available (12A, and last channel with a signal is 13F)

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on August 17, 2024

from dab-cmdline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.