mcuadros / OctoPrint-TFT

A OctoPrint touch interface for TFT touch modules based on GTK+3
GNU Affero General Public License v3.0
171 stars 79 forks source link

Unable to get display working at all. #13

Open CJeffyB opened 6 years ago

CJeffyB commented 6 years ago

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: https://github.com/mcuadros/OctoPrint-TFT/issues/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 commented 6 years ago

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

CJeffyB commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

@CJeffyB I had an issue with the resolution - as mentioned here https://github.com/mcuadros/OctoPrint-TFT/issues/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 commented 6 years ago

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

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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

mcuadros commented 6 years ago

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

mcuadros commented 6 years ago

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

CJeffyB commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

ksiads commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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_RPiLCD(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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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

neox3 commented 6 years ago

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 commented 6 years ago

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