B4R Question Compile Error ESP32

Humberto

Active Member
Licensed User
Longtime User
I´m trying to compile to ESP32 with BLE and Wifi and there are error to find library.

Is installed already the ESP 32 version 1.04 ( I trued also with 1.03 ) and still get error


Bellow is the log ( relevant code)

Thanks


B4X:
Set log4j store directory C:\Users\Hu\AppData\Local\Arduino15
Carregando configuração...
Inicializando pacotes...
...........
"-IC:\\Users\\Hu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4/tools/sdk/include/fb_gfx" -std=gnu++11 -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -w -Wno-error=maybe-uninitialized -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-sign-compare -fno-rtti -c -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10810 -DARDUINO_D1_MINI32 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"D1_MINI32\"" "-DARDUINO_VARIANT=\"d1_mini32\"" -DESP32 -DCORE_DEBUG_LEVEL=0 "-IC:\\Users\\Hu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\cores\\esp32" "-IC:\\Users\\Hu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\variants\\d1_mini32" "-IC:\\Users\\Hu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\libraries\\WiFi\\src" "-IC:\\Users\\Hu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\libraries\\WiFiClientSecure\\src" "-IC:\\Users\\Hu\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\libraries\\BLE\\src" "C:\\Basic4R\\teste3\\BLE_IN~1\\Objects\\bin\\sketch\\b4r_wifiserver.cpp" -o nul
Alternatives for ESP8266WiFi.h: []
ResolveLibrary(ESP8266WiFi.h)
  -> candidates: []
Foram encontradas múltiplas bibliotecas para "WiFi.h"
b4r_wifiserver.cpp:44:28: error: ESP8266WiFi.h: No such file or directory
compilation terminated.
Usado: C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Não usado: C:\Program
Foram encontradas múltiplas bibliotecas para "WiFiClientSecure.h"
Usado: C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure
Foram encontradas múltiplas bibliotecas para "BLEDevice.h"
Usado: C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\BLE
exit status 1
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@166c0fb]
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@166c0fb]...
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=StatusLogger]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=ContextSelector]
TRACE StatusLogger Unregistering 1 MBeans: [org.apache.logging.log4j2:type=af3868,component=Loggers,name=]
TRACE StatusLogger Unregistering 2 MBeans: [org.apache.logging.log4j2:type=af3868,component=Appenders,name=RollingFile, org.apache.logging.log4j2:type=af3868,component=Appenders,name=Console]
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncAppenders,name=*'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=AsyncLoggerRingBuffer'
TRACE StatusLogger Unregistering but no MBeans found matching 'org.apache.logging.log4j2:type=af3868,component=Loggers,name=*,subtype=RingBuffer'
TRACE StatusLogger Stopping XmlConfiguration[location=jar:file:/C:/Program%20Files%20(x86)/Arduino/lib/pde.jar!/log4j2.xml]...
TRACE StatusLogger XmlConfiguration notified 2 ReliabilityStrategies that config will be stopped.
TRACE StatusLogger XmlConfiguration stopping 1 LoggerConfigs.
TRACE StatusLogger XmlConfiguration stopping root LoggerConfig.
TRACE StatusLogger XmlConfiguration notifying ReliabilityStrategies that appenders will be stopped.
TRACE StatusLogger XmlConfiguration stopping remaining Appenders.
DEBUG StatusLogger Shutting down RollingFileManager C:\Users\Hu\AppData\Local\Arduino15/logs/application.log



............
 

thetahsk

Active Member
Licensed User
Longtime User
I´m trying to compile to ESP32 with BLE and Wifi and there are error to find library.

Have you tried to compile an original Arduino Sketch with Wifi and BT ?
Which versions of B4R and Arduino IDE do you use ?

and check this error

B4X:
error: ESP8266WiFi.h: No such file or directory
 
Last edited:
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
I´ll try to find an sletch with both BLE and WIFI

I have an test application that works with BLE and Another that works with WIFI, when I try to compile one Test APK with both libaries that this error occurs

The problem is with this library

B4X:
ESP8266WiFi.h: No such file or directory
 
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
In attach there are two project one just with BLE and the second the same project but add the esp8266wifi and some routines

The first compile OK the second the error bellow as BLE Libraie not found and problem with "WiFiClientSecure"

B4X:
2019-12-17T19:27:19.984Z INFO c.a.u.n.HttpConnectionManager:148 [cc.arduino.packages.discoverers.serial.SerialDiscovery] Connect to https://builder.arduino.cc/builder/v1/boards/0x10C4/0xEA60, method=GET, request id=3AB4DBE749D84599
2019-12-17T19:27:21.033Z INFO c.a.u.n.HttpConnectionManager:152 [cc.arduino.packages.discoverers.serial.SerialDiscovery] Request complete URL="https://builder.arduino.cc/builder/v1/boards/0x10C4/0xEA60", method=GET, response code=404, request id=3AB4DBE749D84599, headers={null=[HTTP/1.1 404 Not Found], Cache-Control=[no-cache, no-store, must-revalidate], Server=[nginx], Connection=[keep-alive], Vary=[Origin], Pragma=[no-cache], Expires=[0], Content-Length=[0], Date=[Tue, 17 Dec 2019 19:27:20 GMT]}
2019-12-17T19:27:21.034Z WARN p.a.h.BoardCloudResolver:64 [cc.arduino.packages.discoverers.serial.SerialDiscovery] Fail to get the Vid Pid information from the builder response code=404
b4r_wifiserver.cpp:42:28: error: ESP8266WiFi.h: No such file or directory
Foram encontradas múltiplas bibliotecas para "WiFi.h"
compilation terminated.
Usado: C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Não usado: C:\Program
Foram encontradas múltiplas bibliotecas para "WiFiClientSecure.h"
Usado: C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFiClientSecure
Foram encontradas múltiplas bibliotecas para "BLEDevice.h"
Usado: C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\BLE
exit status 1
DEBUG StatusLogger Stopping LoggerContext[name=af3868, org.apache.logging.log4j.core.LoggerContext@166c0fb]
 

Attachments

  • Ble_Inline.zip
    2.6 KB · Views: 295
  • Ble_Inline_WIFI.zip
    6.7 KB · Views: 305
Upvote 0

Siam

Active Member
Licensed User
Longtime User
Hi,
I think if you cleanup the Project from the first Program it will give you the same error as the second Program

you can look under this path :
C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\
if there is a BLE Directory i think it is not there if yes then the BLEDevice.h is missing

The easyest way for you is start arduino go to Librarymanager and (re)install the BLE Library
 
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
Siam

As I told you the project just with BLE function works.

It´s seems that the problem is with ESP8266wifi library.

I trye and old project that worked with ESP8266 now doesn´t compile anymore

I´m running B4R 3.0

If you have an Old version of B4R ( that I used to run on ESP8266 I could try.

I can not find mine old version
 
Upvote 0

Siam

Active Member
Licensed User
Longtime User
have you looked in your path
C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\
if there is a BLE Directory? if it is there which files are in it ?

It can't be the wifi Library because the compiler say that
BLEDevice.h
don't exists in the Path
C:\Users\Hu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\BLE


as i sayed bevor

The easyest way for you is start arduino ide go to Librarymanager and (re)install the BLE Library
 
Upvote 0

Humberto

Active Member
Licensed User
Longtime User
I cut routine by rotine to get witch one is doing the error and finally the routine

B4X:
Sub MacAddress() As Byte()
    RunNative("getMac", Null)
    Return macarray
End Sub
#if C
  #include <ESP8266WiFi.h>
  void getMac(B4R::Object* u) {
  WiFi.macAddress((Byte*)b4r_wifiserver::_macarray->data);
  }
#end if

That is the cause of the problem.

I will open a new thread to know how to get the mac address of the ESP32

https://www.b4x.com/android/forum/threads/how-to-get-the-mac-address-from-esp32.112309/
 
Upvote 0
Top