Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide Play DAB+ Radio in Moode
#11
(02-19-2024, 06:16 PM)Facel Wrote:
(02-19-2024, 01:11 AM)fdealexa Wrote: Hi Alain,
the modification consists in adding an IF instruction block,  in the original "webradiointerface.cpp" module. I requested to the authors of "welle" to add it on their code (to have it in the following release) but, unfortunatly they did not accept.
The current release is 2.4 and the modification position reported on the issue "https://github.com/AlbrechtL/welle.io/issues/559" is different (500 instead of 474).
The modification is necessary to change channel and subchannel (or SID) because the original module accepted change of the subchannel only.
In other word, you need it to allow the request: http://localhost:7979/mp3/CHANNEL/SID: for example to listen to the "CHANTE FRANCE"
you have to create a radio station on moode with the URL "http://127.0.0.1:7979/mp3/9A/0xfe43"
I hope it is more clear than before, please do not hesitate to ask for any additional doubts.
Best regards,
Francesco

Ho Francesco

Thanks again for your help.

If my understanding is correct ,

1) I copy the code from athoik in the thread ""https://github.com/AlbrechtL/welle.io/issues/559" after having modified the -474,9 and +474,38 value with -500,9 and +500,38


2) I paste this code into the "webradiointerface.cpp" module (at any place into the file, so it will be at the end of the file)

3) I create a Radio station on Moode with the URL http://127.0.0.1:7979/mp3/9A/0xfe43

Well .. the result is an mpd Error:  Failed to decode http://XXX.XXX.XX.XX:7979/mp3/9A/0xfe43; got HTTP status 404

So my undesrtanding was not correct ....

At this point I do not see clearly how to have a real DAB radio player with moode, I mean having an automatic detection and prompt of the DAB Radio available in my area, and simply selectig the one I want to listen to.

Hi Alain,
your understanding is not completly correct: 
a. the "IF block" must be copied to exact point (around line 500)
b. once modified the "webradiointerface.cpp" it must be linked to the main program

Code:
mkdir build
cd build
cmake .. -DRTLSDR=1 -DBUILD_WELLE_IO=0
make


c. the detection of the stations is not automatic and each radio has to be created manually.

Please find attached the file already modified.
I am trying to prepare a list of stations for you: tomorrow should be ready.
In the mean time, please try to execute the commands reported after having substitute the "webradiointerface.cpp".
Best regards,
Francesco


.zip   webradiointerface.zip (Size: 10.86 KB / Downloads: 2)
Reply
#12
(02-19-2024, 11:31 PM)fdealexa Wrote: b. once modified the "webradiointerface.cpp" it must be linked to the main program

Code:
mkdir build
cd build
cmake .. -DRTLSDR=1 -DBUILD_WELLE_IO=0
make


c. the detection of the stations is not automatic and each radio has to be created manually.

Please find attached the file already modified.
I am trying to prepare a list of stations for you: tomorrow should be ready.
In the mean time, please try to execute the commands reported after having substitute the "webradiointerface.cpp".
Best regards,
Francesco

Hi Francesco
In which directory must I execute the code to link to the main program ?

("webradiointerface.cpp" is located in the following folder: /usr/src/welle.io/src/welle-cli)
Reply
#13
Hi Alain,
In your environment you have to go to the "build" directory under usr/src/welle.io/src/welle-cli and execute only the last 2 commands (cmake and make )
Regards,
Francesco
Reply
#14
Hi Francesco

My build directory is under /usr/src/welle.io

/usr/src/welle.io/build $ ls -lia
total 21624
137624 drwxr-xr-x 3 root root 4096 Feb 15 08:48 .
137478 drwxr-xr-x 8 root root 4096 Feb 13 19:34 ..
154906 -rw-r--r-- 1 root root 23814 Feb 13 19:35 CMakeCache.txt
137631 drwxr-xr-x 6 root root 4096 Feb 13 19:39 CMakeFiles
154932 -rw-r--r-- 1 root root 3087 Feb 13 19:35 cmake_install.cmake
154907 -rw-r--r-- 1 root root 1022 Feb 13 19:35 cmake_uninstall.cmake
155033 -rw-r--r-- 1 root root 4392 Feb 13 19:38 index.html
155034 -rw-r--r-- 1 root root 26221 Feb 13 19:38 index.js
154930 -rw-r--r-- 1 root root 52923 Feb 13 19:35 Makefile
155032 -rwxr-xr-x 1 root root 22004360 Feb 13 19:38 welle-cli


I have No "build" directory under /usr/src/welle.io/src/welle-cli

Regards
Reply
#15
Ok, Alain.
that should be the right directory.
Regards,
Francesco
Reply
#16
(02-20-2024, 11:33 PM)fdealexa Wrote: Ok, Alain.
that should be the right directory.
Regards,
Francesco

Hi Francesco

First of all, the result is that it can play the DAb Radio (Chante France in this case) from moode Smile


The cmake command has not found the ALSA Library... Is it critical ?


Code:
/usr/src/welle.io/build $ sudo cmake .. -DRTLSDR=1 -DBUILD_WELL                                 E_IO=0
-- Build type not specified: defaulting to release.
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/welle.io/build

and the make command has some warnings

Code:
/usr/src/welle.io/build $ sudo make
Scanning dependencies of target welle-cli
[  2%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/welle-cli.cpp.o
[  4%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/alsa-output.cpp.o
[  6%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/webradiointerface.cpp.o
[  9%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/jsonconvert.cpp.o
[ 11%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/webprogrammehandler.cpp.o
[ 13%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/tests.cpp.o
[ 15%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dab-audio.cpp.o
[ 18%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/decoder_adapter.cpp.o
[ 20%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dab_decoder.cpp.o
[ 22%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dabplus_decoder.cpp.o
[ 25%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/charsets.cpp.o
[ 27%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dab-constants.cpp.o
[ 29%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/mot_manager.cpp.o
[ 31%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/pad_decoder.cpp.o
[ 34%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/eep-protection.cpp.o
[ 36%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/fib-processor.cpp.o
/usr/src/welle.io/src/backend/fib-processor.cpp: In member function ‘int16_t FIBProcessor::HandleFIG0Extension8(u              int8_t*, int16_t, uint8_t)’:
/usr/src/welle.io/src/backend/fib-processor.cpp:459:17: warning: unused variable ‘SCid’ [-Wunused-variable]
 459 |         int16_t SCid = getBits(d, lOffset + 4, 12);
     |                 ^~~~
/usr/src/welle.io/src/backend/fib-processor.cpp:466:17: warning: unused variable ‘SubChId’ [-Wunused-variable]
 466 |         int16_t SubChId = getBits_6(d, lOffset + 4);
     |                 ^~~~~~~
[ 38%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/fic-handler.cpp.o
[ 40%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/msc-handler.cpp.o
[ 43%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/freq-interleaver.cpp.o
[ 45%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/ofdm-decoder.cpp.o
[ 47%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/ofdm-processor.cpp.o
[ 50%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/phasereference.cpp.o
[ 52%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/phasetable.cpp.o
[ 54%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/tii-decoder.cpp.o
[ 56%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/protTables.cpp.o
[ 59%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/radio-receiver.cpp.o
[ 61%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/tools.cpp.o
[ 63%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/uep-protection.cpp.o
[ 65%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/viterbi.cpp.o
[ 68%] Building CXX object CMakeFiles/welle-cli.dir/src/various/Socket.cpp.o
[ 70%] Building CXX object CMakeFiles/welle-cli.dir/src/various/Xtan2.cpp.o
[ 72%] Building CXX object CMakeFiles/welle-cli.dir/src/various/channels.cpp.o
[ 75%] Building CXX object CMakeFiles/welle-cli.dir/src/various/fft.cpp.o
[ 77%] Building CXX object CMakeFiles/welle-cli.dir/src/various/profiling.cpp.o
[ 79%] Building C object CMakeFiles/welle-cli.dir/src/various/wavfile.c.o
[ 81%] Building C object CMakeFiles/welle-cli.dir/src/libs/fec/decode_rs_char.c.o
[ 84%] Building C object CMakeFiles/welle-cli.dir/src/libs/fec/encode_rs_char.c.o
[ 86%] Building C object CMakeFiles/welle-cli.dir/src/libs/fec/init_rs_char.c.o
[ 88%] Building CXX object CMakeFiles/welle-cli.dir/src/input/input_factory.cpp.o
[ 90%] Building CXX object CMakeFiles/welle-cli.dir/src/input/null_device.cpp.o
[ 93%] Building CXX object CMakeFiles/welle-cli.dir/src/input/raw_file.cpp.o
[ 95%] Building CXX object CMakeFiles/welle-cli.dir/src/input/rtl_tcp.cpp.o
/usr/src/welle.io/src/input/rtl_tcp.cpp: In member function ‘void CRTL_TCP_Client::networkBufferCopy()’:
/usr/src/welle.io/src/input/rtl_tcp.cpp:502:19: warning: unused variable ‘bufferFill’ [-Wunused-variable]
 502 |             float bufferFill = (float) sampleNetworkBuffer.GetRingBufferReadAvailable() / sampleNetworkBu              ffer.GetBufferSize() * 100;
     |                   ^~~~~~~~~~
[ 97%] Building CXX object CMakeFiles/welle-cli.dir/src/input/rtl_sdr.cpp.o
[100%] Linking CXX executable welle-cli
[100%] Built target welle-cli



The last point to be solved is how to launch during the boot the welle-cli command to have the RTL-SDR tuner ready to decode ?
Reply
#17
(02-21-2024, 06:29 AM)Facel Wrote:
(02-20-2024, 11:33 PM)fdealexa Wrote: Ok, Alain.
that should be the right directory.
Regards,
Francesco

Hi Francesco

First of all, the result is that it can play the DAb Radio (Chante France in this case) from moode Smile


The cmake command has not found the ALSA Library... Is it critical ?


Code:
/usr/src/welle.io/build $ sudo cmake .. -DRTLSDR=1 -DBUILD_WELL                                 E_IO=0
-- Build type not specified: defaulting to release.
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/welle.io/build

and the make command has some warnings

Code:
/usr/src/welle.io/build $ sudo make
Scanning dependencies of target welle-cli
[  2%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/welle-cli.cpp.o
[  4%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/alsa-output.cpp.o
[  6%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/webradiointerface.cpp.o
[  9%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/jsonconvert.cpp.o
[ 11%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/webprogrammehandler.cpp.o
[ 13%] Building CXX object CMakeFiles/welle-cli.dir/src/welle-cli/tests.cpp.o
[ 15%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dab-audio.cpp.o
[ 18%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/decoder_adapter.cpp.o
[ 20%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dab_decoder.cpp.o
[ 22%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dabplus_decoder.cpp.o
[ 25%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/charsets.cpp.o
[ 27%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/dab-constants.cpp.o
[ 29%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/mot_manager.cpp.o
[ 31%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/pad_decoder.cpp.o
[ 34%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/eep-protection.cpp.o
[ 36%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/fib-processor.cpp.o
/usr/src/welle.io/src/backend/fib-processor.cpp: In member function ‘int16_t FIBProcessor::HandleFIG0Extension8(u              int8_t*, int16_t, uint8_t)’:
/usr/src/welle.io/src/backend/fib-processor.cpp:459:17: warning: unused variable ‘SCid’ [-Wunused-variable]
 459 |         int16_t SCid = getBits(d, lOffset + 4, 12);
     |                 ^~~~
/usr/src/welle.io/src/backend/fib-processor.cpp:466:17: warning: unused variable ‘SubChId’ [-Wunused-variable]
 466 |         int16_t SubChId = getBits_6(d, lOffset + 4);
     |                 ^~~~~~~
[ 38%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/fic-handler.cpp.o
[ 40%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/msc-handler.cpp.o
[ 43%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/freq-interleaver.cpp.o
[ 45%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/ofdm-decoder.cpp.o
[ 47%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/ofdm-processor.cpp.o
[ 50%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/phasereference.cpp.o
[ 52%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/phasetable.cpp.o
[ 54%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/tii-decoder.cpp.o
[ 56%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/protTables.cpp.o
[ 59%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/radio-receiver.cpp.o
[ 61%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/tools.cpp.o
[ 63%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/uep-protection.cpp.o
[ 65%] Building CXX object CMakeFiles/welle-cli.dir/src/backend/viterbi.cpp.o
[ 68%] Building CXX object CMakeFiles/welle-cli.dir/src/various/Socket.cpp.o
[ 70%] Building CXX object CMakeFiles/welle-cli.dir/src/various/Xtan2.cpp.o
[ 72%] Building CXX object CMakeFiles/welle-cli.dir/src/various/channels.cpp.o
[ 75%] Building CXX object CMakeFiles/welle-cli.dir/src/various/fft.cpp.o
[ 77%] Building CXX object CMakeFiles/welle-cli.dir/src/various/profiling.cpp.o
[ 79%] Building C object CMakeFiles/welle-cli.dir/src/various/wavfile.c.o
[ 81%] Building C object CMakeFiles/welle-cli.dir/src/libs/fec/decode_rs_char.c.o
[ 84%] Building C object CMakeFiles/welle-cli.dir/src/libs/fec/encode_rs_char.c.o
[ 86%] Building C object CMakeFiles/welle-cli.dir/src/libs/fec/init_rs_char.c.o
[ 88%] Building CXX object CMakeFiles/welle-cli.dir/src/input/input_factory.cpp.o
[ 90%] Building CXX object CMakeFiles/welle-cli.dir/src/input/null_device.cpp.o
[ 93%] Building CXX object CMakeFiles/welle-cli.dir/src/input/raw_file.cpp.o
[ 95%] Building CXX object CMakeFiles/welle-cli.dir/src/input/rtl_tcp.cpp.o
/usr/src/welle.io/src/input/rtl_tcp.cpp: In member function ‘void CRTL_TCP_Client::networkBufferCopy()’:
/usr/src/welle.io/src/input/rtl_tcp.cpp:502:19: warning: unused variable ‘bufferFill’ [-Wunused-variable]
 502 |             float bufferFill = (float) sampleNetworkBuffer.GetRingBufferReadAvailable() / sampleNetworkBu              ffer.GetBufferSize() * 100;
     |                   ^~~~~~~~~~
[ 97%] Building CXX object CMakeFiles/welle-cli.dir/src/input/rtl_sdr.cpp.o
[100%] Linking CXX executable welle-cli
[100%] Built target welle-cli



The last point to be solved is how to launch during the boot the welle-cli command to have the RTL-SDR tuner ready to decode ?


Hi Alain,
the easyest way to automatically launch the "DAB Server", in my opinion, is to create a service. please find below the procedure to follow to create it and make it running.

Create the service:

Code:
sudo nano /etc/systemd/system/rtl_DAB.service
 
insert the following code in it:

Code:
[Unit]
Description=welle.io Server, turns local broadcast DAB stations into online radio $
After=network.target

[Service]
Type=simple
WorkingDirectory=/usr/src/welle.io/build
ExecStart=/usr/src/welle.io/build/welle-cli -T -w 7979

[Install]
WantedBy=default.target
save and close (ctrl-O, ctrl-X)
Then execute the next commands to make it running:
Code:
sudo systemctl daemon-reload
sudo systemctl enable rtl_DAB.service
sudo systemctl start rtl_DAB.service
At this point reboot the system and try to listen a DAb Radio (Chante France in your case).

Further more I have created for you a .zip file (please find it at this LINK) to listen all the current stations you should tune in your area.
the following procedure will add 52 stations at the moOde radio menu:
Code:
Code:
cd /home/pi
mkdir StationManager
cd StationManager
sudo cp /var/www/util/station_manager.py ./

Copy the .zip (please note that the name of the file can be as you prefer) in the StationManager directory (I normaly use winscp) and then import the stations:
Code:
Code:
cd /home/pi/StationManager
sudo python3 station_manager.py --scope other --import moOde_DAB_FR_Toulon-2024_02_21.zip

I suggest to reboot the system before listen to the new imported stations.
Best regards,
Francesco
Reply
#18
Thank you so much Francesco for your great help which was indispensable for me to get DAB radio working with moode
That's really nice of you
Reply


Forum Jump: