LMS on Asus Tinker Board 2 S - finally working

Subbu68

Well-Known Member
Joined
Mar 13, 2022
Messages
968
Points
93
Location
ABU DHABI, UAE
In my earlier threads had posted about Asus Tinker Board 2 S SBC


and a shortlived success in installing LMS on it


With an extraordinary effort by @bobbyprajan who fished out his TB and tried the scripts he could find on the net and from his experience and fed them to me on PMs. @mbhangui too helped out with his posts on getting the thing run.

  • The NAS was not getting mounted automatically with the previous script I posted. I had to manually mount it and restart LMS. And even scan the NAS.
  • The Player was doing a disappearing act after a song. The count down timer ends at zero and starts again. Reached 12 or 15 sec and resets. The player shows the same track being played. But no sound.
  • If manually forwarded to next track, starts the song and then stops.
  • The Player cannot be found even after scanning the NAS.

Now the steps I finally adopted are here. This may work for other SBCs running Debian. Mine is "locked" at Debian 10 v2.0.14.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The first step was to try and make the NAS mount automatically.
Bobby sent me the following scripts and I added the first couple of them to update the Debian and install NFS.

sudo apt-get update
sudo apt install nfs-common
sudo vim /etc/systemd/system/media-NAS.mount


this opens a file and ---Copy and paste the below content—

[Unit]
Description = Mount NFS Share
After = network-online.service
Requires = network-online.service

[Mount]
What=192.xxx.yy.zzz:/volume1/music
Where=/media/NAS
Type=nfs
Options=defaults,user,exec,_netdev
# Uncomment the below if your server is real slow
# TimeoutSec=10

[Install]
WantedBy=multi-user.target

SAVE THE FILE
My NAS is Synology and it has the "volume1" prefix to the directories in it. Check yours.

sudo vim /etc/systemd/system/network-online.service

---------------------Copy and paste the following content-----------------
[Unit]
Description=Wait until NM actually online
Requires=NetworkManager-wait-online.service
After=NetworkManager-wait-online.service

[Service]
Type=oneshot
ExecStart=/usr/bin/nm-online -q --timeout=120
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

SAVE THE FILE

sudo systemctl unmask NetworkManager-wait-online.service
sudo systemctl start media-NAS.mount
sudo systemctl daemon-reload
df -k

check if NAS in mounted.

And with multiple reboots, NAS was found online every time. First issue solved. NAS was on when TB 2S is rebooted. No more click to mount it.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now to install LMS. My Perl version is 5.28. Tried the latest LMS and it encountered dependency issue and could not install. So stuck with LMS 7.9.2

Again scripts was tailored by @bobbyprajan for this newbie

sudo apt install libio-socket-ssl-perl
sudo wget http://downloads-origin.slimdevices.com/LogitechMediaServer_v7.9.2/logitechmediaserver_7.9.2_arm.deb
sudo dpkg -i ./logitechmediaserver_7.9.2_arm.deb
sudo apt-get -f install
sudo usermod -aG audio squeezeboxserver
sudo addgroup lms
sudo usermod -aG lms squeezeboxserver
sudo usermod -aG audio linaro
sudo mkdir /media/NAS
sudo chown linaro:lms /media/NAS

sudo systemctl unmask logitechmediaserver.service
sudo systemctl enable logitechmediaserver

sudo ifconfig
for IP address of the LMS - note it down.

It may be needed to set up on mobile at times 192.XXX.YY.ZZZ

Note: "linaro" is my username on TB. Yours may be different.
In the URL http://downloads-origin.slimdevices.com you can find other versions of LMS. For Bobby 8.3.1 worke.

Setup a Playlist folder


Set a folder for Playlist separate than the directory where you mount the NAS. Make sure your Playlistfolder is not in the homeroot of your library.Otherwise LMS would add the files in the playlist twice

I made a directory under /media called “music”

sudo mkdir /media/music

And ran these commands to set the right File permissions
sudo chown your.username:lms -R /media/music/
sudo chmod -R 774 /media/music/


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now to install Squeezelite Player

sudo apt install squeezelite
sudo systemctl enable squeezelite


In Tinker Board 2S the output was from the HDMI monitor audio output. The USB DAC was not getting recognized.

The workaround is to edit the /etc/default/squeezelite file

sudo vim /etc/default/squeezelite

Uncomment the line SL_SOUNDCARD=”default:CARD=XXX” and modify as below

SL_SOUNDCARD=”sysdefault:CARD=1”

It will depend on what ALSA Mixer calls your DAC. Mine was CARD=1. Use the digit used by ALSA not the description of the CARD.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Now reboot your SBC

Go to <IP address of your LMS>:9000, set the account for LMS or use your existing account to login.

Now populate the library from "settings > Basic Settings" by directing LMS to your NAS mounted on /media/NAS.

Set the Playlist folder as you have made above at /media/music on the same screen of LMS.

Once it scans and populated the library, good to play.

In "settings > Player" set "Play Other Songs In Album" to "Play other songs in album or directory" . My player was stopping at one song.

"Apply", "Close"

It should now play your music. I got an Android app "Squeeze-Controller" on my phone. On opening it, the LMS was detected and I can control the player from it.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Even after all these I could not play my NAS continuously. It was stopping after one song.

With ALAC files it plays one song and then it is like stuck in a loop. The count down timer for the track counts something like 12 secs and then resets. It is not possible to change track or play another album. Had to reboot the TB. On .WAV files there was no issue.

SL loves FLAC, WAV etc. not ALAC. This has been pointed out on some of the internet forums.

My library was all ALAC files on my NAS. and got the FLAC files on the NAS. Had for fun ripped all my favourite CDs into FLAC on my laptop
.


SL does not start at times.

SL does not start if your USB DAC is not ON or not connected when you startup the TB 2S. If there is a physical switch on the DAC make sure to switch on.

So that ends my rant. Now my LMS on TB 2 S was belting out songs from my NAS, switched to a local radio station available on the LMS.

Youtube plugin was activated, put in the API Key but somehow the sound is not coming from it though I can see the stream playing. Another issue to crack.
 
Get the Award Winning Diamond 12.3 Floorstanding Speakers on Special Offer
Back
Top