B4R Code Snippet ESP32CAM - Print Logs Workaround - b4xlib included

All of you that have bought the ESP32CAM you know that it does not print logs in B4R. So if you cannot go through a problem, just go around it. The around way is to post in MQTT server the logs and display them in B4J app. And it works.

b4xlib usage:

Sub Process_Globals
    Public Serial1 As Serial
    Private wifi As ESP8266WiFi
    Public wificlient As WiFiSocket
    Private tim As Timer
End Sub

Private Sub AppStart
    'example of connecting to a local network
    If wifi.Connect2("SSID", "WIFIPASS") Then
        Log("Connected to network")
        ESP32CAM.Initialize(wificlient, Array As Byte(192,168,15,124), 1883, "mqttusername", "mqttpass")
        Log("Failed to connect to network")
    End If
    tim.Initialize("tim_Tick", 1000)
    tim.Enabled = True
End Sub

Sub tim_Tick
End Sub


  • ESP32CAMLogs_B4J.zip
    2.5 KB · Views: 68
  • ESP32CAMLogs_B4R.zip
    1.8 KB · Views: 64
  • rESP32CAM.b4xlib
    958 bytes · Views: 71
Last edited:


Well-Known Member
Licensed User
Longtime User
Added also the b4xlib.

Similar Threads