Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Failed for Nextion 10" Intelligent Series Display #19

Open
embeddedgyan opened this issue Dec 26, 2020 · 9 comments
Open

Upgrade Failed for Nextion 10" Intelligent Series Display #19

embeddedgyan opened this issue Dec 26, 2020 · 9 comments

Comments

@embeddedgyan
Copy link

Hi Jevgeni Kiski,

I have installed the package using 'pip3 install nextion' as described in the https://pypi.org/project/nextion/ page.

I am getting the following error during the upgrade.
Can you suggest how to resolve the below error?

Let me know if you need more details logs.

Regards,
Karthik

=========
Detailed Log

karthik@karthik:~/nextion_hmi$ nextion-fw-upload -b 9600 -ub 115200 /dev/ttyUSB0 ./Display.tft
2020-12-26 18:13:04,846 INFO nextion.nextion.client Connecting: /dev/ttyUSB0, baud: 9600
2020-12-26 18:13:05,396 INFO nextion.nextion.protocol.base Connected to serial
2020-12-26 18:13:05,764 INFO nextion.nextion.client Address: 4113-0
2020-12-26 18:13:05,766 INFO nextion.nextion.client Detected model: NX1060P101_011R
2020-12-26 18:13:05,767 INFO nextion.nextion.client Firmware version: 132
2020-12-26 18:13:05,768 INFO nextion.nextion.client Serial number: 55163401B399E55C
2020-12-26 18:13:05,768 INFO nextion.nextion.client Flash size: 131072000-0
2020-12-26 18:13:05,871 ERROR nextion.nextion.client Unknown data received: b'636f6d6f6b20312c343131332d302c4e5831303630503130315f303131522c3133322c31303530312c353531363334303142333939453535432c3133313037323030302d30'
2020-12-26 18:13:05,932 INFO nextion.nextion.client Successfully connected to the device
2020-12-26 18:13:05,933 INFO nextion.nextion.client About to upload 1550856 bytes
2020-12-26 18:13:06,268 INFO nextion.nextion.client Reconnecting at new baud rate: 115200
2020-12-26 18:13:06,371 ERROR nextion.nextion.protocol.base Connection lost
2020-12-26 18:13:07,308 INFO nextion.nextion.protocol.base Connected to serial
2020-12-26 18:13:08,311 ERROR root Failed to upload firmware
Traceback (most recent call last):
File "/home/karthik/.local/lib/python3.8/site-packages/nextion/console_scripts/upload_firmware.py", line 14, in upload
await nextion.upload_firmware(args.file, args.upload_baud)
File "/home/karthik/.local/lib/python3.8/site-packages/nextion/client.py", line 371, in upload_firmware
res = await self.read_packet(timeout=1)
File "/home/karthik/.local/lib/python3.8/site-packages/nextion/client.py", line 215, in read_packet
return await asyncio.wait_for(self._connection.read(), timeout=timeout)
File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

======================
Detailed Log with Verbose Option

karthik@karthik:~/nextion_hmi$ nextion-fw-upload -b 9600 -ub 115200 -v /dev/ttyUSB0 ./Display.tft
2020-12-26 18:21:51,117 INFO nextion.nextion.client Connecting: /dev/ttyUSB0, baud: 9600
2020-12-26 18:21:51,657 INFO nextion.nextion.protocol.base Connected to serial
2020-12-26 18:21:51,659 DEBUG nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2020-12-26 18:21:51,735 DEBUG nextion.nextion.protocol.nextion received: b'1a'
2020-12-26 18:21:51,876 DEBUG nextion.nextion.protocol.nextion sent: b'connect'
2020-12-26 18:21:52,013 DEBUG nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2020-12-26 18:21:52,025 DEBUG nextion.nextion.protocol.nextion received: b'636f6d6f6b20312c343131332d302c4e5831303630503130315f303131522c3133322c31303530312c353531363334303142333939453535432c3133313037323030302d30'
2020-12-26 18:21:52,026 INFO nextion.nextion.client Address: 4113-0
2020-12-26 18:21:52,027 INFO nextion.nextion.client Detected model: NX1060P101_011R
2020-12-26 18:21:52,028 INFO nextion.nextion.client Firmware version: 132
2020-12-26 18:21:52,028 INFO nextion.nextion.client Serial number: 55163401B399E55C
2020-12-26 18:21:52,029 INFO nextion.nextion.client Flash size: 131072000-0
2020-12-26 18:21:52,029 DEBUG nextion.nextion.protocol.nextion sent: b'bkcmd=3'
2020-12-26 18:21:52,132 DEBUG nextion.nextion.protocol.nextion received: b'636f6d6f6b20312c343131332d302c4e5831303630503130315f303131522c3133322c31303530312c353531363334303142333939453535432c3133313037323030302d30'
2020-12-26 18:21:52,133 DEBUG nextion.nextion.protocol.nextion received: b'01'
2020-12-26 18:21:52,134 ERROR nextion.nextion.client Unknown data received: b'636f6d6f6b20312c343131332d302c4e5831303630503130315f303131522c3133322c31303530312c353531363334303142333939453535432c3133313037323030302d30'
2020-12-26 18:21:52,135 DEBUG nextion.nextion.protocol.nextion sent: b'get sleep'
2020-12-26 18:21:52,191 DEBUG nextion.nextion.protocol.nextion received: b'7100000000'
2020-12-26 18:21:52,192 INFO nextion.nextion.client Successfully connected to the device
2020-12-26 18:21:52,192 INFO nextion.nextion.client About to upload 1550856 bytes
2020-12-26 18:21:52,192 DEBUG nextion.nextion.protocol.nextion sent: b'sleep=0'
2020-12-26 18:21:52,270 DEBUG nextion.nextion.protocol.nextion received: b'01'
2020-12-26 18:21:52,422 DEBUG nextion.nextion.protocol.nextion sent: b'usup=1'
2020-12-26 18:21:52,466 DEBUG nextion.nextion.protocol.nextion received: b'01'
2020-12-26 18:21:52,468 DEBUG nextion.nextion.protocol.nextion sent: b'ussp=0'
2020-12-26 18:21:52,548 DEBUG nextion.nextion.protocol.nextion received: b'01'
2020-12-26 18:21:52,549 DEBUG nextion.nextion.protocol.nextion sent: b'whmi-wri 1550856,115200,0'
2020-12-26 18:21:52,550 INFO nextion.nextion.client Reconnecting at new baud rate: 115200
2020-12-26 18:21:52,671 ERROR nextion.nextion.protocol.base Connection lost
2020-12-26 18:21:53,546 INFO nextion.nextion.protocol.base Connected to serial
2020-12-26 18:21:54,548 ERROR root Failed to upload firmware
Traceback (most recent call last):
File "/home/karthik/.local/lib/python3.8/site-packages/nextion/console_scripts/upload_firmware.py", line 14, in upload
await nextion.upload_firmware(args.file, args.upload_baud)
File "/home/karthik/.local/lib/python3.8/site-packages/nextion/client.py", line 371, in upload_firmware
res = await self.read_packet(timeout=1)
File "/home/karthik/.local/lib/python3.8/site-packages/nextion/client.py", line 215, in read_packet
return await asyncio.wait_for(self._connection.read(), timeout=timeout)
File "/usr/lib/python3.8/asyncio/tasks.py", line 490, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

===========
Package Version

karthik@karthik:~/nextion_hmi$ pip3 list | grep nextion
nextion 1.7.1

@yozik04
Copy link
Owner

yozik04 commented Dec 26, 2020

Hey. Try lower upload_baud rate.

@embeddedgyan
Copy link
Author

I did try 9600 upload_baud rate. It resulted in the same problem.

Let me know if there is anyway I can help in analyzing the issue.

@yozik04
Copy link
Owner

yozik04 commented Jan 12, 2021

Interesting what is this:

2020-12-26 18:21:52,134 ERROR nextion.nextion.client Unknown data received: b'636f6d6f6b20312c343131332d302c4e5831303630503130315f303131522c3133322c31303530312c353531363334303142333939453535432c3133313037323030302d30'

@yozik04
Copy link
Owner

yozik04 commented Jan 12, 2021

This is connection string. But it is longer than I have and it is totally valid.

@Zoolu74
Copy link

Zoolu74 commented Apr 8, 2021

Upload not working also at NX8048P070_011R(RTP)

@Chronocento
Copy link

Hi,
I'm having troubles too at updating the firmware (also tried with baudrate set to 9600, same output):

2021-06-08 11:30:37,409 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 2400
2021-06-08 11:30:37,412 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:37,412 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:38,312 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:38,764 DEBUG    nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2021-06-08 11:30:39,216 WARNING  nextion.nextion.client No valid reply on 2400 baud. Closing connection
2021-06-08 11:30:39,216 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:39,218 WARNING  nextion.nextion.client Baud 2400 did not work
2021-06-08 11:30:39,218 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 4800
2021-06-08 11:30:39,221 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:39,221 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:39,702 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:39,945 DEBUG    nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2021-06-08 11:30:40,189 WARNING  nextion.nextion.client No valid reply on 4800 baud. Closing connection
2021-06-08 11:30:40,190 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:40,193 WARNING  nextion.nextion.client Baud 4800 did not work
2021-06-08 11:30:40,193 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 9600
2021-06-08 11:30:40,197 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:40,197 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:40,474 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:40,613 DEBUG    nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2021-06-08 11:30:40,751 WARNING  nextion.nextion.client No valid reply on 9600 baud. Closing connection
2021-06-08 11:30:40,752 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:40,755 WARNING  nextion.nextion.client Baud 9600 did not work
2021-06-08 11:30:40,755 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 19200
2021-06-08 11:30:40,760 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:40,760 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:40,932 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:41,020 DEBUG    nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2021-06-08 11:30:41,106 WARNING  nextion.nextion.client No valid reply on 19200 baud. Closing connection
2021-06-08 11:30:41,107 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:41,109 WARNING  nextion.nextion.client Baud 19200 did not work
2021-06-08 11:30:41,109 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 38400
2021-06-08 11:30:41,114 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:41,115 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:41,235 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:41,296 DEBUG    nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2021-06-08 11:30:41,357 WARNING  nextion.nextion.client No valid reply on 38400 baud. Closing connection
2021-06-08 11:30:41,357 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:41,360 WARNING  nextion.nextion.client Baud 38400 did not work
2021-06-08 11:30:41,360 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 57600
2021-06-08 11:30:41,364 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:41,365 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:41,470 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:41,520 DEBUG    nextion.nextion.protocol.nextion sent: b'\xff\xffconnect'
2021-06-08 11:30:41,572 WARNING  nextion.nextion.client No valid reply on 57600 baud. Closing connection
2021-06-08 11:30:41,573 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:41,574 WARNING  nextion.nextion.client Baud 57600 did not work
2021-06-08 11:30:41,574 INFO     nextion.nextion.client Connecting: /dev/tty.usbserial-A600KNYD, baud: 115200
2021-06-08 11:30:41,577 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:41,577 DEBUG    nextion.nextion.protocol.nextion sent: b'DRAKJHSUYDGBNCJHGJKSHBDN'
2021-06-08 11:30:41,582 DEBUG    nextion.nextion.protocol.nextion received: b'1a'
2021-06-08 11:30:41,625 DEBUG    nextion.nextion.protocol.nextion sent: b'connect'
2021-06-08 11:30:41,646 DEBUG    nextion.nextion.protocol.nextion received: b'636f6d6f6b20312c33303631342d302c4e58343833324b3033355f303131522c3135312c36313639392c444236303538373738333235353833332c3333353534343332'
2021-06-08 11:30:41,646 INFO     nextion.nextion.client Address: 30614-0
2021-06-08 11:30:41,647 INFO     nextion.nextion.client Detected model: NX4832K035_011R
2021-06-08 11:30:41,647 INFO     nextion.nextion.client Firmware version: 151
2021-06-08 11:30:41,647 INFO     nextion.nextion.client Serial number: DB60587783255833
2021-06-08 11:30:41,647 INFO     nextion.nextion.client Flash size: 33554432
2021-06-08 11:30:41,648 DEBUG    nextion.nextion.protocol.nextion sent: b'bkcmd=3'
2021-06-08 11:30:41,662 DEBUG    nextion.nextion.protocol.nextion received: b'01'
2021-06-08 11:30:41,662 DEBUG    nextion.nextion.protocol.nextion sent: b'get sleep'
2021-06-08 11:30:41,678 DEBUG    nextion.nextion.protocol.nextion received: b'7100000000'
2021-06-08 11:30:41,678 INFO     nextion.nextion.client Successfully connected to the device
2021-06-08 11:30:41,679 INFO     nextion.nextion.client About to upload 4326636 bytes
2021-06-08 11:30:41,679 DEBUG    nextion.nextion.protocol.nextion sent: b'sleep=0'
2021-06-08 11:30:41,694 DEBUG    nextion.nextion.protocol.nextion received: b'01'
2021-06-08 11:30:41,847 DEBUG    nextion.nextion.protocol.nextion sent: b'usup=1'
2021-06-08 11:30:41,854 DEBUG    nextion.nextion.protocol.nextion received: b'01'
2021-06-08 11:30:41,855 DEBUG    nextion.nextion.protocol.nextion sent: b'ussp=0'
2021-06-08 11:30:41,870 DEBUG    nextion.nextion.protocol.nextion received: b'01'
2021-06-08 11:30:41,871 DEBUG    nextion.nextion.protocol.nextion sent: b'whmi-wri 4326636,115200,0'
2021-06-08 11:30:41,871 INFO     nextion.nextion.client Reconnecting at new baud rate: 115200
2021-06-08 11:30:41,872 ERROR    nextion.nextion.protocol.base Connection lost
2021-06-08 11:30:41,878 INFO     nextion.nextion.protocol.base Connected to serial
2021-06-08 11:30:42,883 ERROR    root            Failed to upload firmware
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nextion/console_scripts/upload_firmware.py", line 14, in upload
    await nextion.upload_firmware(args.file, args.upload_baud)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nextion/client.py", line 371, in upload_firmware
    res = await self.read_packet(timeout=1)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nextion/client.py", line 215, in read_packet
    return await asyncio.wait_for(self._connection.read(), timeout=timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

@yozik04
Copy link
Owner

yozik04 commented Jun 8, 2021

@Chronocento Your baudrate is 115200. Do not change that. You can play with upload_baud. Also you can try to power circle the unit before doing the upgrade. I have not touched that code for quite a long time. I need to add some better debug logging for upload process.

@Chronocento
Copy link

Chronocento commented Jun 8, 2021

@Chronocento Your baudrate is 115200. Do not change that. You can play with upload_baud.

That's exactly what I've tried (-ub 9600).
I also tried to power cycle, with no help.

I know that you didn't change anything, and that's the strange thing: I remember that the last time I tried it (some months ago) it was working :(

@yozik04
Copy link
Owner

yozik04 commented Jun 8, 2021

I agree that it can be unstable as it was just an experiment.

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

No branches or pull requests

4 participants