Piano Hat script not downloading using curl

Hi,

I cannot get the basic piano hat download to work.
I copied the the line:
curl https://get.pimoroni.com/pianohat | bash
From the website to avoid typos, ifails saying it cannot connect to the internet. If I put:
https://get.pimoroni.com/pianohat
Into the web browser on the same Pi it downloads the script !!
I have tried updating curl, I tried adding sudo to the beginning of the command but that didn’t work. When I tried putting sudo in front of the bash if failed saying “Running as root. Please login as a regular user with sudo rights”
I tried the ic2commands mention in another thread and I got the same numbers as 28 and 2b

Any ideas what I’m doing wrong ?
Regards Dave

Sounds like it could be the script itself running and failing the internet connectivity test. Which seems to have issues due to the fact it uses Google’s DNS IP (8.8.8.8) to check connectivity, and some people block that. Could that be the case on your network?

Hi,
I’m struggling to get the dns to change to 8.8.8.8 I’m reluctant to change the router settings as I use it for work.

I have a download if the script. Can I run that instead of using Curl.

Regards

Dave

There’s no need to change your DNS to 8.8.8.8. It’s just that the script pings this IP address in order to check for an available internet connection. If that IP is blocked, or otherwise unavailable for some reason then the check will fail.

Sorted, well I’ve managed to run the script :)

There is a ping option on the router itself. I could ping 8.8.8.8 from there but not from any connected device so I lowered the security from “Medium” to “Low” and tried the script again. This time it worked. I’ve reset the security back to “Medium”.

Now I’ve just got to learn the piano :)

Thanks for your assistance.

Regards

Dave

1 Like

Ah! We really need to find a reliable way to check for internet. Or perhaps it’s better to simply not check and fail informatively. Or fail the check slightly more informatively. One of those, anyway!

Glad you’re up and running!