Code Monkey home page Code Monkey logo

bintray-secure-ota's Introduction

bintray-secure-ota's People

Contributors

cyberman54 avatar ivankravets avatar r0oland avatar valeros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bintray-secure-ota's Issues

X.509 certificate error

I tried the example code, and the last days it ran successful.
Today i get certificate X.509 error when trying do download binary.

Maybe bintray changed some of it certificates which are copied in BintrayCertificates.h?
How can i check this?

getLatestVersion(): Error: Could not parse JSON!

I'm trying to setup firmware update via bintray & platformIO, using the example code.
I created user, repository and package, uploaded a .bin file, and gave it a version.
Wifi connection and ssl login to bintray are successful.
But can't download it with the library to my ESP32:

[I][BintrayClient.cpp:121] getLatestVersion(): Error: Could not parse JSON!
[I][SecureOTA.cpp:46] checkFirmwareUpdates(): Could not load info about the latest firmware, so nothing to update. Continue

Any hints what i am doing wrong? Or is it a bug?

Is there a proper step-by-step instruction?

I find the video hard to follow, and it doesn't really help me understand what is happening. Is there a proper step-by-step instruction that a script kiddy like me can follow?

Does not run with ArduinoJson 6?

When I try to compile, I get the following error:

lib\BintrayClient\src\BintrayClient.cpp:115:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6
     StaticJsonBuffer<bufferSize> jsonBuffer;

Now I guess the error is my "wrong" ArduinoJson version, but wouldn't it be nice if your code ran with the latest ArduinoJson version?

OTA update with JFrog Bintray - Certificate issue

I watched the video about JFrog Bintray and tried to make it work here. Follow the steps that I did:

  1. Created an account on Bintray
  2. Created a repository called WStation
  3. Created a package called bintray-secure-ota
  4. Cloned your sample code
  5. Changed platformio.ini to:
[bintray]
user = 
repository = WStation
package = bintray-secure-ota
api_token =

[wifi]
ssid = 
password =

release_version = 1
…

When env_default setting (in platformio.ini) is set to release, it uploads the code to bintray. It is working. When I set the env_default to debug and uploaded the firmware to the ESP32, the terminal shows the following log:

Device version: v.0
Connecting to … connected!
IP address: 192.168.100.126
[E][ssl_client.cpp:33] handle_error(): X509 - Certificate verification failed, e.g. CRL, CA or signature check failed
[E][ssl_client.cpp:35] handle_error(): MbedTLS message code: -9984
[E][WiFiClientSecure.cpp:109] connect(): start_ssl_client: -9984
GET request failed, error, connection refused
Error: Could not parse JSON!
Could not load info about the latest firmware, so nothing to update. Continue …

How can I handle this issue?

Can't upload firmware files

I'm trying to upload firmware files with platformIO, but i always run on error:

CURRENT: upload_protocol = custom
Uploading .pioenvs\release\firmware_v_1.bin
Uploading firmware_v_1.bin to Bintray. Version: 1
Failed to submit package: 401
{"message":"This resource requires authentication"}

API-token is set in platformio.ini

publish_firmware.py does not return an error code

If the upload to bintray fails, there is no return code from publish_firmware causing the overall pio execution to declare SUCCESS, even though it failed. How can publish_firmware return an error?

PlatformIO does not find BintrayClient.h after install library

@ivankravets Thanks for the platformio - bintray enhancement!

I installed bintray-secure-ota by
lib_deps_ota = https://github.com/platformio/bintray-secure-ota.git
in my platformio.ini

It did install after first time building my code

Dependency Graph
|-- <ArduinoJson> 5.13.2
|-- <bintray-secure-ota> #d0899cd
|   |-- <Update> 1.0
|   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0

but the library manager cannot find BintrayClient.h by inlude in my OTA.h:

#include <BintrayClient.h>

In file included from src\OTA.cpp:18:0:
src\OTA.h:9:27: fatal error: BintrayClient.h: No such file or directory

***********************************************************************
* Looking for BintrayClient.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:BintrayClient.h"
* Web  > https://platformio.org/lib/search?query=header:BintrayClient.h
*
***********************************************************************

compilation terminated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.