Closed JC-Electronics-Design closed 4 months ago
I had the same symptoms. To work around the script's bug, make sure to specify custom_upload_url
without the /upload
part, and without a trailing /
as well (this would lead to a 500 error).
When I was left with a 401 error, it was because I was providing my username/password values wrapped in single quotes.
i.e. wrong:
custom_upload_url=http://192.168.x.x/
custom_username='my_username'
custom_password='my_password'
good:
custom_upload_url=http://192.168.x.x
custom_username=my_username
custom_password=my_password
@mleroy removing the /update
part from the custom url did the trick. Thanks!
Edit: I did some extra testing and although the terminal shows that the update is successful the firmware is not updated. 🙁
@ayushsharma82 is this something that can be updated/added in the documentation?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
When I configure authentication the upload with platformio_upload.py script is not working. When using the script without authentication everything works fine.
The first thing I noticed in the script is that
checkAuthResponse = requests.get(f"{upload_url_compatibility}/update")
should be (I think)checkAuthResponse = requests.get(f"{upload_url_compatibility}")
otherwise you end up with a URL ending with/upload/upload
sinceupload_url_compatibility
already contains/upload
.When using the original script I get the following lines in the log:
When I remove
/upload
the script tries to authenticate withdoUpdateAuth = requests.get(start_url, headers=start_headers, auth=auth)
but it fails with status code401
again.I did configure the correct username and password in the platformio.ini file with
custom_username
andcustom_password
. platformio.ini file:ElegantOTA setup:
I suppose it has something to do with one of the following lines
but I'm not sure.
Anyone else that has this issue? Or is this issue known?