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

--bootloader-sonoff-usb doesn't work as expected #151

Open
rverstappen opened this issue Dec 24, 2023 · 13 comments
Open

--bootloader-sonoff-usb doesn't work as expected #151

rverstappen opened this issue Dec 24, 2023 · 13 comments

Comments

@rverstappen
Copy link

I was setting up two Sonoff Dongle Plus (CC2652P + CP2102N) units to use as routers and I didn't want to open them up to press the bootloader button inside so I followed the directions to use the " --bootloader-sonoff-usb" option. No errors on the flashing but neither router could be found after several attempts on each. I decided to try the standard approach using the button and not the command line option and everything worked as expected.

I'm reporting this in case it helps anyone else having a similar problem.

@sultanqasim
Copy link

Fixed by #173

@unmesh59
Copy link

unmesh59 commented May 9, 2024

The --bootloader-sonoff-usb worked for me a year or so ago but doesn't any more

@rverstappen
Could you say what the "standard approach using the button" entails?

@sultanqasim
Where would I find the version of cc2538-bsl with your changes incorporated? And are there any other dependencies?

@sultanqasim
Copy link

sultanqasim commented May 9, 2024

@unmesh59 you can use my fork here: https://github.com/sultanqasim/cc2538-bsl

@unmesh59
Copy link

unmesh59 commented May 9, 2024

@unmesh59 you can use my fork here: https://github.com/sultanqasim/cc2538-bsl

It didn't help. I'm wondering if my previous attempts to reflash the Sonoff-P have somehow bricked the device

@sultanqasim
Copy link

If it’s not entering bootloader mode at all (stuck at waiting for sync), then you’ve probably (soft) bricked the device through something you previously flashed. What were you flashing earlier? You can recover the device over JTAG/SWD if you have a XDS110 or Launchpad board handy.

@unmesh59
Copy link

unmesh59 commented May 9, 2024

I've been only trying to flash the latest koenkk coordinator firmware

And I don't have either of the devices you mention

Is there a way to use a serial terminal to tell whether the device is in bootloader mode? I'm on Windows but could boot Linux if needed

@sultanqasim
Copy link

What's the exact file name you used from the Koenkk firmware? If you flashed anything other than CC1352P2_CC2652P_launchpad_coordinator_20230507.zip it would break things.

When you say cc2538-bsl doesn't work, what is the command line you are executing, and what is the output you're seeing?

@unmesh59
Copy link

unmesh59 commented May 9, 2024

python cc2538-bsl-sq.py -p COM6 -evw CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Opening port COM6, baud 500000
Reading data from CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
Your firmware looks like an Intel Hex file
Connecting to target...
ERROR: Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'

@sultanqasim
Copy link

That error message means it's failing to enter the bootloader. I noticed you didn't use the --bootloader-sonoff-usb command line option. Use my fork of cc2538-bsl with the --bootloader-sonoff-usb option in addition to the arguments to specified above.

@unmesh59
Copy link

unmesh59 commented May 9, 2024

I had tried it with and without and accidentally pasted the latter :-(

Same result

@sultanqasim
Copy link

I had tried it with and without and accidentally pasted the latter :-(

Same result

Hmm, sounds like you’re locked out of the bootloader and would need to use JTAG to recover unfortunately.

@unmesh59
Copy link

unmesh59 commented May 10, 2024 via email

@patriciogonzalezvivo
Copy link

What's a "JTAG to recover"?

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