NSPManager / NSPanelManager

Sonoff NSPanel custom firmware for responsive and intuitive use
https://nspanelmanager.com/
126 stars 10 forks source link

Uploading TFT fails, missing instructions #115

Closed johnneerdael closed 2 months ago

johnneerdael commented 6 months ago

Hi updating the TFT fails and I keep gettings errors while trying to update, what's mostly frustating is that I cannot find information anywhere about which TFT file I should be uploading in the first place? Its also going ridiculously slow so it would really help if someone could provide some more detailed steps.

tpanajott commented 6 months ago

Hi!

You do not need to choose a TFT file. Only thing you need to do is check the box that it is a US panel, in case it is (this is in the panel specific settings). When uploading it will be very slow. Even at the highest speed (baud rate, set in the web interface on the panel) it will take about 10 minutes.

johnneerdael commented 6 months ago

Unfortunately even after 10m its not succeeding, it's to the point it has no valid TFT on it now and I'm not getting a resolution on what I could do to resolve it. I've read about many similar issues but none of the pointers I have received yet provided any resolution

tpanajott commented 5 months ago

What happens on the screen of the panel? It should display progress for the upload. If this doesn't happen you can try to change the upload baud in the panels web interface to 9600 or 115200. Many people have had luck with those two.

paulearley commented 5 months ago

I have the same problem. No information about the progress of the upload appears. Here is the last few lines from the debug log: 00:24:08 INFO NSPanel.cpp:610 f(._updateTFTOTA) _updateTFTOTA Started. 00:24:03 ERROR NSPanel.cpp:581 f(._taskUpdateTFTConfigOTA) Failed to update TFT. Will try again in 5 seconds. 00:24:02 ERROR NSPanel.cpp:742 f(._updateTFTOTA) Will try to upload anyway. If nothing happens, please reboot and try again. 00:24:02 INFO NSPanel.cpp:739 f(._updateTFTOTA) fc 00:24:02 INFO NSPanel.cpp:739 f(._updateTFTOTA) 3d 00:24:02 ERROR NSPanel.cpp:737 f(._updateTFTOTA) Failed to init upload to TFT. Got return code: 99 00:24:00 ERROR NSPanel.cpp:307 f(._addCommandToQueue) Trying to add command to queue before a queue exists! 00:23:08 DEBUG NSPanel.cpp:728 f(._updateTFTOTA) Waiting for panel reponse 00:23:08 DEBUG NSPanel.cpp:723 f(._updateTFTOTA) Sending TFT upload command: whmi-wris 5124856,9600,1 00:23:08 DEBUG NSPanel.cpp:720 f(._updateTFTOTA) Doing one last serial2 clear. 00:23:08 INFO NSPanel.cpp:706 f(._updateTFTOTA) Starting upload using v1.2 protocol. 00:23:08 DEBUG NSPanel.cpp:701 f(._updateTFTOTA) Will start TFT upload, TFT file size: 5124856 00:23:08 DEBUG NSPanel.cpp:699 f(._updateTFTOTA) Got comok: 00:23:02 DEBUG NSPanel.cpp:688 f(._updateTFTOTA) Sending connect to panel 00:23:00 ERROR NSPanel.cpp:307 f(._addCommandToQueue) Trying to add command to queue before a queue exists! 00:22:54 INFO NSPanel.cpp:636 f(._updateTFTOTA) Force restarting screen via power switch. 00:22:54 INFO NSPanel.cpp:633 f(._updateTFTOTA) Will download TFT file from: http://192.168.20.4:8000/download_tft 00:22:54 INFO NSPanel.cpp:610 f(._updateTFTOTA) _updateTFTOTA Started.

paulearley commented 5 months ago

I was FINALLY able to get the upload to work by setting the upload speed to 9600 (which resulted in the above error), followed by setting the "US Panel" (I am in the US), then setting the upload speed to the default and clicking the upload.

In my setup, the upload speed was not set to anything at first. I had to go through that procedure to eliminate the error " Trying to add command to queue before a queue exists!"

HTH

tpanajott commented 5 months ago

I was FINALLY able to get the upload to work by setting the upload speed to 9600 (which resulted in the above error), followed by setting the "US Panel" (I am in the US), then setting the upload speed to the default and clicking the upload.

In my setup, the upload speed was not set to anything at first. I had to go through that procedure to eliminate the error " Trying to add command to queue before a queue exists!"

HTH

Nice that you got it working and yes, switching around the baud rate is usually the fix. Switching between 115200 (default for sonoff firmware and ours) and 9600 (default for Nextion) seems to fix it.

paulearley commented 5 months ago

I spoke too soon. The TFT upload works but then the Panel reports "System Data ERROR!" I reloaded the merged-flash.bin file again, set the correct parameters from the resultant site (at 192.168.1.1), restarted the NSPanel, and ran "Update screen" again at 115200 baud.

Is this error ( "System Data ERROR!") a failure of the NSPanel TFT screen update or something else? Thanks in advance.

tpanajott commented 5 months ago

I spoke too soon. The TFT upload works but then the Panel reports "System Data ERROR!" I reloaded the merged-flash.bin file again, set the correct parameters from the resultant site (at 192.168.1.1), restarted the NSPanel, and ran "Update screen" again at 115200 baud.

Is this error ( "System Data ERROR!") a failure of the NSPanel TFT screen update or something else? Thanks in advance.

It means the firmware checksum was invalid or the upload of the TFT failed for some other reason. As I've written elsewhere the upload is really sensitive. I know @cablesandcoffee have previously had to turn off a lot of other WiFi devices in order for it to succeed, no matter the firmware.

To answer your question, just keep trying. As long as you see the upgrade progress bar you're on the right track.

paulearley commented 5 months ago

Thanks for the clarification! Complete and timely! I really appreciate your commitment to this great project.

tpanajott commented 2 months ago

I'm going to close this issue as it hasn't seen any action in a while. Please reopen or open a new one if you still encounter issues.