Hash Sum mismatch on install adafruit-pitft-helper

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

I have a PiTFT Mini Kit - 320x240 2.8" TFT+Touchscreen for Raspberry Pi[ID:1601] which I bought last year. It worked back then but ended up in my to-do box for a year.

I decided to start from scratch; I made a new Raspbian image, and downloaded the latest instructions: Adafruit PiTFT - 2.8" Touchscreen Display for Raspberry Pi.

Everything goes well up until I try to install adafruit-pitft-helper. I tried again after an apt-get update and with --fix-missing, and after a reboot, but always get the same error.

pi@Pi-LAN-5C-77 ~ $ sudo apt-get install adafruit-pitft-helper
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
evtest fbi kpartx libts-bin wiringpi
Suggested packages:
imagemagick
The following NEW packages will be installed:
adafruit-pitft-helper evtest fbi kpartx libts-bin wiringpi
0 upgraded, 6 newly installed, 0 to remove and 21 not upgraded.
Need to get 127 kB/214 kB of archives.
After this operation, 536 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main fbi armhf 2.07-10 [59.7 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libts-bin armhf 1.0-11 [33.1 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main kpartx armhf 0.4.9+git0.4dfdaf2b-7~deb7u2 [34.7 kB]
Fetched 127 kB in 1s (92.0 kB/s)
Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb Hash Sum mismatch
Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb Hash Sum mismatch
Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb Hash Sum mismatch
Unable to correct missing packages.
E: Aborting install.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by adafruit_support_mike »

It looks like you haven't added the Adafruit distro server to the list of servers to contact.

Try doing that, using the instructions from this tutorial: https://learn.adafruit.com/apt-adafruit-com

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

Hi, thanks, it is working now. I did follow the directions in the pdf (by copying and pasting each line - I don't trust my typing):

curl -SLs https://apt.adafruit.com/add | sudo bash
sudo apt-get install raspberrypi-bootloader
sudo apt-get install adafruit-pitft-helper

And the 1st 2 passed but the 3rd one failed.

So this time, following the link you supplied, I followed the Manually Adding the Repository instructions, and now it works!

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by adafruit_support_mike »

Glad to hear it's working for you. Happy hacking!

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

This is a bit embarrassing... I had a working Pi A with 2.8 inch TFT touchscreen that displayed the console, but I wanted to try out pygame, and as always, I did an update/upgrade before trying something new, and I broke it again.

I went thru the process of getting the TFT set up again, but this time it doesn't work. I ran adafruit-pitft-helper and asked it to put the console on the display, but this doesn't work now - it displays on the HDMI monitor but not the TFT display:

Code: Select all

pi@PiCamera ~ $ sudo adafruit-pitft-helper -t 28r
Type = 28r
/boot is mounted
[PITFT] Updating X11 default calibration...
[PITFT] Updating X11 setup tweaks...
Already had 'export FRAMEBUFFER=/dev/fb1'
[PITFT] Updating TSLib default calibration...
[PITFT] Updating SysFS rules for Touchscreen...
Would you like the console to appear on the PiTFT display? [y/n] y
[PITFT] Updating console to PiTFT...
/boot/cmdline.txt already updated
[PITFT] Updating /etc/modules...
Already had stmpe_ts
Would you like GPIO #23 to act as a on/off button? [y/n] n
[PITFT] Updating /boot/config.txt...
Already have an adafruit-pitft-helper section in /boot/config.txt.
Adding new section, but please run:
sudo nano /boot/config.txt
...and remove any duplicate sections.
[PITFT] Success!
[PITFT] Notes:
Please don't run rpi-update, or you'll have to re-install a kernel
with PiTFT support.  For more info, see:
https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/faq
pi@PiCamera ~ $ sudo reboot
Broadcast message from root@PiCamera (pts/0) (Thu Nov  5 20:29:59 2015):

The system is going down for reboot NOW!
I did remove duplicate sections from /boot/config.txt (there were 3). But it still does not display the console on the tft display, and it does not run the pygame example.

Info:

Code: Select all

pi@PiCamera ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7.8
Codename:       wheezy

Code: Select all

pi@PiCamera ~ $ sudo apt-cache show python
Package: python
Source: python-defaults
Version: 2.7.3-4+deb7u1
I must be overlooking something obvious.

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

After a few more tries, it now does not display on the HDMI monitor either. I can still log in with puTTY, but the HDMI monitor displays the boot up information up to a point and then doesn't get further. It looks like it is trying to switch over to the TFT but the TFT remains blank.

I see there is a fresh Wheezy image I can download; I'll try it and come back here tomorrow...

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

I should have read the document, which is pretty clear about not doing an update. Hopefully these displays will be supported in future, so an update won't break the system. I've done this twice now - it's a habit.

I will carry on with the Wheezy and/or Jessie clean images over the weekend.

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

I downloaded the Jessie PiTFT image, and made a fresh SD card. This booted to the X shell on the PiTFT. so I ran raspi-config to boot to the command line, and to use the US keyboard - the GB keyboard doesn't have | so I couldn't do the commands that had a pipe in them.

After I got this to work, I tried shuf /usr/share/dict/words | head -50 | ./machine_stars.py, but this failed because there was no words file in /usr/share/dict/. I looked into this and eventually downloaded a file named "words" from a university, that was full of words, and copied it into the appropriate folder. After this I ran the command a few times with no success, but then connected an HDMI display to the Pi and was surprised to find the machine-stars animation displayed on it. Why is it not displayed on the PiTFT?

I am making progress but there is a lot of trial and error going on and I keep getting lost. All I want to be able to do is to use the PiTFT as a graphics/text display for a python app.

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by adafruit_support_mike »

Did you enter the line:

Code: Select all

export SDL_FBDEV=/dev/fb1
before running machine_stars.py?

That line tells the script which framebuffer to use.

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

Oops - it looks like I didn't.

I tried it now, and now get this:

Code: Select all

pi@PiCameraJessie ~/Adafruit-RasPipe $ export SDL_FBDEV=/dev/fb1
pi@PiCameraJessie ~/Adafruit-RasPipe $ shuf /usr/share/dict/words | head -50 | ./machine_stars.py
Traceback (most recent call last):
  File "./machine_stars.py", line 12, in <module>
    screen = pygame.display.set_mode([320, 240])
pygame.error: Unable to open a console terminal
Note that I chose the option to display the console on the PiTFT, so it is displaying the login prompt, but I'm using puTTY to connect via SSH, since the Pi does not have a keyboard.

[A bit later...] I have connected a powered USB hub and keyboard to the Pi and logged in directly on the Pi, and tried it again. Now I get a similar message bu this time it ends with:

Code: Select all

Unable to open /dev/fb
I'll have to go thru the PiTFT document carefully again to see if I missed anything else.

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

Ok, got it to work. I had typed fb instead of fb1 when using the keyboard directly on the Pi.

I should be ok now, but it looks like I will not be able to use SSH to display on the PiTFT. The python application I'm writing will eventually be a daemon which runs when the Pi starts up, so I think it will be ok.

User avatar
davejs
 
Posts: 28
Joined: Sat Feb 01, 2014 11:27 am

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by davejs »

I just wanted the people who have helped me to know that with their help, I finally "got it", and am now doing what I set out to do. It took a while, but it was worth it.

Now comes the hard part: make it look good!

Thanks!
My Smart Meter.jpg
My Smart Meter.jpg (54.38 KiB) Viewed 173 times

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: Hash Sum mismatch on install adafruit-pitft-helper

Post by adafruit_support_mike »

Looks pretty good already!

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”