Thanks @poetaster , and I want to confirm that your build of Hutspot also works on the XA2. I’m very grateful for your efforts. After starting librespot from the terminal and starting Hutspot, I could instantly start playing music on my XA2. I’ve missed that functionality for months, great that it’s back!
Thanks! I’ve had enough positive feedback that I’m willing to push it to chum and see if I can support it.
Thank you for your effort, I really apreciate that
If someone would suggest the correct Sailjail permissions?
Something like:
Permissions=UserDirs;RemovableMedia;Audio,Internet
Thanks for the built! Appreciate your effort! It is working flawlessly (X10II, SF 4.4.0.68). In order to log in the setting authorize using browser (my translation) needed to be enabled. Using browser for log in worked without any problems. Spotify Connect devices work well. Now I am waiting for Librespot for 64bit.
You can actually install Librespot for 64-bit, you can either compile it yourself (which is quite easy, I have done it myself) or use the package someone built.
You can find instructions to compile librespot as well as a prebuilt aarch64-RPM in this thread:
Instruction: Cargo install error: "This is the stub cargo. If you see this, scratchbox2 is not working" - #5 by Levone1
Pre-built RPM: Cargo install error: "This is the stub cargo. If you see this, scratchbox2 is not working" - #10 by Levone1
I have Hutspot and Librespot running on my Xperia 10 III and use it everyday on my 2-hour-travel to school, and it works (almost) flawless!
I installed the pre-built rpm you have linked, however when i go into the Hutspot settings it says Librespot not available, that’s starting it from the icon or through terminal.
Do i need to do anything else other than install the rpm, i did read online about starting a librespot service but it say it does not exist? Or has anyone else got another rpm i could try?
Got a Xperia 10 III too, so you know
For some reason, the integration of Librespot in Hutspot doesn’t work anymore, I have also had issues with this, even on the 32-Bit version.
However, there is a simple solution: just start librespot from the Terminal everytime you want to use Hutspot.
I personally have written a small Bash-Script for that, so I don’t have to type the whole comman everytime. I have used this command to start Librespot:
librespot --cache /home/defaultuser/.cache/librespot --username <Your Username here> -b 320 -n Xperia10III --backend pulseaudio
(Sorry for the bad formatting, I am writing this on my phone)
You can of course customise the command to your needs, for that I recommend reading the official Librespot-Docs.
After you have executed the command in the terminal, switch back to Hutspot and you will see your device in the devices-section
Thanks for the command, i did try it with the pre-built rpm of Librespot, however it throws an error below, which I’m guessing is a problem with the --backend pulseaudio:
thread ‘main’ panicked at ‘Invalid backend’, src/main.rs:462:53
Do i need cargo installed on my device to be able to use it, sorry if this is something simple I’m doing wrong haha
This sounds like the person who packaged this did “forget” some options when he built it. You could try without --backend, but I don’t know if this will work. If not, I’m afraid you have to compile it yoursrlf (but don’t worry, it’s not too hard).
Cargo you only need for compiling it yourself, otherwise it has nothing to do with Librespot
Try without --backend and report it back here, if it doesn’t work I can write you instructions on how to build it yourself
Thanks, tried without it, gets further in the process but then errors out again. So probably best if i build it myself if you could help out.
Also if i build it myself, if there does come a point where an updated package is released in chum or similar would that update it in the future?
No, as Librespot is not in Chum. If you build it yourself, you basically download only the source-code which you then compile into an executable (very simple explanation)
Ok then, I will try my best to guide you through the steps. For the compilation process I used ressources from
I have a detailed description at home, but I’m currently at work so I’m trying to explain this to you out of my memory. I hope I don’t forget something, otherwise you will need to wait a few hours…
-
Step 1: Install the tools required to build RUST-programs on your phone: Visit this site on your phone and copy the command into your terminal
-
Step 2: Install git (I don’t remember if it is installed by default):
devel-su pkcon install git
if it doesn’t find the package, trydevel-su pkcon refresh
and then try it again -
Step 3: Clone the official librespot-repository:
git clone https://github.com/librespot-org/librespot.git
-
Step 4: Change into the downloaded folder:
cd librespot/
-
Step 5: Install gcc as it is required for the build process if I remember correctly:
devel-su pkcon install gcc
-
Step 6: Build librespot:
cargo build --release --features "alsa-backend pulseaudio-backend"
After that you can execute it with /home/defaultuser/librespot/target/release/librespot --cache /home/defaultuser/.cache/librespot --username <Your Username here> -b 320 -n Xperia10III --backend pulseaudio
If you encounter any problems on the way, just post them here and I will try to help
Got it mostly done, but when building librespot, i get the following error
failed to run custom build command for alsa-sys v0.3.1
followed by:
thread ‘main’ panicked at 'Could not run '“pkg-config” “–libs” “–cflags” “alsa”.
Oh no, not this again. I have built librespot a lot of times, but I always forget this part
You need to install a specific alsa package. I have written it down at home, because I always forget it.
I will be home in approximitly two hours, then I can look it up and post it here
I installed the librespot rpm above but the pulseaudio backend is not found…
[2022-07-26T15:25:38Z INFO librespot] librespot 0.3.1 UNKNOWN (Built on 2022-05-18, Build ID: un1pa8pq, Profile: release)
thread ‘main’ panicked at ‘Invalid backend’, src/main.rs:462:53
stack
You have the same problem, like mentioned above. You need to build Librespot yourself
Ah well no time for that atm. But thanks!
Ok, here is what I forgot to mention:
between Step 5 and Step 6 you need to execute devel-su pkcon install alsa-lib-devel
. After that, you can try Step 6 again and it should work now
Got it compiled and running in the terminal and checking Hutspot shows the device listed, but when i choose set as current it just says “Failed to transfer:404:not found”
There are a few errors showing as below apart from edited to remove IP, would this cause the problems?
WARN libmdns::fsm] couldn’t parse packet from xxxxx:5353: type 47 is invalid