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

Add "bootloader" CLI command #249

Merged
merged 2 commits into from
Apr 21, 2020
Merged

Conversation

Adminiuga
Copy link
Collaborator

Add "bootloader" CLI command.
If NCP has bootloader available, it will launch it. For example on Nortek GoControl HUSBZB-1 sticks, after launching bootloader, it is available via terminal using 115200 baud connection rate.

debug: Using selector: EpollSelector
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Resetting EZSP
debug: Resetting ASH
debug: Sending: b'1ac038bc7e'
debug: RSTACK Version: 2 Reason: RESET_SOFTWARE frame: b'c1020b0a527e'
debug: Send command version: (4,)
debug: Sending: b'004221a850ed2c7e'
debug: Data frame: b'0142a1a8532825d4f4497e'
debug: Sending: b'8160597e'
debug: Application frame 0 (version) received: b'07023066'
debug: Send command version: (7,)
debug: Sending: b'7d31432157542a1205877e'
debug: Data frame: b'1243a157542a12b069f2a5a17e'
debug: Sending: b'82503a7e'
debug: Application frame 0 (version) received: b'07023066'
debug: Switched to EZSP protocol version 7
EZSP Stack Type: 2, Stack Version: 26160
debug: Send command getStandaloneBootloaderVersionPlatMicroPhy: ()
debug: Sending: b'2240215754bbef5f7e'
debug: Data frame: b'2340a15754bb05e65d9e49e6697e'
debug: Sending: b'83401b7e'
debug: Application frame 145 (getStandaloneBootloaderVersionPlatMicroPhy) received: b'1054040a03'
bootloader version: 0x5410, nodePlat: 0x04, nodeMicro: 0x0a, nodePhy: 0x03
debug: Send command launchStandaloneBootloader: (0,)
debug: Sending: b'3341215754a515fb937e'
debug: Data frame: b'3441a15754a515c0077e'
debug: Sending: b'8430fc7e'
debug: Application frame 143 (launchStandaloneBootloader) received: b'00'
bootloader launched successfully
debug: Closed serial connection

image

@Adminiuga Adminiuga added the feature Feature tag, when adding a new feature label Apr 21, 2020
@Adminiuga Adminiuga merged commit 3d98bab into zigpy:dev Apr 21, 2020
@Adminiuga Adminiuga deleted the ac/boot-loader-info branch April 21, 2020 21:54
@Hedda
Copy link
Contributor

Hedda commented Apr 22, 2020

@Adminiuga Should this not be optional and disabled by default for security/safety reasons so that a user (or a malicious program) does not accidentally mess up the bootloader and brick the device?

Silicon Labs looks to recommend that manufacturers write protect on the bootloader flash area when building firmware images for production but as you know that is not always followed. See:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature tag, when adding a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants