Git Product home page Git Product logo

Comments (6)

andreacampanella avatar andreacampanella commented on June 22, 2024

Ok, I managed to compile this , I was using the wrong define, using -DRTLSDR I can compile it.
but now I have another problem , if I run python3 cmdline.py -d 5 -c 12A -p "Fix Radio"

I get :

device restarted
ofdm word gestart
no DAB signal detected, giving up
no ensemble found, giving up

I had to choose python3.4m instead of python3.5m to make it working on the raspberry pi .

I'm trying to make a digital radio receiver without a screen attached, I'm really finding difficult, there is not a single working or ready piece of software to use the raspberry as DAB receiver via command line, I can't get it...

from dab-cmdline.

andimik avatar andimik commented on June 22, 2024

Have you tried eti-stuff (including eti-cmdline) as well?

This is much easier and stable.

from dab-cmdline.

andreacampanella avatar andreacampanella commented on June 22, 2024

hey andimik , thank!

Looks like that eti-stuff is more polished and stable :)

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on June 22, 2024

from dab-cmdline.

jehutting avatar jehutting commented on June 22, 2024

THANKS a lot @andreacampanella.

I was struggling to get this library/example-1 working for the exact same purpose as you do: having a stand-alone -without screen- DAB receiver/player. I was using the wrong define too.

Although the python-example still fails

$ python3 cmdline.py 
device restarted
ofdm word gestart
no DAB signal detected, giving up
no ensemble found, giving up

(and installing python3.4 gives me import errors as numpy/multiarrays/... and I don't know how all this relates to python3.5, the latest and greatest on the Raspbian Stretch)

I'm now able to compile example-1 (after I patched it...

$ git diff
diff --git a/example-1/main.cpp b/example-1/main.cpp
index 010f85b..aa83ddd 100644
--- a/example-1/main.cpp
+++ b/example-1/main.cpp
@@ -115,10 +115,11 @@ void      dataOut_Handler (std::string dynamicLabel, void *ctx) {
 }
 
 static
-void   bytesOut_Handler (uint8_t *data, int16_t amount, void *ctx) {
+void   bytesOut_Handler (uint8_t *data, int16_t amount, uint8_t type, void *ctx) {
        (void)data;
        (void)amount;
        (void)ctx;
+       (void)type;
 }
 //
 //     The function is called from within the library with

).

So, cmake .. -DRTLSDR=ON (in the created build directory of example-1) followed by make, gives dab-rtlsdr. Note: during my struggle I installed/removed a lot of packages; hang-on while building/compiling :-)

For example

$ ./dab-rtlsdr -C 12C -P "NPO Radio 2"
dab_cmdline, 	                  Copyright 2017 J van Katwijk, Lazy Chair Computing
OK, functions seem to be loaded
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
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 
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
connect(2) call to /tmp/jack-1001/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 ALSA: - (hw:0,0) seems available as 0
device bcm2835 ALSA: IEC958/HDMI (hw:0,1) seems available as 1
device sysdefault seems available as 3
device dsp0 seems available as 4
device dmixer seems available as 5
device dmix seems available as 6
device default seems available as 7
Suggested size for outputbuffer = 1280
ofdm word gestart
there might be a DAB signal here
NPO Soul & Jazz  (8206) is part of the ensemble
NPO FunX Sl.Jamz (8217) is part of the ensemble
NPO FunX         (8209) is part of the ensemble
NPO SterrenNL    (8212) is part of the ensemble
NPO Radio 4      (8204) is part of the ensemble
NPO 3FM          (8203) is part of the ensemble
NPO Radio 5      (8205) is part of the ensemble
NPO 3FM KX Radio (8214) is part of the ensemble
NPO Radio 4 Con. (8215) is part of the ensemble
ensemble NPO              is (8001) recognized
NPO Radio 1      (8201) is part of the ensemble
NPO FunX Dance   (8216) is part of the ensemble
NPO 3FM Alterna. (8210) is part of the ensemble
NPO Radio 2      (8202) is part of the ensemble

going to start program NPO Radio 2
selected NPO Radio 2
	startaddress	= 0
	length		= 72
	subChId		= 1
	protection	= 2
	bitrate		= 96
we have now DAB+

I don't know (yet) what ALSA complains about, but it just works!!!

@JvanKatwijk "Uiteraard een grote DANKUWEL voor de library en het voorbeeld programma!".

from dab-cmdline.

JvanKatwijk avatar JvanKatwijk commented on June 22, 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.