-
Notifications
You must be signed in to change notification settings - Fork 56
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
Work around non-OTA auth issue in ESP8266 #116
Comments
I do remember to be dealing with this issue, I didn't known it was a esptool bug. I am currently rewriting the core of the plugin. As I don't have much time to do the test by myself, can you try to set the password as I've inspect the code and I remember to be added some fix in the code to that issue (as you can see here) So every time you let the password as blank or write a cero, it will remove the |
Yes, setting the password to blank works fine, and that's what I'm doing to get around the issue currently. What I was hoping to add is some kind of bypass that also removes |
I see, try this; Add |
I don't think we want to add another Do you know a way to check if the upload is OTA or physical serial cable? My suggestion is something like this (replacing line 328): if isOTAUploadPort(PORT):
self.authOTA() The problem is, I don't know how to implement
The first regex is an IP address check directly from your code line 183 EDIT: it looks like Windows might use |
That should be the behavior adding, In Line 183 the code checks if the port selected is an IP or not, so when you select a serial port it adds a
EDIT: I had the same problem checking the serial ports, that is why I only check if it's an IP, if it's not I assume it will be a serial (physical) EDIT2: I know it's a messy code, the new one is more cleaner and will be easy to implement/improve new features |
My apologies, I did not take the time to understand what the code was doing. I added Small sidenote: enabling "verbose" mode does not work on the |
Use I think the fix is not working because I missed something when I check the port the line 183 should be like this:
Please replace that line and try again |
Thank you for your response and sorry for the delay. I'm now working off of I changed the line as you instructed and tried again, but it didn't make a difference - I still get I tried to do some debug printing, and while I'm admittedly unfamiliar with the code, it appears that some parts may be indented more than they should. For example, the section that starts It also seems like perhaps the
check, so I de-indented that as well. This fixed the auth problem for hard-wired connections, but seemed to break other things (including auth for OTA uploads). It looks like the problem I have now is that Since I'm unfamiliar with the code, my changes could be very wrong. But perhaps this may help you in some way. Thanks! |
I have release an alpha version of Deviot 2, but sadly it doesn't have this feature yet, however I hope to implement it this week, I'll let you know as soon as it's ready. |
Hey @airdrummingfool I've pushed some changes today with a first implementation of OTA, but I only test it on windows because I couldn't run my esp in the virtual machine Can you try it and tell me if it's working for you? the device should appear like always in the The steps to install Deviot 2 are here |
Hello,
There's a bug between PlatformIO and esptool that causes an error when an auth password is set while doing a plugged-in (non-OTA) upload.
The issue is that no matter the upload method, if there is an OTA password set PlatformIO sends
--auth=[password]
inupload_flags
, whichesptool
cannot handle (onlyespota
understands the--auth
parameter). There's more discussion here: https://community.platformio.org/t/upload-error-255-esp8266-upload-flags-for-auth-break-usb-serial-upload/774The fix is to delete the OTA password when doing non-OTA uploads, and add it back in when you want to do an OTA upload. This makes switching between password-protected OTA uploads and standard uploads a pain, because you have to reset the password each time you switch between the two.
Unfortunately, according to that link the PlatformIO people say it is an
esptool
bug, and I doubt the esptool people would be any more inclined to fix it.To be clear, this bug has nothing to do with Deviot. I certainly understand if you think this is out of scope, but I figured
Deviot
could work around the error by skipping theself.authOTA()
call (inPlatformioCLI.py
near line 329) IFF the upload is not an OTA upload.I tried to work up a PR to demonstrate, but I'm not sure of a foolproof way to detect whether or not it is an OTA upload. The only thing I can think of is checking the serial port to see if it is a path (
/something/like/this
) vs an IP address or network host - but I'm not sure how to do that reliably across all platforms. Do you have any suggestions? Is this something you'd be willing to incorporate into your code, or is this completely out of scope?Thanks for this great plugin!
The text was updated successfully, but these errors were encountered: