Start a new topic

Setting up the pi-top speaker

 Hi,


 i got my pi-top Ceed and the Speaker this week. Is installed the package and set the speaker to mono. I2C is enabled and the Ceed was rebooted. Than I wanted to play music with the omxplayer. Tried both normal and hdmi, and I tried the mplayer...


But there were nothing to hear. What can I do, to get it to work?


Thanks.


20 people have this question

Sorry, All I can say in your case is that the speaker software has not been installed.

Got my 2nd Pi-Top Speaker and ProtoBoard today. Sadly, on my Pi-Top there is only room for 2 speakers or 1 speaker and 1 ProtoBoard. So I had to decide which to fit. For me the speakers were what I wanted and I bought the ProtoBoard as a 'just in case I ever need it' purchase. 


Good news is that I now have stereo on Kermit.


I also have Rene Richarz' battery monitor on my desktop TaskBar.


A big thank you to Rene for his excellent work for newbies like me. I know how it all works, but that is only theory. Rene saves us all the hard grind on ferreting out and coding for ourselves. He's a great resource and his efforts are much appreciated.


1 person likes this

 I got a Pi-Top CEED today, it has a Pi-Top Speaker and ProtoBoard installed but I can't get any sound from it, I've tried everything listed above, and got all the correct responses but still no sound at all.

I assume you have gone through this document: github.com/rricharz/pi-top-install/blob/master/speaker.txt
Something strange has happened, after posting I was looking through some of the Python games and suddenly the sound started working.


 

If you are using the pi-top speaker with Raspbian Jessie, and manually upgrade to the newest PIXEL desktop, the speaker will stop working. See at the bottom of github.com/rricharz/pi-top-install/blob/master/speaker.txt to resolve this issue.

1 person likes this
It isn't working again today, I've tried everything in the github.com/rricharz/pi-top-install/blob/master/speaker.txt again today but still no sound.

 

I propose that you open a support-ticket and ask pi-top for help. Please let the community know here if you find out what was causing your problem and how it can be resolved.

Thanks, I'll try that.

 

Rene, you were more help than the support-ticket, the reply from there was:


 

To install the pi-topSPEAKER software enter the following command into your Terminal then reboot.

sudo apt-get update
sudo apt-get install -y pt-speaker

 Which I have already done several times and it doesn't work.

 

Rusty, I am sorry to hear that. If you are reasonably experienced with Linux , you can try to do the following to check whether the speaker gets properly initialized:


Open a terminal and type (with the "space dot" at the end)

cp /usr/bin/pt-speaker .


This makes a local copy of pt-speaker in your home directory.


Now edit the lcal copy of the pt-speaker script in your home directory. You can open a file manager window, right click on pt-speaker in your home directory and choose Text Editor.


Navigate to the line 

python /opt/pt-speaker.........


Carefully remove the "> /dev/null" at the end of that line. Do not remove the "&".


There are 4 lines in this script starting with #echo .....

Remove the # in front of these 4 lines


Save the file and quit the text editor


Now kill the already running pt-speaker task

pkill pt-speaker


Now start your modified pt-speaker task in your terminal (with a "dot" as the first character)

./pt-speaker


You should get the following output right away, if the speaker is properly initialized:

I2C is enabled

Speaker is present.

New connection - initialising!

73

Done! Exiting...

Speaker is present.

Not a new connection!

Speaker is present.

Not a new connection!

Speaker is present.

Not a new connection!

Speaker is present.

...........


If you get this output right away, the speaker has been properly initialized and should work. If it takes a while, this would point to an unreliable i2c connection. Normally this happens in background and the output cannot be seen.


Restart your computer to go back to normal use.




1 person likes this
Question? Does the Dashboard and Home screen have sound? I only ask this because when I first installed my speaker and downloaded to driver, I didn't get any sound from the system (on a Pi-Top laptop) but when I ran CEED Universe I did get sound. Also when I tried YouTube the videos played sound, as did internet radio. Incidentally, Raspbian can play sound as described above, but I've had no luck with KanoOS on the Pi-Top.

Ian, as far as I can see the Dashboard and Home screen do not have sound.


I have no experience with KanoOS, but it would be interesting to get the speaker software to work there. I have two scripts which allow to copy the speaker software from pi-topOS and install it completely manually in Raspbian, rather then using "apt-get install pt-speaker". Because KanoOS is a flavor of Raspian, I think one could get it to work following the individual commands in install-speaker. Most likely one does need another way than "autostart" to automatically start pt-speaker during boot and/or the autostart file is at a different location.


The way the scripts need to be used is as follows:


Bootup on with a pi-topOS SD card, on which the speaker has been installed and is working. Insert a usb-stick (for data transfer), start a terminal and type:

cd /Media/pi

cd cardname (where cardname is the name of your usb-stick)

mkdir speaker-files

cd speaker-files


Copy the two attached scripts into this directory speaker-files on the usb-stick

Then make them executable with:

chmod +x *-speaker


Copy the speaker files from pi-topOS with

./backup-speaker


You should now have 3 additional files in speaker-files. Check with

ls


Shutdown pi-topOS and boot on your standard Raspbian SD card, on which you want to install the speaker. open a terminal and type

cd /Media/pi

cd cardname (where cardname is the name of your usb-stick)

cd speaker-files


Install the speaker software by typing

./install-speaker


If you want to install the speaker software on any other OS than standard Raspbian, install-speaker will probably not work right away, but you might be able to look at the install-speaker script, execute the individual commands in it one by one and modify them as needed. For standard Raspbian they should work right away.


(588 Bytes)

2 people like this

I've followed your instructions Rene. When I start pt-speaker I get:


 

I2C is enabled
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found
./pt-speaker: line 93: gpio: command not found

 

Rusty, you should be able to fix this with the following command: sudo apt-get install wiringpi Could it be that you were running sudo apt-get autoremove recently? That might have removed the wiringpi library, but it is required for the speaker macro. Please let me know whether this helps so that I can update the speaker procedures

2 people like this
Login or Signup to post a comment