Skip to content

ESP32 OTA not starting #1322

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

Closed
hreintke opened this issue Mar 25, 2021 · 4 comments
Closed

ESP32 OTA not starting #1322

hreintke opened this issue Mar 25, 2021 · 4 comments
Labels
domain: build The build does not work as the Arduino IDE. importance: board specific status: fixed in 4.4.0 fixed in 4.4.0

Comments

@hreintke
Copy link

hreintke commented Mar 25, 2021

Hi Jantje,

I have been some time away from programming but returned again.

Have an ESP32 project on which I want to use OTA.
When starting the upload I get the error : tools.esptool_py.upload.network_.pattern : not found in the platform.txt file
Notice the additional point in network_.pattern

There is a line in the platform.txt
tools.esptool_py.upload.network_pattern={network_cmd} -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin"

Also tried with adding an additional line in platform.txt with the "point" in but that dis not solve the issue.

I am currently running the "nightly fix" branch (created when there was the serial crashing issue).
But also did a quick test with current master which shows same behavior.

I changed PC's some time ago, on the old one I was running 4.3 from 11/8/20 (not 100% sure) which worked OK with OTA.

Have you seen this issue before ?

PS : I looked into the commits and saw you were working on this in the commit
6598715 [6598715], dd November 15, 2020.

@jantje
Copy link
Member

jantje commented Mar 25, 2021

No I haven't seen this but ....
Upload is not the best tested and OTA is even worse
As to 6598715
Thanks for searching
It may be related. The problem with the old code is that when network is not defined you get 2 DOTS
In both the old and new code there will always be a DOT before PATTERN which is what you see and don't want

As you can run from master .. can you try

        String networkPrefix = empty;
        if (isNetworkUpload()) {
            networkPrefix = Const.NETWORK_PREFIX;
        }
        String key = Const.A_TOOLS + upLoadTool + DOT + action + DOT + networkPrefix +  Const.PATTERN;

@hreintke
Copy link
Author

hreintke commented Mar 26, 2021

I go compilation errors on the empty Const.NETWORK_PREFIX Const.A_TOOLS and `Const.PATTERN'

Got it to work with :

        String networkPrefix = EMPTY;
        if (isNetworkUpload()) {
            networkPrefix = NETWORK_PREFIX;
        }
        String key = TOOLS + upLoadTool + DOT + action + DOT + networkPrefix +  PATTERN;

But that resulted in :

toolsesptool_py.upload.network_pattern : not found in the platform.txt file

Can try with other, just tell me which one you want.

@jantje
Copy link
Member

jantje commented Mar 29, 2021

        String networkPrefix = EMPTY;
        if (isNetworkUpload()) {
            networkPrefix = NETWORK_PREFIX;
        }
        String key = TOOLS + DOT+ upLoadTool + DOT + action + DOT + networkPrefix +  PATTERN;

Oeps sorry there is a dot missing

jantje pushed a commit that referenced this issue Apr 2, 2021
Also added 2 regression tests checking the upload pattern key
@jantje
Copy link
Member

jantje commented Apr 2, 2021

This should be fixed now in the nightly (that is in about 6 hours if all goes well ;-) )

@jantje jantje added domain: build The build does not work as the Arduino IDE. importance: board specific status: fixed in 4.4.0 fixed in 4.4.0 labels Jun 4, 2021
@jantje jantje closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: build The build does not work as the Arduino IDE. importance: board specific status: fixed in 4.4.0 fixed in 4.4.0
Projects
None yet
Development

No branches or pull requests

2 participants