PiCorePlayer 3.21 + Waveshare 3.5" TFT screen + Jivelite.

A disclaimer, this is not all my own work, so many thanks to all those who contributed their time and knowledge for the benefit of us all.

This page briefly explains how an equivalent to the late lamented Squeezebox Touch can be build for relative peanuts.

What you will need :

Raspberry Pi 2A suitable Raspberry Pi I used a 2B+£30 / €40
SD Card4GB SD card£4 / €5.50
Power Supply5 volt 2 Amp power supply£5 / €7
Waveshare Spotpear 3.5 LCDA TFT screen - I used a Waveshare Spotpear 3.5"£20 / €28
Remote ControlOptional - Generic remote£6.50 / €9
 TOTAL£67.50 / €89.50

For your convenience a pack of all the extra / changed files you made need specifically for piCorePlayer 3.21 is available for download here.

For those of you who would like to take the easy way out, an image file (compatible with Rpi 2/3) of this set-up with analogue sound only is available for download here (img size < 95mB, download < 60mB). User : pi Password : piCore


Getting Started

I am a windows user, specifically Windows 10, and this guide has been written from that standpoint. I am sure that other OS users will be able to extrapolate to suit your own preferred environment - but please don't ask me about things not in this guide.

What you need on Windows.

  • WinSCP - a free SFTP, SCP and FTP client for Windows,
  • Putty - a free implementation of SSH and Telnet for Windows with an xterm terminal emulator,
  • Advanced IP Scanner - a reliable and free network scanner to analyse LAN,
  • a spare wired ethernet connection to your LAN.
  • Win32DiskImager - a Windows tool for writing images to USB sticks or SD/CF cards.
  • NotePad++ (or similar) - Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages. I have also set this up to be the default editor in WinSCP.

Source files you need to download.

piCorePlayer 3.21 - https://sites.google.com/site/picoreplayer/home/download


Set-up piCorePlayer

  • using Win32DiskImager write the piCorePlayer image that you downloaded previously to your SD card.

    Win32DiskImager

  • with your SD card still in the windows machine,
    • EITHER use explorer to replace cmdline.txt and config.txt with the equivalent files downloaded from the pack above,
    • OR use Notepad++ to append fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo to the end of the first (and only) line in cmdline.txt

      cmdline.txt

      and change config.txt with the following :

      framebuffer_width=480
      framebuffer_height=320


      and

      [ALL]
      #----------------------------------------------------
      dtparam=i2c=on,spi=on,i2s=on
      dtoverlay=ads7846,speed=1000000,penirq=17,penirq_pull=2,swapxy=1,xmin=200,xmax=3900,ymin=200,ymax=3900,pmax=255,xohms=60
      #---pCP----------------------------------------------


      it should now look like this

      config.txt

  • eject the SD card from the windows machine,
  • place the SD card in the Raspberry Pi [Rpi], connect to Ethernet and power on,
  • run Advanced IP Scanner to identify the IP address used by the Rpi, now loaded with the PiCorePlayer PCP image
  • enter this address into your browser to bring up the PCP web interface,
  • go to the Main Page and at the bottom select Beta mode,

    PCP Main Page

  • still on the Main Page select the Resize FS button and choose to increase the size to 100 MB

    Resize File System

  • go back to the Main Page and select the Extensions button at the end of the second section.
  • select the piCorePlayer sourceforge repository and click the Set button
  • select the pcp-jivelite__default-wavskin.tcz extension from the repository and click on the Load button.

    Load TCZ Extensions

    the default Skin and all its dependancies will then be automatically loaded.

  • Check that the extensions have loaded,

    TCZ Extentions Loaded

    and remember to hit the Reset button before returning to the Main Page
  • run WinSCP and log into PCP using the address obtained from Advanced IP Scanner with username tc / password piCore),
  • using WinSCP, edit /opt/bootlocal.sh to include the following 2 lines, see template downloaded from the pack above,

    modprobe flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3 (line 1)
    modprobe fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24 (line 2)


    it should look like this

    bootlocal.sh

  • go to the Tweaks page and in the Jivelite section ensure that Set Autostart is set to Yes. Now hit the Reset button.

    Jivelite Autostart and Reset

  • At this point Jivelite output is still directed to HDMI and not our TFT screen, so we need to make some minor changes,
    • using winSCP copy the file jivelite.sh from the jivelite file pack to /mnt/mmcblk0p2/tce/, or edit it to look like this. MAKE SURE it is executable.

      jivelite.sh

    • using winSCP overwrite the existing file /home/tc/www/cgi-bin/do_rebootstuff.sh with do_rebootstuff.sh from the jivelite file pack, or edit it so that the end of the looks like this

      do_rebootstuff.sh

  • on PCP web interface Main Page select the Backup button from the second section to backup the changes,
  • on PCP web interface Main Page select the Reboot button.

Following the re-boot, the jivelite application should appear on your TFT screen. attach an USB keyboard or mouse and choose your language / wallpaper, etc. You should now to able to go to My Music and play music from your LMS server.

Working Player


Calibrate the Touch Screen

  • boot up your PiCorePlayer - PCP,
  • run Advanced IP Scanner to identify the IP address used by the PCP,
  • run Putty and log into PCP using the same address with username tc / password piCore),
  • using Putty, enter cat /proc/bus/input/devices to obtain the event number being used by the touchscreen,
  • enter the PCP IP address address into your browser to bring up the PCP web interface,
  • at the bottom of the first screen, select Beta mode,
  • go to the Tweaks page and set jivelite autostart to no, save the config and reboot. Jivelite must not be running during the calibration,
  • after the reboot, run Advanced IP Scanner to identify the IP address used by the PCP,
  • run Putty and log into PCP using the same address with username tc / password piCore),
  • using Putty, enter sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/event0 /usr/local/bin/ts_calibrate, MAKE SURE that the event number matches that obtained above, then follow the instructions,
  • enter sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/event0 /usr/local/bin/ts_test, using Putty to check that the calibration has been sucessful,
  • enter the PCP IP address address into your browser to bring up the PCP web interface,
  • go to the Tweaks page and set jivelite autostart to yes, save the config,
  • using Putty, enter sudo filetool.sh -b to backup the changes,
  • using Putty, enter sudo reboot

Following the reboot, with the help of the deity of your choice and a hefty following wind, it should now all be working. If so, congratulations, if not, sorry, start again !

This process has been tested on piCorePlayer 3.21 with a Waveshare SpotPear 3.5 inch TFT screen and Jivelite on an Rpi 2B+ [and on an Rpi 3] (ARMv7).