Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Unable to get display working at all. #13

Open
CJeffyB opened this issue Feb 23, 2018 · 27 comments
Open

Unable to get display working at all. #13

CJeffyB opened this issue Feb 23, 2018 · 27 comments

Comments

@CJeffyB
Copy link

CJeffyB commented Feb 23, 2018

I have a PiTFT Plus 480x320 3.5" TFT+Touchscreen for Raspberry Pi. The screen was installed with the commands:
wget https://raw.githubusercontent.com/adafruit/Adafruit-PiTFT-Helper/master/adafruit-pitft-helper2.sh chmod +x adafruit-pitft-helper2.sh sudo ./adafruit-pitft-helper2.sh
The screen works perfectly fine, and will display the console with no trouble.

It is running on a Pi 3 with the latest OctoPi release, Jesse Lite. I have followed the installation instructions:
sudo apt-get install libgtk-3-0 sudo apt-get install xserver-xorg xinit wget https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.2/octoprint-tft_0.1.2-1.jessie_armhf.deb sudo dpkg -i octoprint-tft_0.1.2-1.jessie_armhf.deb
However, nothing changes on the display.

I have also made sure to check the steps listed in this thread:
#5

Things look to be running OK, but there is no output on the TFT.
When installing the TFT software package from Adafruit, as part of the setup, I am given the option to choose if the console appears on the TFT (and choosing "yes" makes the console appear, choosing "no" does not, and keeps the screen blank). However, no matter which option I pick, this package does not display on the TFT.

Is there anything else I can check, or should be doing? What additional information can I provide, in order to assist you with troubleshooting?

I will also note, my brother has the exact same setup as I, and he is having the same issue.

Also, I have noted something, and I'm not sure if it is related or not, please let me know if it should be a separate issue:
My printer is typically "off", and I use the GPIO of the Pi to turn it on when needed. Usually, OctoPrint maintains a blank display in the "Terminal" tab of the website. Once I install OctoPrint-TFT, it is constantly attempting to connect to the printer, and the Terminal tab shows:
Changing monitoring state from 'Offline' to 'Detecting serial port' Serial port list: [] Changing monitoring state from 'Detecting serial port' to 'Error: Failed to autodetect serial port, please set it manually.' Failed to autodetect serial port, please set it manually.
With that sequence in a constant scroll loop.
Again, I have no idea if this is related to my inability to display on the TFT or not, but wanted to include it just in case. If this is not related, please let me know, and I will create it as a separate issue.

@webs1821
Copy link

I've got the same issue with the reconnecting if my printer is off.

@CJeffyB
Copy link
Author

CJeffyB commented Feb 23, 2018

@webs1821
Do you have any troubles with the screen? Should I assume the constant reconnection attempts are unrelated to the lack of display, and file it as a new / separate bug report?

@CJeffyB
Copy link
Author

CJeffyB commented Feb 23, 2018

I did also just verify that OctoPiPanel does in fact work properly on this install. So whatever the problem is, it is something to do with this software, and the installation / running of it...

@webs1821
Copy link

@CJeffyB
I had an issue with the resolution - as mentioned here #8 - but patch resolves my problem. But sometimes resolution changes to higher values when some error occured.
Probably I will be able to write some more during next week because I started to use Octoprint this week and I am still configuring this :)
I think that Octoprint-TFT is a great idea!

@CJeffyB
Copy link
Author

CJeffyB commented Feb 26, 2018

I have managed to fix the display problem, it was a matter of a couple different things. Here are the steps I followed:

  • Install the TFT with Adafruit's script:
    cd ~ wget https://raw.githubusercontent.com/adafruit/Adafruit-PiTFT-Helper/master/adafruit-pitft-helper2.sh chmod +x adafruit-pitft-helper2.sh sudo ./adafruit-pitft-helper2.sh
    When asked if you want the console to appear on the PiTFT display, answer "yes".
  • Install the prerequisites for OctoPrint-TFT:
    sudo apt install xserver-xorg sudo apt install xinit sudo apt install libgtk-3-0 sudo apt install xserver-xorg-video-fbdev
    The last item, "xserver-xorg-video-fbdev" was needed because OctoPrint does not include the required display driver.
  • Install OctoPrint-TFT:
    wget https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.2/octoprint-tft_0.1.2-1.jessie_armhf.deb sudo dpkg -i octoprint-tft_0.1.2-1.jessie_armhf.deb
  • Create the X config file for the TFT:
    sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf
  • Paste the following contents:
    Section "Device" Identifier "Adafruit PiTFT" Driver "fbdev" Option "fbdev" "/dev/fb1" EndSection
  • Remove an old / incorrect config file:
    sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
  • Change the OctoPrint-TFT service to output to framebuffer 1, rather than 0:
    sudo nano /lib/systemd/system/octoprint-tft.service
    and edit the command line from:
    ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor
    to
    ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :1 -nolisten tcp -nocursor
  • Make sure things are linked properly:
    sudo ln -sf /lib/systemd/system/octoprint-tft.service /etc/systemd/system/display-manager.service systemctl set-default graphical.target
    Reboot and thing should work!

The constant attempts to connect to the printer are still continuing, and I'm pretty certain they are a separate issue. I will repost that.

@CJeffyB
Copy link
Author

CJeffyB commented Mar 7, 2018

@mcuadros The above steps are what was necessary to get the Adafruit PiTFT working. I don't know if you want to close this, and add those steps in a note as part of the setup instructions, or not. But I wanted to have them documented somewhere...

@peteboz
Copy link

peteboz commented Mar 17, 2018

FYI the steps above also work for the Waveshare 3.5inch RPi LCD (A) 320×480 display. Just be sure to replace the Adafruit install script in the first step with driver from the waveshare site. The rest appears to work the same. Thanks.

@amrithmmh
Copy link

@CJeffyB thanks for the steps...yes i think you should add this to the readme file it works on Waveshare 3.5 lcd(B)

@CJeffyB
Copy link
Author

CJeffyB commented Mar 25, 2018

@mcuadros how could I go about adding these steps to the readme / documentation? Or is that something that you need to do?

@mcuadros
Copy link
Owner

you can add it, to the Wiki, and reference it from the readme. Thanks!

@mcuadros
Copy link
Owner

(the strange thing is that I create the project using a Waveshare 3.5)

@CJeffyB
Copy link
Author

CJeffyB commented Mar 26, 2018

I believe I have done so. The only (small) issue was that there is no wiki on the main repo, so I could only create the page on my fork. The Readme references that wiki, and should probably be adjusted once the wiki exists on the @mcuadros branch.

I also took the liberty of making a few grammatical corrections/updates...

@ksiads
Copy link

ksiads commented Jun 4, 2018

I've tried just about everything I can think of to get OctoPrint-TFT running on my 3.5" Waveshare but no luck. I wanted to try CJeffyB's Adafruit script but I wasn't sure how to replace the Adafruit driver in the first step with the Waveshare driver.

Has anyone been able to figure out how to get OctoPrint-TFT working on a Waveshare 3.5?

Any help would be greatly appreciated.

@DomDale
Copy link

DomDale commented Jun 4, 2018

@ksiads Having the same issue; can get a console to display but cannot get it to boot to the x server.

@ksiads
Copy link

ksiads commented Jun 4, 2018

I'm able to get the Waveshare 3.5 LCD to display once I install the driver, but it doesn't seem to play nicely with OctoPrint-TFT. I get no display after I install OctoPrint-TFT, so I'm pretty sure it's a driver issue, but how do I remedy it? That's the question.

@DomDale
Copy link

DomDale commented Jun 4, 2018

@ksiads Interesting - I can't even get a blank screen (stuck on terminal). Followed this then the instructions on the releases page.

EDIT: Nevermind - fixed. Didn't properly remove old config.

@DomDale
Copy link

DomDale commented Jun 5, 2018

@ksiads Here is what I did to get it working:

  1. Followed this guide to get it working on my phone: https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

  2. Install dependencies: sudo apt install xserver-xorg xinit libgtk-3-0 xserver-xorg-video-fbdev

  3. Remove old config (new one should have been generated): sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~

  4. Change the OctoPrint-TFT service to output to framebuffer 1, rather than 0:
    sudo nano /lib/systemd/system/octoprint-tft.service
    and edit the command line from:
    ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor
    to
    ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :1 -nolisten tcp -nocursor
    (basically what @CJeffyB said).

  5. Reboot

@ksiads
Copy link

ksiads commented Jun 5, 2018

Eureka!!! Finally got OctoPrint-TFT to "take".

Thanks to all who helped. I couldn't have stayed with it without your suggestions.

I kept notes while I was installing. If anyone might find them useful just let me know and I'll post them here (or wherever you specify).

Quick question - how do I set up profiles for temp/filament?

Here's the new OctoPrint-TFT machine: https://goo.gl/36M1pt

@amrithmmh
Copy link

@ksiads is your "Files" working properly? If yes where is the source of the files(location of files i.e sd card attached to the 3d printer, or local files in the raspberry pi?)
I was able to get the Octoprint-TFT but the files were not working at all
My setup is mega+RAMPS 1.4+ adafruit full smart reprap controller(with sd card containing files)+ Octopi in raspberry pi 3b+ waveshare lcd 3.5B

@ksiads
Copy link

ksiads commented Jun 6, 2018

Hi, amrithmmh. My .gcode print files are located in a directory I created in the OctoPrint web interface. The location on the MicroSD card is:
/home/pi/.octoprint/uploads/Print_Files

In answer to your question, no, the files functionality of OctoPrint-TFT is not working correctly. I do not see any of my files in the interface. Nor can I upload to my Print_Files directory. I suspect there are settings to be worked with in config files, but I haven't started on that yet. I was just happy to get the button interface running for now.

@ksiads
Copy link

ksiads commented Jun 6, 2018

Update: I was able to get the Files function working.

In the OctoPrint web interface, go to Settings and select Folders. In the Upload Folder section, specify the absolute path to your stored files. In my case the files are stored in a folder I created named "Print_Folders", and the path is: /home/pi/.octoprint/uploads/Print_Files

Reboot OctoPrint (web interface) and your RPi. You should now see your uploaded files.

@amrithmmh
Copy link

amrithmmh commented Jun 7, 2018

@ksiads thanks...i could never figure out and i raised an issue but no one gave me a solution nor is it mentioned in the readme files

thanks again
update: couldnt get it working i get error unmarmarshal number 4727..(very long number) into go struct response.Free of type int(but files stored in the sd cardconnected to the full smart reprap controller lcd are shown but the error bothers me a lot)
and some files are shown with 0 bytes size and if i give print then again it throws an error file not found in local nor sdcard

@amrithmmh
Copy link

@ksiads strange octoprint-tft with raspberry pi zero w and octopi is just flickering on and off but the same iso image works on raspberry pi 3b

@ksiads
Copy link

ksiads commented Jun 7, 2018

@amrithmmh Make sure you configure your /etc/octoprint-tft-environment file as follows:

From OctoPrint web interface, go to Settings, then API
Copy your API Key

Using Putty, log in to Octoprint as pi

Command:
sudo nano /etc/octoprint-tft-environment

Paste your API Key in the OCTOPRINT_APIKEY= section

Add the absolute path to octoprint's config.yaml file in the OCTOPRINT_CONFIG_FILE= section (most likely /home/pi/octoprint/)

In the OCTOPRINT_HOST= section add your default localhost URL (most likely http://octopi.local)

Save and Exit (Ctrl+X, Y, Enter)

Reboot

@The5py
Copy link

The5py commented Aug 12, 2018

All I'm seeing is
octoprint-tft
an image of octopus holding a ball

@neox3
Copy link

neox3 commented Aug 16, 2018

same problem that @The5py , but i can see all the screen
@The5py remember:
sudo nano /etc/octoprint-tft-environment
and the line: OCTOPRINT_TFT_RESOLUTION=
has to be empty.

after this, the demon octopus and a message of : Connecting to octoprint
using: https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

someone knows what is going on? all the other things are ok

very thanks

@amrithmmh
Copy link

raspberry pi has to be connected to the 3d printer via usb cable
the resolution should be fixed too

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants