-
Notifications
You must be signed in to change notification settings - Fork 403
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
Cannot upload reliably using Bluetooth and an HC-05 #334
Comments
The point of aborting on "illegal" characters is to prevent looping inside the bootloader in the case where it is talking to some traffic generator OTHER than uploading software... Is OTA really that noisy? With some specific character, or just random noise? |
Thanks WestfW for the answer and writing this SUPERB piece of code. This makes sense.... Unfortunately I have no idea of why I am obliged to do this patch, and I don't have a logic analyser. I just know that it works perfectly reliably ;) I am not positive about this, but I think that the watchdog is still active, so if a valid command is not received within 1second, it reboots. If that is the case, the problem is already solved. Anyway, if you don't accept this patch, I suggest that at least you add it as an option turned off by default with a link to this thread, so that people wanting to flash Arduinos OTA through Bluetooth ( if you google that, you will get tens of people who tried and failed miserably) get a pointer and know that it is possible :) |
Just to be sure, I tried to comment out In that case, I get systematically the following output:
This proves that there is a synchronization problem somewhere. |
This is a duplicate of MiniCore issue #212. I do not know which repository is the best for this discussion...
When connecting an Arduino pro mini to an HC-05, I was not able to upload a sketch reliably OTA.
The long story is there .
My solution was to patch the function
verifySpace()
inside Optiboot like this:So that, if there is noise on the line, Optiboot sends back STK_NOSYNC instead of resetting, allowing AVRDUDE to resynchronize nicely.
Doing that allows now for a very reliable OTA sketch upload.
As an added benefit, Optiboot is now 2 bytes smaller :)
Any comments?
Michel
The text was updated successfully, but these errors were encountered: