-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
Espressif : upload to IP address (OTA) #365
Comments
Hi @itsjustvenky |
See here how to define own uploader http://docs.platformio.org/en/latest/projectconf.html#extra-script and related issue #351 (comment) |
@valeros @ivankravets thank you. |
Sorry one more question : Can I set the value of properties like this "$UPLOADER" inside platformio.ini ? it seems to be not working. Also can I create a new properties like UPLOADER_IP_OTA and use it in script ? please let me know. thanks. |
No, you can't. The only way is extra script.
For example, [env:***]
...
UPLOADER_IP_OTA = 127.0.0.1
... Yes, you can. To get this value inside extra script use The OTA solution
from os.path import join
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
env.Replace(
UPLOADEROTA=join("$PIOPACKAGES_DIR",
"framework-arduinoespressif", "tools", "espota.py"),
UPLOADCMD='$UPLOADEROTA -i $UPLOAD_PORT -p 8266 -f $SOURCE'
)
[env:esp01]
platform = espressif
framework = arduino
board = esp01
build_flags = -Wl,-T${PIOPACKAGES_DIR}/ldscripts/esp8266.flash.1m64.ld
upload_port = 127.0.0.1
extra_script = platformio_extra_script.py To print current environment of @platformio builder use |
@ivankravets Thanks for the solution. |
Does it work for you? |
Nope. I added lines exactly what you have given in above comments. I used this command in script : print env['CPPDEFINES']
When I use this command : print env['CPPDEFINES'].get("UPLOADER_IP_OTA")
From above I can see "CPPDEFINES" is a list and with exception to one value "UPLOADER_IP_OTA", which is dictionary value. please suggest. thanks. |
@itsjustvenky I've just got what do you need. See updated #365 (comment) I didn't test it. Please report me if it doesn't work. |
I've just updated again my comment. Looks like you don't need to create own board. You can override LD script using build_flags. |
See TOTALY updated comment. Please use that solution #365 (comment) |
@ivankravets Thank you so much. OTA works now with the configuration from platformio.ini. Appreciated!!! |
Thanks for the report. Ok, let's explain what have you changed. Do you use standard PlatformIO packages? |
I am still on SDK v1.4.. apart from this everything I reverted back. |
Where did you replace this SDK v1.4? |
I have complete overwritten these two folders with 1.4 SDK (esp-open-sdk).
Here is the board I have created.
|
Extra script for Arduino-OTA
I have added two other option's to command line, DEBUG and PROGRESS. |
Why did you replace these packages? Ok, please make these changes:
Thanks! |
@ivankravets Sorry for the confusion. Please ignore the SDK part. I reverted everything back to how it was installed by platformio (followed your above steps). thanks. |
Does it work? |
Yes Arduino OTA works fine. One more thing : in file "~/.platformio/packages/sdk-esp8266/version.txt" I see
But the actual SDK version @platformio provides is 1.3.. right ? |
If the "build_flags" is set in "platformio.ini", then it overrides the "ldscript" in custom boards json file. |
The actual is
Yes P.S: Wait from me new PlatformIO 2.5.1.dev0 where all these features are implemented. |
so you mean to say "esp_iot_sdk_v1.2.0_15_07_03" = 1.3 ? |
In my arduino (ide) sdk version it is "1.3.0_15_08_10_p1" (arduino esp8266 sdk 2.0.0) |
@itsjustvenky please don't mix |
I've just pushed new development version of PlatformIO 2.5.1.dev0.
[env:esp01_1m]
platform = espressif
framework = arduino
board = esp01_1m
upload_port = YOUR_DEVICE_IP_HERE Waiting for the feedback. If you need additional flags to uploader see http://docs.platformio.org/en/latest/projectconf.html#upload-flags |
Installed dev version
Test the Arduino-OTA and worked correctly. Question : How do I revert back to 2.5.0 (release) ? if I want to |
Thanks!
|
|
@ivankravets thanks for all the help. |
Are you planning to release 2.5.1 anytime soon ? |
See https://github.com/platformio/platformio/milestones . Release is planned on December 15, 2015 |
Quickstart
OTA firmware uploading is implemented in PlatformIO 2.6.
Please use PlatformIO 2.6 or above and official ESP8266 documentation https://github.com/esp8266/Arduino/blob/master/doc/platformio.md
using Arduino IDE I can upload a ESP sketch over OTA to a remote ESP using command
Is there a way to do this in platformio
thanks
Venkatesh
The text was updated successfully, but these errors were encountered: