RainbowHat installer


#1

Hi there,

I have a friend who has purchased a number for Rainbow Hats for school but she is having difficulty getting the software installed. Her Pi is online and she can browse the web fine. She enters “curl https://get.pimoroni.com/rainbowhat | bash” into her terminal and the file is downloaded and begins to try to install. However it then fails with the message “You don’t appear to be connected to the internet, please check your connection and try again!”

Now she obviously is connected to the Internet as she downloaded the script with curl and can browse…

Looking into the code, it looks like the check_network() function is checking to see if it can ping Google’s DNS server, and if no response is received this error message is presented…

I am waiting for confirmation from my friend if this is the case; but I know from experience many school firewalls will block outgoing ICMP packets, which of course cause this test to fail.

Is there any other way that we could check for connectivity rather than relying on ping? What about this for the check instead? “wget --spider https://get.pimoroni.com/rainbowhat

Jon


#2

An alternative is to use pip to install the library. That will sidestep the one-line-installer checking for outgoing network access.

You can install it with sudo pip install rainbowhat.

Note that you’d have to download the example scripts separately from the GitHub repo.