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

Sonoff serial bootloader (SBL) toggle #138

Closed
janmashat opened this issue Aug 2, 2022 · 8 comments
Closed

Sonoff serial bootloader (SBL) toggle #138

janmashat opened this issue Aug 2, 2022 · 8 comments

Comments

@janmashat
Copy link

janmashat commented Aug 2, 2022

Hi, great project!

2 weeks ago I succesfully flashed cc2652p.hex by running:

docker run \
--device /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_bee4...6eb0-if00-port0:/dev/ttyUSB1 \
-e FIRMWARE_URL=https://example.com/cc2652p.hex \
ckware/ti-cc-tool \
-ewv \
-p /dev/ttyUSB1 \
--bootloader-sonoff-usb

Now I tried to upgrade to the new 2022-07-21 version by running the same command, however it failed with:

Downloading firmware from https://example.com/cc2652p.hex
Firmware file:   'cc2652p.hex'
sonoff
Opening port /dev/ttyUSB1, baud 500000
Reading data from cc2652p.hex
Your firmware looks like an Intel Hex file
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'

Is it possible that the config in cc2652p.hex isn't compatible with --bootloader-sonoff-usb?

If that's the case, can it be added? And in the meantime I assume I'll need to open the case and hold some buttons to invoke SBL?

@ptvoinfo
Copy link
Owner

ptvoinfo commented Aug 2, 2022

Hi,

Unfortunately, it is a mistake to use cc2652p.hex without configuration. It is a template only. SBL is not active there. Now, you need a XDS110 or similar JTAG flasher to upload a new firmware.

@janmashat
Copy link
Author

Oh no 😞 even the cheapest c/JTAG flasher (CC-DEVPACK-DEBUG) is almost twice as expensive as the dongle itself - so I would rather get a couple more zigbee dongles. It seems I'm not the only one to make this mistake so a disclaimer in the README might help future visitors 😉

@janmashat
Copy link
Author

Actually I found a bunch more people making the same mistake here - wouldn't it make sense to enable SBL in the template hex?

@janmashat janmashat reopened this Aug 2, 2022
@ptvoinfo
Copy link
Owner

ptvoinfo commented Aug 3, 2022

It is useless because the SBL pin should be configured too, and it may change for different boards.

I've updated README and added this caution.

@janmashat
Copy link
Author

janmashat commented Aug 3, 2022

Isn't DIO_15 the default SBL pin for CC2652P? At least that's what it seems to be according to this table.

@ptvoinfo
Copy link
Owner

ptvoinfo commented Aug 3, 2022

Currently, SBL isn't activated at all in the template HEX file. Sorry.

@janmashat
Copy link
Author

I understand - I'm suggesting to activate it in order to make it easier for others in the future.

@ptvoinfo
Copy link
Owner

ptvoinfo commented Aug 5, 2022

@janmashat Probably good new for you. SBL is enabled in the firmware, but the SBL function does not use any pins to activate it (Auto BSL). I know, there is a method to start flashing a firmware without pulling a pin. But I didn't try it myself yet.

https://community.home-assistant.io/t/iteads-sonoff-zigbee-3-0-usb-dongle-plus-model-zbdongle-p-based-on-texas-instruments-cc2652p-20dbm-radio-mcu-now-sold-for-14-99/340705/111

@ptvoinfo ptvoinfo closed this as completed Dec 7, 2022
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

2 participants