-
Notifications
You must be signed in to change notification settings - Fork 132
Add Generic OTA for NonSSH boards #333
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
Comments
Thanks for bringing this to my attention. |
sure no problem for me :) |
With #439 being fixed and having a sponsor I looked at the ESP8266 and ATO. |
Thanks for the input.
would it not be better to switch the tool based upon the fact it is a network upload?
And in platform.txt
|
all changes are in sync with the ArduinoIDE and it is checking for network_pattern. if not available it will run the regular upload pattern (the one used for serial devices). |
Thinking about it I could have gone either way... I guess this is what first came to mind |
btw I can help develop the other two tools used in conjunction with ESP8266/ESP32. |
@me-no-dev |
I will re-fork once you have OTA working and I see my projects compiling fine. From then on PRs will be fine. BTW what IDE are you using to work on this project? You have lots of mixed tabs/spaces and that drives my editors and eyes mad... |
For those interested with #439 fixed it is possible to upload via OTA when using 2.1 Select OTA and as port type "charger.local" (only this; no IP address or anything else) Edit: only anonymous works this way. No passwords!! |
Eclipse. See here on how to set it up https://github.com/jantje/arduino-eclipse-plugin/blob/master/readme.md |
Fixed #444 to avoid resetting the com port when working with the workaround.
If you remove this line from boards.txt for you boards there should no longer be a reset of the com port. |
This worked for me here but I did not do enough testing on other boards so I made the branch working and put it there. |
I just tried this in my production environment and it didn't work. |
what did you try? If you are cool with it, I have setup a clean fork and eclipse and can get to implement this and PR it |
I just finished the part that didn't work. Checking in right now. |
Also auth is extracted but not jet used.
yeah... why that did not work? I'm at the same point otherwise. Its just not parsing them in the final command? IEnvironmentVariable var = new EnvironmentVariable(Const.ENV_KEY_SERIAL_PORT, this.myAdderss);
contribEnv.addVariable(var, configurationDescription);
var = new EnvironmentVariable(Const.ENV_KEY_NETWORK_PORT, this.myPort);
contribEnv.addVariable(var, configurationDescription);
var = new EnvironmentVariable(Const.ENV_KEY_NETWORK_PASSWORD, this.myPassword);
contribEnv.addVariable(var, configurationDescription);
//values above are correct but the result from below does not parse them
String command = envManager.getVariable("A.TOOLS." + this.myUploadTool.toUpperCase() + ".UPLOAD.NETWORK_PATTERN", configurationDescription, true).getValue(); And this same code worked in the previous version |
I just checked on my system. |
authentication is not there yet. I need a think on how to do it. |
here is my branch with OTA implemented the same way that it's done in ArduinoIDE. I do face the problem I outlined above though... the rest is working |
My implementation is completely different from what you have done.
So if the plugin identifies the com port as a "network" it will use the tool in |
is what you have done platform dependent? Does it require changes in platform? And BTW ATO -> OTA (Over The Air). |
Not that I'm aware off.
Thanks fixing this. |
final working implementation |
Other than that I am on a Mac and I required this to get all of my serial devices to show |
for the serial ports to show on your system. I also do not understand why you are trying OTA to get to work as it is working in the working thread |
does this regex work for you |
no. serial ports can have many different names on a Mac
All those are valid serial ports and I have not even plugged all of my different boards |
what do you mean by that? I just replicated what the other uploaders do. |
Let me find out why the additional filter was added. It is clear it is to limiting for your case. |
I mean that I have implemented OTA for ESP8266 and it works fine. |
"^cu.(.serial|usb)?." will cover the genuine Arduino boards, but will not cover any board that uses silicon labs chip, bluetooth and some more. /dev/cu.SLAB_USBtoUART is my NodeMCU Amica board (ESP8266) |
you did not answer if you have implemented it just for ESP8266? It sounds to me that that is the case, where what I propose is platform independent and mirror to the functionality in the mainstream Arduino IDE (also my contribution). I have not submitted a PR, it's totally up to you which way you want to go with it. |
I have implemented an addition to the boards.txt to change the upload tool based on the "upload port" being a network name. In other words: This is as I proposed here To make this work with ESP2866 boards.txt I made specific changes.
Edit: changed boardid to platformid |
As to the serial |
exactly :) your way requires a change to the plugin to support other boards, while mine requires nothing :) it just works (I have 4 different platforms/boards that use this method) |
I'm sorry but it is a crappy method |
those are the different usb-uarts that I can plug. You can use this list to compile a better regex
How is my method crappy if it requires less to work on more boards? Let's forget that I have more than those boards OTA enabled. Are you gonna make a new change when the ESP32 board comes out? And expect the users to update their plugin just to support one command on a new board? How is that a less crappy method? |
It is crappy because the boards.txt specification has the capability to change the tool and as such change the complete upload procedure. |
You do your thing :) I'll go with crappy because I OTA to more boards and I need that functionality working. |
just to be clear. I will not accept a pull request based on changing the underlying commands. |
Not sure what you mean by "changing the underlying commands", but I was not going to submit a PR and I think that was made perfectly clear by this conversation so far :) I expect you to implement your way, and me to do it my way in my fork in a separate branch. |
I keep issues open till they are delivered in a release. |
Why do you have that extra dot before serial in "cu.(.serial|usb)?." — Sent from TypeApp On May 8, 2016, 14:29, at 14:29, jantje [email protected] wrote:
|
This follows arduino/Arduino#4107
I have done the mods required, but have also removed some of your code (the one that sends a request to your server) and have needed to structure the code here and there to be able to read it (spaces and tabs are a nightmare).
My Fork is here: https://github.com/me-no-dev/arduino-eclipse-plugin
Feel free to pull what you need if you are interested in supporting this feature.
The text was updated successfully, but these errors were encountered: