Start a new topic

Setting up the pi-top speaker


 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?


20 people have this question

Latest version of that is already installed as well. 

Type "whereis i2cdetect". If it is not installed, you need to install i2c-tools and wiringpi again. Something is broken in your system. Try apt-get install xxx --reinstall

Sorry, you may have missed this originally. i2cdetect is installed and works. I can call "i2cdetect -y 1" and get the expected output. 

It's only gpio that can't seem to find it. 


pi@pi-top:~ $ whereis i2cdetect
i2cdetect: /usr/sbin/i2cdetect /usr/share/man/man8/i2cdetect.8.gz


i2cdetect was located in the exact same location before I ran updates and after with same permissions. I can't seem to find any other reports of someone having this issue with gpio not finding it except in a few years old forum posts where they were missing the i2c-tools package. 

I did just try your advice of reinstalling wiringpi and i2c-tools package. The results afterward are below.  

pi@pi-top:~ $ gpio i2cdetect
gpio: Unable to find i2cdetect command: No such file or directory
pi@pi-top:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- 71 72 -- -- -- -- --                         
pi@pi-top:~ $ whereis i2cdetect
i2cdetect: /usr/sbin/i2cdetect /usr/share/man/man8/i2cdetect.8.gz 


Very strange. Go to, there "download and Install" and follow instructions.

I have no idea why "gpio i2cdetect" does not work anymore. I just confirmed that this is also the case in my copy of Raspbian. Replacing it in "pt-speaker" with "i2cdetect -y 1" is a good work around, as long as one just uses the rpi2 or 3.

I think I found the problem. One of the things I'd been hoping to find and which you provided was the source for gpio.  I wasn't making the mental connection to it being wiringpi so hadn't looked under that. 

Looking at their source it looks like they changed the way they detect i2cdetect in version 2.36. My current version after the update to pixel is version 2.44. I'm going to have to pull up a fresh install of pi-top os before I ran the pixel updates and confirm that it had a version of gpio prior to version 2.36. If so then I'll try to open a bug report with wiringpi. 

I don't see an obvious way to do that on their website but they have list an email for the developer so I can try that if nothing else. 

Thanks for your help. 

Yes, I looked at the source of gpio too. I cannot see a bug in Gordon's program right away. I think sending him the bug report is a good way to go. I have opened a topic on the raspberrypi forum. He answered once there to a topic I had opened regarding i2c timing.
I have added the workaround for the gpio problem to the instructions at

I didn't see any obvious bug on first look through either but I took another look today and had a colleague take a quick run through and we think we spotted the problem. 

The findExecutable method is being called from the doI2Cdetect method like follows:


if ((c = findExecutable (I2CDETECT)) == NULL)

 I2CDETECT is defined as the absolute path to the binary: 


#define I2CDETECT               "/usr/sbin/i2cdetect"


But the findExecutable method loops through the array searchPath, prepending the searchPath value to the argument the method was called with:


static const char *searchPath [] =
 122 {
 123   "/sbin",
 124   "/usr/sbin",
 125   "/bin",
 126   "/usr/bin",
 127   NULL,
 128 } ;
 130 static char *findExecutable (const char *progName)
 131 {
 132   static char *path = NULL ;
 133   int len = strlen (progName) ;
 134   int i = 0 ;
 135   struct stat statBuf ;
 137   for (i = 0 ; searchPath [i] != NULL ; ++i)
 138   {
 139     path = malloc (strlen (searchPath [i]) + len + 2) ;
 140     sprintf (path, "%s/%s", searchPath [i], progName) ;
 142     if (stat (path, &statBuf) == 0)
 143       return path ;
 144     free (path) ;
 145   }
 147   return NULL ;
 148 }

 So it's looking for i2cdetect in "/sbin/usr/sbin/i2cdetect", "/usr/sbin/usr/sbin/i2cdetect" ect ect and never finding it. 

Lunch break is nearly over so gotta go back to looking at bugs that pay my bills but I'll try to file the bug request for this tonight. 

Sorry to open this thread up again, but I built my Pi-Top recently, and when I finally went to test everything out, the speaker wasn't working.

I'm using Pi-Top OS Polaris.  I've tried everything - both the Terminal commands suggested by Pi-Top and all the steps in the GitHub that were for Pi-Top OS, and the speaker still doesn't work.  When I run the command "i2cdetect -y 1" no numbers show up on the grid, so I think the problem is that the computer doesn't know the speaker is there, somehow.

Anyone have any idea what I should do?

Yes, if i2cdetect does not report the numbers for the speaker, pi-topOS does not know about it and cannot initialize it. Shutdown everything and check the 40 pin cable between the rpi and the hub controller. Carefully check for broken or bent pins. Do the same for the connector between the hub controller and the speaker. I assume you are using a pi-Top CEED. If you are using a pi-Top laptop, the battery displays also uses i2c. If that would work, you would know that the 40 pin cable is ok. On the CEED, does the brightness adjustment work? If yes, you would know that at least spi over the 40 pin cable is ok. It is also possible that your speaker has a hardware problem. If nothing helps, contact pi-top support.

1 person likes this
I purchased two pi-top speakers for my CEED. I cannot determine how these connect inside the CEED. I must be missing a cable that connects to the PI or the CEED power supply board. Should the CEED board have an female edge connector to match the pins on the pi-top speaker?
The hardware installation instructions are inside the cover of the pi-top speaker package. You need to tear it open to see them. Set the switch to (m) for mono, (l) for left or (r) for right.

My speaker is working now!  Out of all of the reasons for why it wasn't working ... the GPIO cable was connected incorrectly.  Whoops.

Thanks for your help though, Rene!

Also, random question: can you use headphones on the Pi-Top?  Or just the speaker?

Login or Signup to post a comment