Skip to content

Instantly share code, notes, and snippets.

@NoaHimesaka1873
Last active August 9, 2024 10:56
Show Gist options
  • Save NoaHimesaka1873/8ef2396d5296765c37170e54c4ab1745 to your computer and use it in GitHub Desktop.
Save NoaHimesaka1873/8ef2396d5296765c37170e54c4ab1745 to your computer and use it in GitHub Desktop.
How to install and run TIDAL Connect on your Gustard R/A26

For A26 users

This guide should work for your A26 too. just sed "s/R26/A26/g" and it's perfect!

Requirements:

  • Will to practice witchcraft
  • Patience (R26's CPU is really slow)
  • Linux knowledge
  • Windows 10/11 with WSL 2 (updated to latest Windows Store version) or Linux

Update to latest R26 firmware

  1. Go to Gustard official site and download latest firmware.
  2. Do update but don't disconnect USB-C after flashing and continue to next step.

Inserting SSH key to R26

  1. If you're going to Windows WSL route, follow this to mount Gustard R26 to your WSL. Otherwise, just mount your R26 using mount on Linux.
  2. Generate SSH key with ssh-keygen -t ed25519 if you don't have one.
  3. Run cat ~/.ssh/id_ed25519.pub > authorized_keys && mkdir (your R26 mount path)/root/.ssh && cp authorized_keys (your R26 mount path)/root/.ssh but replace (your R26 mount path) to actually mounted directory. If you have other type of SSH key, replace id_ed25519.pub with appropriate file.
  4. Unmount and power cycle (not standby) your R26.

SSHing into your R26 and expanding storage

  1. SSH into your R26 with ssh root@(your R26's IP) but replace (your R26's IP) with your R26's IP address.
  2. Change mirrorlist to use mirror that is close to you.
  3. Install fdisk with apt install fdisk
  4. Run fdisk /dev/mmcblk0 and type d<Enter>n<Enter><Enter><Enter><Enter><Enter>n<Enter>w<Enter> exactly.
  5. Run partx /dev/mmcblk0 && resize2fs /dev/mmcblk0p1
  6. Run apt update && apt upgrade to fully upgrade the system.

Installing TIDAL Connect

  1. Run echo "deb https://deb.debian.org/debian stretch main" >> /etc/apt/sources.list && echo "deb https://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
  2. Run apt update && apt install -y multiarch-support libavformat57 libidn11 git libportaudio2* libflac++6v5* libavahi-common3 libavahi-client3 alsa-utils
  3. Run these lines:
curl -O http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_armhf.deb
dpkg -i ./libssl1.0.0_1.0.1t-1+deb8u12_armhf.deb
curl -O http://security.debian.org/debian-security/pool/updates/main/c/curl/libcurl3_7.38.0-4+deb8u16_armhf.deb
apt remove -y curl libcurl4
dpkg -i ./libcurl3_7.38.0-4+deb8u16_armhf.deb
apt install libidn11
  1. Finally, run these lines:
mkdir /usr/ifi
cd /usr/ifi
git clone https://github.com/shawaj/ifi-tidal-release
chmod +x /usr/ifi/ifi-tidal-release/play
chmod +x /usr/ifi/ifi-tidal-release/bin/tidal_connect_application
chmod +x /usr/ifi/ifi-tidal-release/pa_devs/run.sh
./ifi-tidal-release/file-deploy.sh 
sed -i 's/passthrough false/passthrough true/g' /lib/systemd/system/ifi-streamer-tidal-connect.service
sed -i 's/mqa false/mqa true/g' /lib/systemd/system/ifi-streamer-tidal-connect.service
sed -i 's/HiTide RasPi Streamer/Gustard R26/g' /lib/systemd/system/ifi-streamer-tidal-connect.service
systemctl daemon-reload
systemctl start ifi-streamer-tidal-connect.service 
systemctl status ifi-streamer-tidal-connect.service
  1. All done!
@wikaudio
Copy link

wikaudio commented Feb 3, 2023

I'm currently using firmware 1v4 and tried adding Tidal. Unfortunately I can't log in via SSH, R26 requires root password. I tried chmod 0700 .ssh and chmod 0600 authorative_keys after inserting SSH key to R26 and still nothing. Can you help?

@NoaHimesaka1873
Copy link
Author

@wikaudio uuuh authorative_keys? Major typo there. Also double check sshd config and ensure that root login is enabled and check you have put your full pubkey like:

ssh-ed25519 [CENSORED] test@testhost

@wikaudio
Copy link

wikaudio commented Feb 4, 2023

Problem solved. I was working on a MacBook and it was a bug. I started a linux virtual machine and everything went great.
The only problem is the libcurl package, the tidal service won't start.
libcurl3:armhf depends on libidn11 (>= 1.13)
I typed apt install libidn11 and already Tidal plays wonderfully.

@stegis
Copy link

stegis commented Mar 31, 2023

Hi guys, excellent job. Is this gonna work also for A26 model? Thank you

@wikaudio
Copy link

wikaudio commented Mar 31, 2023

Theoretically, the streamer should be the same. I think it'll work.
There is one more change to the instructions. You can also update upmpdcli which is UPnP Media Renderer. Since the www.lesbonscomptes.com repository key has expired, run the following lines before ssh into R26:

gpg --no-default-keyring --keyring ./lesbonscomptes.gpg --keyserver keyserver.ubuntu.com --recv-key F8E3347256922A8AE767605B7808CE96D38B9201
scp lesbonscomptes.gpg root@(your R26's IP):/usr/share/keyrings/.

Then proceed to: SSHing into your R26 and expanding storage

Additionally:
If you are not using Roon, you can save 50MB of RAM by disabling Roon Bridge.
Temporarily: systemctl stop roonbridge.service
Completely disable: systemctl disable roonbridge.service

@stegis
Copy link

stegis commented Apr 3, 2023

Thats a game changer for me since Iam using Pi4 now with old Gustard X16 and its too many boxes.
Thank you

@swissdave
Copy link

Hi - thanks for writing this up - very nice. I'm trying it on an A26 with renderer 1.4 and having some issues though. Once I got to resizing the partitions it's not working. Upon entering fdisk, it mentions:

A hybrid GPT was detected. You have to sync the hybrid MBR manually (expert command 'M').

Running fdisk on the A26 itself via ssh threw some errors:

Failed to remove partition 5 from system: Device or resource busy
Failed to add partition 5 to system: Device or resource busy

At this point I thought it would probably be safer to remove the SD card and do the work on a Raspberry Pi using an SD card reader. it gave me the same warning about the hybrid partition table(s). Reading a bit it seemed that the answer was to use fdisk to edit both the GPT and hybrid MBR consistently. I did this and the resulting 'p' outputs look like this once I'd deleted the 2G partitiona and re-added it as 20G:

Disk /dev/sda: 29.13 GiB, 31273779200 bytes, 61081600 sectors
Disk model: USB CARD READER
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 55002480-29B9-4356-90C8-24C94DBC99D0

Device Start End Sectors Size Type
/dev/sda1 34976 39071 4096 2M Linux filesystem
/dev/sda2 39072 39327 256 128K Linux filesystem
/dev/sda3 39328 39583 256 128K Linux filesystem
/dev/sda4 39584 105119 65536 32M Linux filesystem
/dev/sda5 106496 42049535 41943040 20G Linux filesystem

..and..

Disk /dev/sda: 29.13 GiB, 31273779200 bytes, 61081600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa21d5667

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 39584 105119 65536 32M c W95 FAT32 (LBA)
/dev/sda2 106496 42049535 41943040 20G 83 Linux
/dev/sda3 1 2079 2079 1M ee GPT

I did a 'w' in MBR mode (didn't seem to do anything) and then 'r' to return to GPT mode and then 'w' to write and exit. On exit, it output:

The device contains hybrid MBR -- writing GPT only.

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

I ran the partx command:

root@raspberrypi:/gust5# partx /dev/sda
NR START END SECTORS SIZE NAME UUID
1 34976 39071 4096 2M boot-resource 41912d3d-3e2e-4f9e-9ef7-b56bc0fbf955
2 39072 39327 256 128K env 60eab35d-a5e8-4c7e-a128-ebd5d1601998
3 39328 39583 256 128K env-redund 3a29484b-ddcd-4059-ba38-176618268634
4 39584 105119 65536 32M boot 9022f3e0-2f71-46cd-9edf-0af16d142b89
5 106496 42049535 41943040 20G 45d175dc-cd93-4b47-b104-5451aa5a0ae6

..which sounded hopeful, but any attempt to run the resize2fs fails:

root@raspberrypi:/gust5# resize2fs /dev/sda1
resize2fs 1.46.2 (28-Feb-2021)
resize2fs: Bad magic number in super-block while trying to open /dev/sda1
Couldn't find valid filesystem superblock.

Seems like the filesystem setup is more complex than it was.. any suggestions welcome.. I thought setting up the GPT and hybrid MBR tables would sort it, but no luck so far.

@picov
Copy link

picov commented Jun 7, 2023

In order to stream the original hi-res Tidal formats I've setup Roon as intermediate component but I don't like this setup.
There is a way to connect Tidal App directly to Gustard R26 over LAN with UPNP ?
At the moment, with Gustard firmware v1.4, from my MacOS Tidal App I'm able to see the R26 only trough AirPlay and this connection seems to not preserve the original audio format.
Thank you.

@NoaHimesaka1873
Copy link
Author

@picov Just follow this guide. It should work even for 1.4.

@stegis
Copy link

stegis commented Oct 2, 2023

Theoretically, the streamer should be the same. I think it'll work. There is one more change to the instructions. You can also update upmpdcli which is UPnP Media Renderer. Since the www.lesbonscomptes.com repository key has expired, run the following lines before ssh into R26:

gpg --no-default-keyring --keyring ./lesbonscomptes.gpg --keyserver keyserver.ubuntu.com --recv-key F8E3347256922A8AE767605B7808CE96D38B9201
scp lesbonscomptes.gpg root@(your R26's IP):/usr/share/keyrings/.

Then proceed to: SSHing into your R26 and expanding storage

Additionally: If you are not using Roon, you can save 50MB of RAM by disabling Roon Bridge. Temporarily: systemctl stop roonbridge.service Completely disable: systemctl disable roonbridge.service

Hi, I have finally get A26 and Id love to have the Tidal Connect on it....unfortunately I have no linux experience at all :((
Would you be please able to help me install it?

@CosminTerpez
Copy link

CosminTerpez commented Nov 9, 2023

Theoretically, the streamer should be the same. I think it'll work. There is one more change to the instructions. You can also update upmpdcli which is UPnP Media Renderer. Since the www.lesbonscomptes.com repository key has expired, run the following lines before ssh into R26:

gpg --no-default-keyring --keyring ./lesbonscomptes.gpg --keyserver keyserver.ubuntu.com --recv-key F8E3347256922A8AE767605B7808CE96D38B9201
scp lesbonscomptes.gpg root@(your R26's IP):/usr/share/keyrings/.

Then proceed to: SSHing into your R26 and expanding storage
Additionally: If you are not using Roon, you can save 50MB of RAM by disabling Roon Bridge. Temporarily: systemctl stop roonbridge.service Completely disable: systemctl disable roonbridge.service

Hi, I have finally get A26 and Id love to have the Tidal Connect on it....unfortunately I have no linux experience at all :(( Would you be please able to help me install it?

Just instal the latest firmware from gustard. It has tidal connect in it.

@stegis
Copy link

stegis commented Nov 20, 2023

Theoretically, the streamer should be the same. I think it'll work. There is one more change to the instructions. You can also update upmpdcli which is UPnP Media Renderer. Since the www.lesbonscomptes.com repository key has expired, run the following lines before ssh into R26:

gpg --no-default-keyring --keyring ./lesbonscomptes.gpg --keyserver keyserver.ubuntu.com --recv-key F8E3347256922A8AE767605B7808CE96D38B9201
scp lesbonscomptes.gpg root@(your R26's IP):/usr/share/keyrings/.

Then proceed to: SSHing into your R26 and expanding storage
Additionally: If you are not using Roon, you can save 50MB of RAM by disabling Roon Bridge. Temporarily: systemctl stop roonbridge.service Completely disable: systemctl disable roonbridge.service

Hi, I have finally get A26 and Id love to have the Tidal Connect on it....unfortunately I have no linux experience at all :(( Would you be please able to help me install it?

Just instal the latest firmware from gustard. It has tidal connect in it.

I have tried to install the latest software. The program provided by Gustard failed. For some reason the usbimager is showing 3 same size disks in Gustard and on all of them installation failed. So I have used balenaetcher which successfully flashed it but Gustard is not showing anywhere after connecting to network.
Anyone with the same problem?

@stefanmadmag
Copy link

stefanmadmag commented Nov 21, 2023

Hello!
I had the same problems as you and I updated twice with "balenaEtcher" to make it work again. The first time the update was ok, but I couldn't see the renderer.

I managed to update the Gustard A26 firmware from ver 1.41 to 1.43.
I switch off the device, insert usb cable from A26 usb-c to laptop usb-c and I started the application "balenaEtcher", you can find it here: https://etcher.balena.io/ and here you have the instructions for the firmware update for A26: https://mega.nz/file/Rol10J7J#c7pXng-5_LFFkhJNkwm4X-nPAEfz_IJkmXYWUkZIWHY
I can confirm that after the update, with firmware version 1.43, Tidal connect and UPnP also work for me.
I tried with Bubble UPnP and mconnect player HD, on the tablet. So until now everything works ok. I will come back in a few days to see if it remains functional :)
I received the update and instructions from service@gustard.com.

Note: Android phones or tablets will require the Tidal version (v2.64.2) from July 2022. PC and Apple are not affected.
Download at https://www.apkmirror.com/apk/tidal...se/tidal-music-2-64-2-2-android-apk-download/

Good luck!

@stegis
Copy link

stegis commented Nov 21, 2023

Hello! I had the same problems as you and I updated twice with "balenaEtcher" to make it work again. The first time the update was ok, but I couldn't see the renderer.

I managed to update the Gustard A26 firmware from ver 1.41 to 1.43. I switch off the device, insert usb cable from A26 usb-c to laptop usb-c and I started the application "balenaEtcher", you can find it here: https://etcher.balena.io/ and here you have the instructions for the firmware update for A26: https://mega.nz/file/Rol10J7J#c7pXng-5_LFFkhJNkwm4X-nPAEfz_IJkmXYWUkZIWHY I can confirm that after the update, with firmware version 1.43, Tidal connect and UPnP also work for me. I tried with Bubble UPnP and mconnect player HD, on the tablet. So until now everything works ok. I will come back in a few days to see if it remains functional :) I received the update and instructions from service@gustard.com.

Note: Android phones or tablets will require the Tidal version (v2.64.2) from July 2022. PC and Apple are not affected. Download at https://www.apkmirror.com/apk/tidal...se/tidal-music-2-64-2-2-android-apk-download/

Good luck!

Hi, thank you for the manual. Just made it work :)

Only its not working when you choose Gustarender in Android app.
In Windows app it works.

Also from Tidal Windows app most of the tracks are only played in "high" version and no in "max" (usually flac 24bit)
MQA seems to be recognized correctly.

Do you have the same experience?
24bit flac files cannot be played/recognized in Tidal Connect mode?

@stefanmadmag
Copy link

stefanmadmag commented Nov 22, 2023

It seems to me that it's ok flac and MQA, but do you have a link with a song only flac? Because it seems that if there are both versions on the server, the MQA version is played. Windows, macOS, android, tablet/phone

@stegis
Copy link

stegis commented Nov 23, 2023

Flac is working but Iam pretty sure not the 24bit.

I believe this one is only 24bit and no MQA version.
https://tidal.com/browse/track/314104753

I have asked Gustard service but no answer yet.

@cdm312
Copy link

cdm312 commented Feb 19, 2024

FYI Tidal Connect now officially supported with firmware 1.43 http://www.gustard.cn/?page_id=8956
I installed the below firmware and use Tidal on a Mac, works for me.
https://www.dropbox.com/scl/fi/ww2wnq35tmp0tnztjm3w3/Tidal-connect-to-A26.jpg?rlkey=r7t8d1bcodyaeanh78003fmiy&dl=0

For overseas
Version: 1.43
Model: R26

@goodsignal18
Copy link

FYI Tidal Connect now officially supported with firmware 1.43 http://www.gustard.cn/?page_id=8956

I installed the 1.43 firmware, but Tidal connect still does not work.

@zaurux
Copy link

zaurux commented Mar 8, 2024

On my A26, it works even if it's abnormal to be forced to have an old android version of Tidal.
On PC, no problem.
My A26 is on sale, so I won't be following developments, but it's a shame Gustard doesn't have software support and an application like EverSolo has.

https://nsm09.casimages.com/img/2024/02/29//24022910300615136318364952.png

@Bosse12
Copy link

Bosse12 commented Mar 16, 2024

Ived updated to 1.43 from the officiell Gustard site. It works fine with the mconnect app connected to Tidal on Ipad but when I am trying to listen to 96 och 192Khz it Will just lag and buffer so im not able to listen to the songs. 44khz will work just fine.Has anyone eller experienced the same? Solutions?

@cdm312
Copy link

cdm312 commented Mar 16, 2024 via email

@Bosse12
Copy link

Bosse12 commented Mar 17, 2024

Oki, thanks. Its the same high res buffer problem with Qobuz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment