Topics

SDRAngel in Docker Issues...HELP


Marty Wittrock
 
Edited

Edouard,

Okay...I took the jump and installed Docker on my i5 Thinkpad that has Ubuntu 18.10 (Cosmic) installed as the OS. The installation of Docker itself was relatively easy - I did as you said and just followed the directions on Docker for Ubuntu and just installed it line by line - went perfect. I did the checkout 'HelIo-Word' and it worked great. I then installed the volume for 'portainer' per your directions and was able to launch it using:

http://localhost:9000

...but I have yet to find a way to restart the localhost once it's been shut down by restarting my laptop - I get a complaint that it's already running, but I can't view it using the http://localhost:9000 in a browser window like when I first started it.

Then, I went to the SDRAngel Github repository and performed all the installation methods you wrote about and installed SDRAngel as a 'vanilla' build - that went fine and I was able to bring up SDRAngel in Docker and close it. I also restarted SDRAngel by doing:

sudo ./restart.sh -g -t vanilla

...and it started up fine, too. I have yet to find a (clean) way to stop the SDRAngel Docker process from running completely. I have to reset my laptop to do that (for now).

I then tried to use the install.sh file for the udev rules and was met with "unable to find file". I ran as root and attempted it again and was met with some message about that it doesn't understand the first line (which is an HTTP thing - not written as a bash shell format). So the install.sh appears to be broken to run as a shell script - I even tried to run it in bash (i.e. sudo bash install.sh) and it would not run. So I copied the rule sets for LimeSDR and RTL-SDR (I didn't see one for SDRPlay) and got them to /etc/udev/rules.d  and reloaded the udev rules. Then I shut down my laptop and restarted it clean.

At this point I plugged in my Lime-Mini and re-ran the run.sh shell script to launch SDRAngel (sudo ./run.sh -g -t vanilla) and during the course of the startup I saw that it didn't see a LimeSDR device and that there was some USB permission that was denied - that caused me some pause. Once SDRAngel was up and running, I tried to add my Lime-Mini and found in the devices that it wasn't listed. So I shut down SDRAngel and my laptop, plugged in my SDRPlay RSP-2, and then restarted my laptop and the SDRAngel in Docker. Once SDRAngel was up and running I found that SDRAngel could see my RSP-2, but when I went to run it SDRAngel came up with a message that it could not start the device. I tried it again and same thing - could not start the device. So I shut down my laptop and restarted it and performed all the actions again...Nothing....Could not start the RSP-2, but it could find it.

At this point the installation is a breeze with SDRAngel on Docker, but I can't run anything. I'm going to try an RTL-SDR here in a moment, but I really need to know how to get my Lime-Mini running on SDRAngel on Docker...I'm certain that this is on the cusp of working, but I just need to know how to get my Lime-Mini recognized. I have the udev rules for the LimeSDR installed in the /etc/udev/rules.d subdirectory.

Please let me know what I'm doing wrong on this, Edouard...It's REALLY close to working..!

EDIT - ADDED INFO: I started my laptop up from power-off and with an RTL-SDR installed and when I tried to run SDRAngel again, but it does not recognize the RTL-SDR - I cannot select it as a device. So then I tried my trusty LimeSDR USB model (not the Mini) and reset my laptop and tried SDRAngel again. Same thing...It cannot see my LimeSDR even in the startup - it's just not seeing it.

Please advise on this, Edouard,

73 de Marty, KN0CK


Edouard Griffiths
 

Hello Marty,

1. first don't bother with http://localhost:9000 this is a nice to have (Portainer) that you don't have to worry about in a first step 
2. When you are running inside the Docker container, you simply do ./restart.sh (no sudo, no parameters) to restart SDRangel
3. You need to set up the udev rules on the host not from the container. Then exit the container (if running) and restart it.

This should get you going.

Brgds, Edouard.


Marty Wittrock
 

Edouard,

Okay - So I retried the udev rules and found my error - - the way I was saving the files it was saving the entire HTML page instead of the raw content. So I saved all the files and the install.sh script as raw and then applied the udev rules and reloaded them to my PC before I started SDRAngel in Docker - that straightened out the issue with recognizing the devices.

So i launched SDRAngel with my Mini plugged in and started it with a NBFM demod and made a few adjustments that I normally do and everything came up fine and was speedy - - but I have no audio now. I have audio in Ubuntu, but the audio from SDRAngel is not present and I cannot fix it by changing my audio preferences - even if I start and restart SDRAngel using the start/stop button on the GUI. What am I doing wrong there? Please let me know...I am making sure squelch is off and other stuff like that - - I've been using SDRAngel long enough to know those tricks.

Also, there's been a couple of times that SDRAngel 'bailed out' on me when it was running - just abruptly stopped, but I can recover it using ./restart and it comes right back, but I have to set everything up again from scratch. Just an observation...

So how do I recover my audio..? I like the speed of how it's running on my i5 Thinkpad with the Mini and I can see the spectra doing things normally - but still no audio. Again, please let me know if there's something I'm not doing right.

73 de Marty, KN0CK


Edouard Griffiths
 
Edited

Hi Marty,

there are 3 things that the container shares with the host and may cause issues: graphics, USB and sound. Maybe I forgot to mention the latter. So you have to first make sure that sound with pulseaudio works on your host then do the same from the container. It is important to notice that the pulseaudio system so you have to check audio works with pulseaudio. When you exit SDRangel from the container you land in a bash prompt inside the container which permits doing some investigations from the container. 

Brgds, Edouard.

Edit: now v4.5.1 should fix this.


Marty Wittrock
 

Edouard,

Should I do another sdrangel/docker pull to update the version I have now? Let me know if that's how I update my Docker image for future reference - thanks,

73 de Marty, KN0CK


Edouard Griffiths
 

Hi Marty,

sorry for the confusion v4.5.1 does not fix anything regarding your issue. I thought I was updating another topic...

However your question is interesting. The way to get a fresh version is not completely proven but it is very flexible by using the -c option of the build_xxx script that gives an arbitrary tag to your clone. Each time you change it from the previous build it will clone from the branch specified by -b option and build again SDRangel. Since I update very often I take the commit tag as the value of my -c option but this is completely arbitrary. You could just increase a counter for example. This works simply by echoing the tag on the command line therefore each time it changes the Docker build sees something new and will not take the result of the clone step from the build cache but get a fresh copy then through dependency SDRangel will be built again.

Brgds, Edouard.


Marty Wittrock
 
Edited

Edouard,

Okay - all good. So I would do a:

build_vanilla.sh -c

...when I want to update SDRAngel without any hardware dependencies? Let me know, because there will come a time that I will want to update the build and (effectively) write over it.

Let me know - thanks,

73 de Marty, KN0CK

P.S. - I posted the entire Docker installation for SDRAngel - - including the installation of Docker for Ubuntu - - on the forum:

https://discourse.myriadrf.org/t/the-definitive-guide-on-loading-a-docker-ized-image-of-sdrangel/4434


Edouard Griffiths
 

Hi Marty,

as long as the argument to -c is different from the one you use from your previous build the clone and rebuild from the top of master branch (use -b dev for dev) will be carried out.

Thanks for the guide on Myriad RF. Maybe something was not clear but you don't need to run anything as sudo as long as you add your user (with sudo this time) to the docker group. I am always trying to avoid the use and abuse of sudo.

Brgds, Edouard.


Marty Wittrock
 

Edouard,

Still having issues getting audio to work under the SDRAngel in Docker. I've performed the complete install of pulseaudio and even installed accessories for pulseaudio - - still nothing. This is even after I performed the install(s) and then reset the laptop and specified it in the audio preferences.

Running out of ideas here...My compiled version of SDRAngel has audio, Docker does not...Am I missing something? Please let me know -

73 de Marty, KN0CK


Edouard Griffiths
 
Edited

Hi Marty,

this is very important that you don't run the scripts as sudo in particular the run.sh, It contains this mapping essential for pulseaudio:
-v="/run/user/${USER_UID}/pulse:/run/user/1000/pulse" \

USER_UID is obtained with:
USER_UID=$(id -u)

so if you run as sudo it does
sudo id -u
0
and UID 0 is the UID of the root user not yours.

So first you have to add your user to the docker group:
sudo usermod -a -G docker $USER

Then log out and log back in

At this point your user should have docker in the groups list. So the groups command should answer something like:
f4exb adm dialout cdrom sudo audio dip plugdev lpadmin sambashare docker

Then do run.sh not sudo run.sh

Brgds, Edouard.


Marty Wittrock
 

Edouard,

All good - I will try this at the house tonight and see if I can get pulseaudio to work - I'm seeing it in the sound control panel when I pull it up, it's just that it's not making connection in the Dockerized SDRAngel. So I'll give it a go and let you know how it plays - Stay tuned...

73 de Marty, KN0CK


Marty Wittrock
 

Edouard,

Sorry for the delay on this - I was out ill yesterday and didn't play much with the SDRs. However, on Tuesday night I was able to obtain audio just as you mentioned by NOT doing a 'sudo bash run.sh -g -t vanilla' command. I just added myself to the Docker group and executed the shell script normally and it played great - I was really impressed with the speed of it, too..! So I'm finally in great shape with Docker and have been publicizing it on the blogs now. Frankly I have to agree that this is the easiest way to get SDRAngel and reliably work it, so this is going to be my longer-term strategy to use it.

More as I have it - stay tuned...

73 de Marty, KN0CK