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

Starts bootloader but doesn't recognize success? #51

Closed
ndrwstn opened this issue Mar 3, 2023 · 5 comments
Closed

Starts bootloader but doesn't recognize success? #51

ndrwstn opened this issue Mar 3, 2023 · 5 comments

Comments

@ndrwstn
Copy link

ndrwstn commented Mar 3, 2023

I'm having the same issue as #50 (but I'm posting a new issue because the Cyrillic topic probably isn't helpful to most users, no offense intended).

I'm trying to flash ncp-uart-6.7.8-115k.ebl on nortek husbzb-1 with 5.4.1-194 (brand new device) using the docker image. After 'CEL stick' I get 'EM3581 Serial Bootloader v.5.4.1.0 b962' followed by a newline and then the script hangs (and I have to kill it). Good news is no damage done to the device, but other than than nothing seems to happen.

I initiatized my device in minicom and it reacts as expected (both from the README and how the script works), and a string of 'C's were received. However, for some reason we don't get to L364 ('Successfully restarted ...') in ncp.py. Looking for suggestions.

husbzb-firmware/ncp.py

Lines 343 to 364 in d6a512c

else:
ser.readline() # 1. upload gbl or ebl
ser.readline() # 2. run
ser.readline() # 3. ebl info
# Enter '1' to initialize X-MODEM mode
ser.write(b'1')
time.sleep(1)
# Read responses
ser.readline() # BL > 1
ser.readline() # begin upload
# Wait for char 'C'
success = False
start_time = time.time()
while time.time()-start_time < BOOTLOADER_INIT_TIMEOUT:
if ser.read() == b'C':
success = True
break
if not success:
print('Failed to restart into bootloader mode. Please see users guide.')
sys.exit(1)
print('Successfully restarted into bootloader mode! Starting upload of NCP image... ')

@mimimi0815
Copy link

I have the same issue. I assume it has also something todo with the "Scan", because when i do a scan first, i have also to break it.
First ttyUSB1 will be normally detected. (with zigbee), but on ttyUSB0 it hangs and i have to cancel the scirpt.

CMD: ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
Connecting to.. /dev/ttyUSB0 57600 True False
^CException: <class 'KeyboardInterrupt'> /dev/ttyUSB0
{"ports": [{"port": "/dev/ttyUSB1", "vid": "10C4", "pid": "8A2A", "deviceType": "zigbee", "stackVersion": "5.4.1-194"}, {"port": "/dev/ttyUSB0", "vid": "10C4", "pid": "8A2A", "deviceType": "unknown"}]}

@ndrwstn
Copy link
Author

ndrwstn commented Mar 11, 2023

Are you trying to scan for the zwave tty or am I misunderstanding? I do not believe this script is supposed to be able to upgrade the zwave firmware--only zigbee.

@draftpunk
Copy link

draftpunk commented Mar 13, 2023

I am having a similar issue. It simply hangs at the bootloader screen. Then I CTRL-C it after a few minutes.

Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

^CTraceback (most recent call last):
  File "/tmp/silabs/./ncp.py", line 484, in <module>
    flash(args.port,args.file)
  File "/tmp/silabs/./ncp.py", line 351, in flash
    ser.readline() # BL > 1
  File "/usr/local/lib/python3.9/site-packages/serial/serialposix.py", line 565, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
KeyboardInterrupt
^C
root@3f4fa21d4845:/tmp/silabs# 

@draftpunk
Copy link

Referring to this issue resolved my issue
#33

@ndrwstn
Copy link
Author

ndrwstn commented Mar 17, 2023

The fix in #33 worked for me as well, and as I think there's a PR waiting there, I don't think there needs to be multiple open issues on the same problem. I'm going to close this, and I think #50 should also try this fix and close if it works.

@ndrwstn ndrwstn closed this as completed Mar 17, 2023
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

3 participants