Closed Chronocento closed 4 years ago
ohh. You tested on so an old release. Try a new one.
Sorry, you're right, I forgot the upgrade... bad sleeping last night.
BTW, does the function upload_firmware
of client.py
work in the new 1.6 release?
yes
Just tested and, as you said, both are working fine :)
One thing: when flashing with upload_firmware
, the connection is (obviously) lost, but after flashing, and after the screen has rebooted, the connection isn't re-established:
ERROR:nextion.nextion.protocol:Connection lost ERROR:nextion.nextion.client:Command "get dp" timeout. ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:No valid reply on 115200 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 115200 did not work WARNING:nextion.nextion.client:No valid reply on 2400 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 2400 did not work WARNING:nextion.nextion.client:No valid reply on 4800 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 4800 did not work WARNING:nextion.nextion.client:No valid reply on 9600 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 9600 did not work WARNING:nextion.nextion.client:No valid reply on 19200 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 19200 did not work WARNING:nextion.nextion.client:No valid reply on 38400 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 38400 did not work WARNING:nextion.nextion.client:No valid reply on 57600 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 57600 did not work WARNING:nextion.nextion.client:No valid reply on 230400 baud. Closing connection ERROR:nextion.nextion.protocol:Connection lost WARNING:nextion.nextion.client:Baud 230400 did not work ERROR:nextion.nextion.client:Connection failed Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/nextion/client.py", line 169, in connect raise ConnectionFailed("No baud rate suited") nextion.exceptions.ConnectionFailed: No baud rate suited ERROR:nextion.nextion.client:Reconnect failed
Do you think that there's a way to reconnect "automatically" at the end of the flashing?
You can close connection, sleep some time and connect again.
Tested, managed to make it work as you suggested. Thanks, sorry for bothering you! ;)
Yey! Great! You do not bother. You help to improve :)
When yesterday I mentioned errors trying to flash the firmware, I tried the function
upload_firmware
ofclient.py
: there, the error was about the wrong type of model selected (at least, that's what the screen itself was displaying).I tried the script that you suggested last night:
python3 -m nextion.console_scripts.upload_firmware /dev/ttyAMA0 115200 test.tft
But this is what I'm getting:
The screen doesn't display any error, it enters the flashing mode correctly and it is stuck in "writing DATA..."