B4R Library esp8266 OTA updater

Discussion in 'B4R Libraries' started by Siam, Jan 11, 2019.

  1. Siam

    Siam Active Member Licensed User


    here is my next attempt to write a lib for B4R ;)

    The Lib based on the following Libraries (you have to install this bevor you can use this lib):


    i have Testet with the ESP8266 board



    attention: This is a non working example you have to add some code for the versions check and maybe with a timer which will check vor new updates once a day or every hour

    You find the .bin file in the folder ..../Objects/bin/ upload this to your webserver.

    #Region Project Attributes
    #AutoFlushLogs: True
    #CheckArrayBounds: True
    #StackBufferSize: 300
    #End Region

    Sub Process_Globals
    'These global variables will be declared once when the application starts.
        'Public variables can be accessed from all modules.
        Public Serial1 As Serial
    Public ota As ESP8266OTA
    Public wifi As ESP8266WiFi
    End Sub

    Private Sub AppStart
    'add here a versioncheck maybe with httpjob and a version.txt file on the server
        dim result as string
    If result <> "success" Then
    Log ("Error: ",result)
    End If

    'add here a versioncheck maybe with httpjob and a version.txt file on the server
        dim result as string
    If result <> "success" Then
    Log ("Error: ",result)
    'you can send here a notification and then restart your esp8266
    End If
    End Sub

    Attached Files:

    Last edited: Jan 13, 2019
  2. rbghongade

    rbghongade Active Member Licensed User

    Hi Siam,
    Can you please create a similar library for ESP32?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice