Tibus / TouchScreen-For-NanoDLP

Nextion Touch Screen => NodeJS => NanoDLP By Mango3D
http://fb.com/mango3dslicer
MIT License
79 stars 74 forks source link

Attempting to use with Pi3 - Nextion hangs on "connecting to printer...." #3

Open sgraber opened 6 years ago

sgraber commented 6 years ago

I've followed all of the steps to have the display work with the Nextion 2.4" display on my Raspberry Pi 3, but the display hangs on "connecting to printer..." Is there any sort of log I can be looking at to see why it's hanging? Also: I'm assuming that I am to be enabling the login shell over serial from raspi-config (Advanced -> Serial -> Yes)? Or should this be set to No?

diginfo commented 6 years ago

Hi, I have the same problem, all steps followed (not difficult !) and all I get is connecting to printer.

Did you solve this ?

Tibus commented 6 years ago

did you try this ? https://www.nanodlp.com/forum/viewtopic.php?id=710

diginfo commented 6 years ago

Thanks, yes I did, but it did not work for me, but I am using original RPI3 (not B).

Here's how I got it to work:

# get the pi3 overlays
wget https://github.com/PiNet/PiNet-Boot/blob/master/boot/overlays/pi3-disable-bt-overlay.dtb
mv pi3-disable-bt-overlay.dtb /boot/overlays

wget https://github.com/PiNet/PiNet-Boot/blob/master/boot/overlays/pi3-miniuart-bt-overlay.dtb
mv pi3-miniuart-bt-overlay.dtb /boot/overlays

# edit /boot/config.txt & append:
dtoverlay=pi3-disable-bt
dtoverlay=pi3-miniuart-bt-overlay
force_turbo=1

The source for the overlays was just found via google, but could be from another source.

These files don't exist in my /boot/overlays folder.

Tibus commented 6 years ago

Is it working now by doing this? I have to write a bash file to configure in one step all you need on raspberry pi 3/pizero/pi3B,...

diginfo commented 6 years ago

Yes, it's working now, but I also did and un-did a lot of things over the last few hours during my debug process, however these steps did make it work.

Before that I got the following errors in the output.log:

list [ { comName: '/dev/ttyAMA0', manufacturer: undefined, serialNumber: undefined, pnpId: undefined, vendorId: undefined, productId: undefined }, { comName: '/dev/ttyS0', manufacturer: undefined, serialNumber: undefined, pnpId: undefined, vendorId: undefined, productId: undefined } ] error opening port /dev/ttyAMA0 retry in 2 seconds

There might be a better source for the overlay files, but they worked.

diginfo commented 6 years ago

Oh yes, also when loading the .tft file, I got an error something like "wrong model" - this is because I am using the advanced version with the built in RTC.

I re-compiled changing the model number to the advanced and used this file to load.

I saw another user on the forum reporting the same error, might be worthwhile adding comments or notes for this.

In your original readme, you stated 2.4" but you did not indicate standard or advanced version, I did not know that it made a difference when I ordered the screen !

Or provide 2 versions of the Screen.tft file, one for advanced version and one for std.

Tibus commented 6 years ago

Yes, I didn't have advanced version and tought there was no error running the standard .tft file on an advanced screen. I'll add .tft for every version in the future

diginfo commented 6 years ago

It would also be nice (if you have the time) to design a version that emulates the new wanhao box :-)

Tibus commented 6 years ago

For the UX part? Yes, I'm planning to redo all the UX. Do you have a video of the wanhao box screen UX?

jamesarm97 commented 6 years ago

Emulates or "looks" like the wanhao UI, because if you emulate it, it will be a step backwards ;)

jamesarm97 commented 6 years ago

Manual http://www.wanhao3dprinter.com/xiazai/OQD08011_D7_Box.pdf

jamesarm97 commented 6 years ago

The main menu / icons look good but everything past that is very basic and plain. No image preview / layer preview or anything.

diginfo commented 6 years ago

The level of control is great, but the UI design can be a bit 'fiddly' if you have big sausage fingers or your eyesight is not so good ;-)

Tibus commented 6 years ago

yes, I 'll never emulate it ;D just take best points and try to reproduce it. I see a video, it's nice but there is no image/print preview,... but it's nice, I'll do my best to make a better UX for nanoDLP/nextion ;D

Dylan144GT commented 6 years ago

Hi Tibus,

Have you managed to interface to USB yet? I am busy doing a similar thing to you except I am using Python instead of NodeJS. The reason I ask is because I am having trouble submitting a form to nanoDLP with a post request. I get a 200 response when I post but nothin happens. Any ideas?

Thanks,

Dylan

Tibus commented 6 years ago

Hi, Not done yet, 'll work on it in few weeks.

Dylan144GT commented 6 years ago

Okay, thanks. Thanks for a good project BTW! :)

Maxjewels commented 6 years ago

I use the advanced version 3.2 "with rasp pi 3 and I did not have any problem

diginfo commented 6 years ago

Had to do a re-install from scratch using release 1437 as I am using the wanhao D7 and are unable to get past the "connecting to Printer' again.

I have checked and repeated all the steps that are listed in the forum but still nogo, not sure if it is a compatability issue with V1437 ?

There's nothing obvious in the output.log file (previously it was unable to connect)

{ nextion: { port: '/dev/ttyAMA0' }, pushbullet: { apiKey: null } } { apiKey: null } init connect to port /dev/ttyAMA0 list [ { comName: '/dev/ttyACM0', manufacturer: 'Arduino__www.arduino.cc_', serialNumber: 'Arduino__www.arduino.cc__Arduino_Mega_2560_7563331323335191C181', pnpId: 'usb-Arduino__www.arduino.cc__Arduino_Mega_2560_7563331323335191C181-if00', vendorId: '0x2341', productId: '0x0010' }, { comName: '/dev/ttyAMA0', manufacturer: undefined, serialNumber: undefined, pnpId: undefined, vendorId: undefined, productId: undefined }, { comName: '/dev/ttyS0', manufacturer: undefined, serialNumber: undefined, pnpId: undefined, vendorId: undefined, productId: undefined } ]

I have tried running the node app directly from the console, but I get no errors, only the output as above, how can I troubleshoot this ?

Dylan144GT commented 6 years ago

Hi Tibus,

Can you please tell me how you formulate the time remaining of a print? Ie. what information you fetch from where and the formula you apply with that information in order to calculate the remaining time of a print.

Thanks for the help.

Dylan

Tibus commented 6 years ago

Hello, The time remaining is calculated by NanoDLP, not my software.

Dylan144GT commented 6 years ago

Thanks for the response, I found what I was looking for though. It was in "PrintingHome.js" line 51 and 52. Thanks!

Tibus commented 6 years ago

Oups, sorry, I didn't remember Nanodlp do not send time remaining in minute or so. So I take the formula from NanoDLP Javascript home page.

sgraber commented 6 years ago

@Tibus : Is there a way to get debugging information when trying to connect your Nextion software to the Pi? I added four buttons to the Home screen, adjusted the js accordingly (I think?), compiled it, installed it. I'm now trying to debug why my custom buttons are not working. I'd like to see what calls are being made when I push a button. Is there a Pi debugging console somewhere?

Tibus commented 6 years ago

I never debug on the raspberry. If you run node bin/index.js on your computer, with the ip of your nanodlp computer in the config file ans the nextion screen connected to your computer (with so the good COM port in the config), the screen will manage NanoDLP trough the ethernet and you will be able to debug it.

Elsewhere, you can pkill node and run DEBUG=* node bin/index.js inside the nextion folder on your raspberry pi to get the debugging console on your raspberry

sgraber commented 6 years ago

Would someone mind looking at my code?

https://github.com/sgraber/TouchScreen-For-NanoDLP

I'm literally just trying to add four buttons to the home screen. I've added four buttons to the "home" screen in the Nextion Editor (see 2.4_LittleRP.hmi) and have added what I think are the proper calls to the home.js file in both the /src and /bin directories.

Any time I push these buttons, absolutely nothing happens. I'm at a loss.

jcrorxp commented 6 years ago

@sgraber i think you need to add some Page file ?

BeardyWargameSi commented 6 years ago

HI I have a Nextion 3.5" Screen - NX4832T035 and this just is not working at all. Tried the steps I don't know how many times in the last 24 hours, including the long walkthrough on the Tips and Tricks nanoDLP page, nothing. :/

I've updated to the latest stable build of nanoDLP, etc etc.

Honestly at my wits end with this and any help would be greatly appreciated.

The screen is stuck on a connecting to printer loop

Thanks

setal2003 commented 6 years ago

Hello there I have done all the steps and it still doesn't work at the end I get the message of can not unlink certain directories Please help! thank you

pi@raspberrypi:~ $ mkdir /home/pi/nextion;(wget https://github.com/Tibus/TouchSc reen-For-NanoDLP/releases/download/V0.2/pi2_3.tar.gz --no-check-certificate -O - | tar -C /home/pi/nextion -xz);cd /home/pi/nextion; sudo ./setup.sh --2018-01-22 22:37:22-- https://github.com/Tibus/TouchScreen-For-NanoDLP/releas es/download/V0.2/pi2_3.tar.gz Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112 Connecting to github.com (github.com)|192.30.253.113|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/963614 42/9c96c61a-be85-11e7-807d-eba7033ee479?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-C redential=AKIAIWNJYAX4CSVEH53A%2F20180122%2Fus-east-1%2Fs3%2Faws4_request&X-Amz- Date=20180122T223723Z&X-Amz-Expires=300&X-Amz-Signature=d051cdb3832d626dff2ac94f 97d5b6c844f5a7f8a5c7ae5e5a85e5d9cdb45025&X-Amz-SignedHeaders=host&actor_id=0&res ponse-content-disposition=attachment%3B%20filename%3Dpi2_3.tar.gz&response-conte nt-type=application%2Foctet-stream [following] --2018-01-22 22:37:23-- https://github-production-release-asset-2e65be.s3.amazo naws.com/96361442/9c96c61a-be85-11e7-807d-eba7033ee479?X-Amz-Algorithm=AWS4-HMAC -SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180122%2Fus-east-1%2Fs3%2Faws4 _request&X-Amz-Date=20180122T223723Z&X-Amz-Expires=300&X-Amz-Signature=d051cdb38 32d626dff2ac94f97d5b6c844f5a7f8a5c7ae5e5a85e5d9cdb45025&X-Amz-SignedHeaders=host &actor_id=0&response-content-disposition=attachment%3B%20filename%3Dpi2_3.tar.gz &response-content-type=application%2Foctet-stream Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-produc tion-release-asset-2e65be.s3.amazonaws.com)... 54.231.81.242 Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-pr oduction-release-asset-2e65be.s3.amazonaws.com)|54.231.81.242|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 26420532 (25M) [application/octet-stream] Saving to: ‘STDOUT’

  • 100%[=============================>] 25.20M 1003KB/s in 22s

2018-01-22 22:37:46 (1.14 MB/s) - written to stdout [26420532/26420532]

--2018-01-22 22:37:46-- https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.4.0.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1324 (1.3K) [text/plain] Saving to: ‘STDOUT’

  • 100%[=============================>] 1.29K --.-KB/s in 0s

2018-01-22 22:37:46 (15.7 MB/s) - written to stdout [1324/1324]

--2018-01-22 22:37:46-- https://nodejs.org/dist/v6.4.0/node-v6.4.0-linux-armv6l.tar.gz Resolving nodejs.org (nodejs.org)... 2400:cb00:2048:1::6814:172e, 2400:cb00:2048:1::6814:162e, 104.20.23.46, ... Connecting to nodejs.org (nodejs.org)|2400:cb00:2048:1::6814:172e|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 12746855 (12M) [application/gzip] Saving to: ‘node-v6.4.0-linux-armv6l.tar.gz’

node-v6.4.0-linux-armv 100%[=============================>] 12.16M 1.79MB/s in 6.8s s

2018-01-22 22:37:54 (1.79 MB/s) - ‘node-v6.4.0-linux-armv6l.tar.gz’ saved [12746855/12746855]

unlink: cannot unlink ‘/usr/bin/node’: No such file or directory unlink: cannot unlink ‘/usr/sbin/node’: No such file or directory unlink: cannot unlink ‘/sbin/node’: No such file or directory unlink: cannot unlink ‘/usr/local/bin/node’: No such file or directory unlink: cannot unlink ‘/usr/bin/npm’: No such file or directory unlink: cannot unlink ‘/usr/sbin/npm’: No such file or directory unlink: cannot unlink ‘/sbin/npm’: No such file or directory unlink: cannot unlink ‘/usr/local/bin/npm’: No such file or directory pi@raspberrypi:~/nextion $

setal2003 commented 6 years ago

All I get is connecting to printer message

BeardyWargameSi commented 6 years ago

I got this working over the weekend, by using this https://github.com/cuboid3d/nanodlp just follow the instructions - I downloaded the .rar and unzipped it over cloning the git

jamesarm97 commented 6 years ago

Did you just use the script part because the actual fork of Tibus may be old.

rdastartupguy commented 6 years ago

Still stuck at connecting to printer message on Rpi 2 model B+ connected to nextion 3.5 :(

ErrorOutput.log shows
"missing API key for pushbullet"

No other errors :S

hu5566798 commented 6 years ago

@Tibus Is it ok for the Pi3B, I use PI3B follow the step. it will appear the message as setal2003 unlink: cannot unlink ‘/usr/bin/node’: No such file or directory unlink: cannot unlink ‘/usr/sbin/node’: No such file or directory unlink: cannot unlink ‘/sbin/node’: No such file or directory unlink: cannot unlink ‘/usr/local/bin/node’: No such file or directory unlink: cannot unlink ‘/usr/bin/npm’: No such file or directory unlink: cannot unlink ‘/usr/sbin/npm’: No such file or directory unlink: cannot unlink ‘/sbin/npm’: No such file or directory unlink: cannot unlink ‘/usr/local/bin/npm’: No such file or directory

but after redo pi@raspberrypi:~ $ mkdir /home/pi/nextion;(wget https://github.com/Tibus/TouchSc reen-For-NanoDLP/releases/download/V0.2/pi2_3.tar.gz --no-check-certificate -O - | tar -C /home/pi/nextion -xz);cd /home/pi/nextion; sudo ./setup.sh reboot PI3B the nextion can be show the botton and image. but each botton can't response with touch. whatever you touch the botton will not response. what's wrong?

hu5566798 commented 6 years ago

I also update the v0.3 tft to my 3.2'' nextion but can't show the IP/TCP code.

jmtru commented 6 years ago

@Tibus , I'm in the same situation as @hu5566798 .

can you help us?

my screen is the model nx8048k070

Thank you

hu5566798 commented 6 years ago

@ jmtru, found out the solution below: first see the errorlog(sudo cd /home/pi/nextion, sudo ls -al, you will see that errorlog in list ) in nextion, if it is below error: missing API key for pushbullet { Error: Cannot find module 'ip' at Function.Module._resolveFilename (module.js:455:15) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Home._callee$ (/home/pi/nextion/bin/plugins/nextion/pages/home.js:54:22) at tryCatch (/home/pi/nextion/node_modules/regenerator-runtime/runtime.js:65:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/home/pi/nextion/node_modules/regenera$ at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/home/pi/nextion/$ at step (/home/pi/nextion/bin/plugins/nextion/pages/home.js:16:191) at /home/pi/nextion/bin/plugins/nextion/pages/home.js:16:361 code: 'MODULE_NOT_FOUND' }

The new dependencies (ip, drivelist, child_process) are missing in release v 0.3 sudo cd /home/pi/nextion sudo npm i ip sudo npm i drivelist sudo npm i child_process sudo shutdown -r now after reboot the IP/TCP WILL have address, all the set icon can be work. Thank for ToS reply on the NanoDLP forum below link: https://www.nanodlp.com/forum/viewtopic.php?id=710&p=6

hu5566798 commented 6 years ago

@ jmtru after reboot, you will find the IP address is strange like 127.0.0.1, because it loss it wifi. you can reconnect with the net cable. after connect net cable you can find it change into http://169.254.187.XX, just fill this address into your web Explorer, then goto the home page at the right top you will find the wifi logo, juts click into choose your wifi with password. then reboot and remove your net cable, then your wifi connect IP address will come back.

hu5566798 commented 6 years ago

@jmtru, It show that TOS and Tibus is working V0.4 to fix that promble. but I also want to know why itead/Segnix can't work on PI3B+nextion? anyone try that? https://github.com/itead/Segnix

Tibus commented 6 years ago

127.0.0.1 is the localhost ip so no need to change it!

hu5566798 commented 6 years ago

@Tibus Ok, thanks. hope you can release new version to fix that problem. (ip, drivelist, child_process) are missing in release v 0.3

jmtru commented 6 years ago

works!!! thanks!!!!

cybertec02 commented 5 years ago

Hi guys, i got the screen to display the menus but it wont respond to any input. Top shows "not printing" then in the middle tcp/ip. Anything i missed? Nextion 3.2 raspi3 B

rdastartupguy commented 5 years ago

hey Cybertec02 I am having the same problem where it shows the UI but doesn't respond to input. Not sure how to solve that, but as for your TCP/IP text field, you need to install a small TCP module. I will share the code when I reach home.

On Thu, Aug 2, 2018 at 6:07 AM cybertec02 notifications@github.com wrote:

Hi guys, i got the screen to display the menus but it wont respond to any input. Top shows "not printing" then in the middle tcp/ip. Anything i missed? Nextion 3.2 raspi3 B

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tibus/TouchScreen-For-NanoDLP/issues/3#issuecomment-409768329, or mute the thread https://github.com/notifications/unsubscribe-auth/AltrZnMkBjInPqWHiOJsF7KpikB1iHHwks5uMknAgaJpZM4PNIOU .

-- Best Regards Madz

hu5566798 commented 5 years ago

@cybertec02 try below command sudo cd /home/pi/nextion sudo npm i ip sudo npm i drivelist sudo npm i child_process sudo shutdown -r now after reboot the IP/TCP WILL have address, all the set icon can be work.

cybertec02 commented 5 years ago

@hu5566798 Thanks, it worked.

probotix commented 4 years ago

Have tried all of this on a nextion 3.5 enhanced, i finally got the screen to display (no longer stuck on connecting to printer), but the the buttons still don't work. I am using ttyUSB0.

stefi01 commented 4 years ago

same for me, i do get a GUI on the display but pressing any button produces a dark highlight on the screen as i am pressing but no more happens

probotix commented 4 years ago

I solved it here: https://www.nanodlp.com/forum/viewtopic.php?id=2196

Problem you are seeing is probably because you are using the wrong tft file. The ones on github did not work for me, the ones on the nandlp.com website did.