3

I'm using libspotify 12.1.103.gd51f6226 Release Linux-armv6-bcm2708hardfp on my Raspberry Pi and I think that everything worked out alright with the instruction in the readme.

I changed out appkey.c for my appkey as given by spotify but when I run the spshell example and try to login, I get an error

FATAL, TERMINATING: failed to log in to Spotify: Cannot connect to Spotify
Logged out
Exiting...

I'm sure that I'm using the correct username (I also tried email) and password (I also tried changing the password) and I've tried the jukebox example as well and get a similar error. I'm able to log into the website and the windows app just fine.

The one place that I think that I might have gone wrong is:

After this, ensure your PKG_CONFIG_PATH is set tocd 
include the libspotify control file, and that the lib directory is
in the library search path.

I'm pretty sure that I did that okay and I don't get any errors during the build.

Any ideas?

SNyamathi
  • 658
  • 6
  • 10
  • I have the same exact problem, have you managed to solve this? I really don't want to switch to the soft float version of weezy. – Daniel Figueroa Feb 19 '13 at 07:08

2 Answers2

0

I can compile and login.

What I did was to simply extract the tar.gz to And then..

sudo apt-get install libasound2-dev libreadline-dev
cd <libspotify folder>/share/doc/libspotify/examples
vim appkey.c 

And then add the application key that you generate. But that seemed to work for you.

make LIBSPOTIFY_PATH=../../../..
spshell/spshell

Then I can login and do a lot of things, I haven't tried any audio yet since I don't have any speakers/headphones available.

If you install it instead using

cd <libspotify folder>
make install prefix=/usr/local 

as described in the README also run

sudo ldconfig

to update the library cache, and then just do a normal compile.

cd <libspotify folder>/share/doc/libspotify/examples
make

If you suspect that you have compiled stuff the wrong way, do a "make clean" first.

Don't know if this is to any help but that is how far I have come.

kmpm
  • 505
  • 5
  • 14
  • What version of raspbian are you running? The one with soft-float or the one with hard-float? I.e can you run java on your raspberry? – Daniel Figueroa Feb 20 '13 at 19:03
0

I had the exact same problem, which you can see from my comments on this question. For me it turned out to be a problem with my username which contains a non-ascii letter ö. But since my plan all along was to use pyspotify I managed to log in using their jukebox example and hardcoding my username where appropriate and adding the nice little u infront of it, and now I can login to spotify, see line ~460 in the jukebox example:

session_m = Jukebox(options.username, options.password, True)

Which i changed to this:

session_m = Jukebox(u"username_with_ö", options.password, True)

Now my problem is another which is that I can't access /dev/dsp but that is an entirerly different problem. :)

EDIT apt-get install alsa-oss solve the above mentioned problem, my raspberry is now playing music!

Daniel Figueroa
  • 10,348
  • 5
  • 44
  • 66