Heltec V3 Wifimanager not working

I’m really frustrated that Heltec have discontinued the wireless stick light V2. None of my code works on the V3.

Has anyone managed to get Wifimanger (tzapu) working with the V3?

My problem is with the V2 I could use Lora and WifiManager together with no problems

With the V3 I cant.

If I use Board library,

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

wifmanger will work but loraWan won’t work I get an error saying cant find LoRaWan_APP.h

if I use,
https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/releases/download/0.0.7/package_heltec_esp32_index.json

LoRaWan_APP.h works but not wifimanger. I get an error

Arduino: 1.8.19 (Windows 10), Board: “WiFi Kit 32(V3), Core 1, Core 1, 240MHz (WiFi), 921600, None”

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: core\core.a(esp32-hal-misc.c.o):(.literal.temperatureRead+0x4): undefined reference to `temp_sensor_set_config’

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: core\core.a(esp32-hal-misc.c.o):(.literal.temperatureRead+0x8): undefined reference to `temp_sensor_start’

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: core\core.a(esp32-hal-misc.c.o):(.literal.temperatureRead+0xc): undefined reference to `temp_sensor_read_celsius’

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: core\core.a(esp32-hal-misc.c.o):(.literal.temperatureRead+0x10): undefined reference to `temp_sensor_stop’

Multiple libraries were found for “WiFi.h”

Used: C:\Users\08435051\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\libraries\WiFi

Not used: C:\Program Files (x86)\Arduino\libraries\WiFi

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: core\core.a(esp32-hal-misc.c.o): in function `temperatureRead’:

C:\Users\08435051\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\cores\esp32/esp32-hal-misc.c:71: undefined reference to `temp_sensor_set_config’

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\08435051\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\cores\esp32/esp32-hal-misc.c:72: undefined reference to `temp_sensor_start’

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\08435051\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\cores\esp32/esp32-hal-misc.c:73: undefined reference to `temp_sensor_read_celsius’

c:/users/08435051/appdata/local/arduino15/packages/heltec-esp32/tools/xtensa-esp32s3-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/…/lib/gcc/xtensa-esp32s3-elf/8.4.0/…/…/…/…/xtensa-esp32s3-elf/bin/ld.exe: C:\Users\08435051\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\cores\esp32/esp32-hal-misc.c:74: undefined reference to `temp_sensor_stop’

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board WiFi Kit 32(V3).

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\ASR650x-Arduino-master: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\ASR650x-Arduino-master

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\buzzer1: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\buzzer1

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\CubeCell-Arduino-master: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\CubeCell-Arduino-master

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\ESP32_HTTP_GET_Request_JSON.ino: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\ESP32_HTTP_GET_Request_JSON.ino

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\ESP_HTTP_POST_MySQL: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\ESP_HTTP_POST_MySQL

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\ESP_HTTP_POST_MySQL_working: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\ESP_HTTP_POST_MySQL_working

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\i2C_scanner: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\i2C_scanner

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\RecTech: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\RecTech

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\time: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\time

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

The only comment I can offer at this point is that there are a couple of messages in there that suggest that you’ve not selected the correct board, if you’re trying to compile for the WiFi LoRa 32 or Wireless Stick Lite V3 board:

WARNING: library WiFiManager-master claims to run on esp8266, esp32 architecture(s) and may be incompatible with your current board which runs on avr architecture(s).

suggests that the board you have selected is not an ESP8266 or ESP32, but is based on the AVR architecture.

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\ASR650x-Arduino-master: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\ASR650x-Arduino-master

and

Invalid library found in C:\Users\08435051\Documents\Arduino\libraries\CubeCell-Arduino-master: no headers files (.h) found in C:\Users\08435051\Documents\Arduino\libraries\CubeCell-Arduino-master

seem to suggest that you’ve chosen one of the CubeCell boards rather than the WiFi LoRa 32 V3 / Wireless Stick Lite V3 board.

Hi Pete
I uploaded the wrong error. The correct error is up now

I have just compiled and loaded my gateway sketch onto a Wireless Stick Lite V3. It receives LoRa messages from other LoRa Nodes in my network and sends out messages, via WiFi, to an MQTT broker on my LAN. No problems compiling, loading or running.

The sketch is not trivial, so it’s a bit much to try to post it here, but the header files that are used, without any conflict, are as follows:

#include <esp_int_wdt.h>        // ESP32 watchdog timers
#include <esp_task_wdt.h>

#include "Arduino.h"
#include "LoRaWan_APP.h"        // Heltec LoRa protocol
#include <WiFi.h>               // WiFi client
#include <PubSubClient.h>       // MQTT client
#include <PacketHandler.h>      // [Langlo] LoRa Packet management
#include <OneWire.h>            // Required for Dallas Temperature
#include <DallasTemperature.h>  // DS18B20 Library

#include <Ticker.h>             // Asynchronous task management

#include <LangloLoRa.h>         // [Langlo] LoRa configuration parameters
#include <LangloWiFi.h>         // [Langlo] WiFi configuration parameters
#include <PiMQTT.h>             // [bb-7 Pi] MQTT configuration parameters
#include <WSLV3Pins.h>          // Heltec Wireless Stick Lite V3 pin definitions
#include <nodeLV3G1config.h>    // Specific local Node configuration parameters

For starters, you should be able to create an empty sketch (empty setup and loop elements) containing the first 10 header files (the latter 5 are just configuration files that are only required when the sketch actually does something) and compile it without error (I have just done that using macOS 10.14.5, IDE 2.0.3 and “Additional boards manager URLs : https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series/releases/download/0.0.7/package_heltec_esp32_index.json” in the IDE Preferences > Settings). If that won’t compile, I think you need to look at your IDE installation.

1 Like

Hi Pete
Thanks for your help. the main thing I would love to work is Wifimanager as clients use it as a captive portal to connect to their wifi.

/**

  • WiFiManager advanced demo, contains advanced configurartion options
  • Implements TRIGGEN_PIN button press, press for ondemand configportal, hold for 3 seconds for reset settings.
    */
    #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager

#define TRIGGER_PIN 0

// wifimanager can run in a blocking mode or a non blocking mode
// Be sure to know how to process loops with no delay() if using non blocking
bool wm_nonblocking = false; // change to true to use non blocking

WiFiManager wm; // global wm instance
WiFiManagerParameter custom_field; // global param ( for non blocking w params )

void setup() {
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
Serial.begin(115200);
Serial.setDebugOutput(true);
delay(3000);
Serial.println("\n Starting");

pinMode(TRIGGER_PIN, INPUT);

// wm.resetSettings(); // wipe settings

if(wm_nonblocking) wm.setConfigPortalBlocking(false);

// add a custom input field
int customFieldLength = 40;

// new (&custom_field) WiFiManagerParameter(“customfieldid”, “Custom Field Label”, “Custom Field Value”, customFieldLength,“placeholder=“Custom Field Placeholder””);

// test custom html input type(checkbox)
// new (&custom_field) WiFiManagerParameter(“customfieldid”, “Custom Field Label”, “Custom Field Value”, customFieldLength,“placeholder=“Custom Field Placeholder” type=“checkbox””); // custom html type

// test custom html(radio)
const char* custom_radio_str = “
Custom Field Label One
Two
Three”;
new (&custom_field) WiFiManagerParameter(custom_radio_str); // custom html input

wm.addParameter(&custom_field);
wm.setSaveParamsCallback(saveParamCallback);

// custom menu via array or vector
//
// menu tokens, “wifi”,“wifinoscan”,“info”,“param”,“close”,“sep”,“erase”,“restart”,“exit” (sep is seperator) (if param is in menu, params will not show up in wifi page!)
// const char* menu[] = {“wifi”,“info”,“param”,“sep”,“restart”,“exit”};
// wm.setMenu(menu,6);
std::vector<const char *> menu = {“wifi”,“info”,“param”,“sep”,“restart”,“exit”};
wm.setMenu(menu);

// set dark theme
wm.setClass(“invert”);

//set static ip
// wm.setSTAStaticIPConfig(IPAddress(10,0,1,99), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); // set static ip,gw,sn
// wm.setShowStaticFields(true); // force show static ip fields
// wm.setShowDnsFields(true); // force show dns field always

// wm.setConnectTimeout(20); // how long to try to connect for before continuing
wm.setConfigPortalTimeout(30); // auto close configportal after n seconds
// wm.setCaptivePortalEnable(false); // disable captive portal redirection
// wm.setAPClientCheck(true); // avoid timeout if client connected to softap

// wifi scan settings
// wm.setRemoveDuplicateAPs(false); // do not remove duplicate ap names (true)
// wm.setMinimumSignalQuality(20); // set min RSSI (percentage) to show in scans, null = 8%
// wm.setShowInfoErase(false); // do not show erase button on info page
// wm.setScanDispPerc(true); // show RSSI as percentage not graph icons

// wm.setBreakAfterConfig(true); // always exit configportal even if wifi save fails

bool res;
// res = wm.autoConnect(); // auto generated AP name from chipid
// res = wm.autoConnect(“AutoConnectAP”); // anonymous ap
res = wm.autoConnect(“AutoConnectAP”,“password”); // password protected ap

if(!res) {
Serial.println(“Failed to connect or hit timeout”);
// ESP.restart();
}
else {
//if you get here you have connected to the WiFi
Serial.println(“connected…yeey :)”);
}
}

void checkButton(){
// check for button press
if ( digitalRead(TRIGGER_PIN) == LOW ) {
// poor mans debounce/press-hold, code not ideal for production
delay(50);
if( digitalRead(TRIGGER_PIN) == LOW ){
Serial.println(“Button Pressed”);
// still holding button for 3000 ms, reset settings, code not ideaa for production
delay(3000); // reset delay hold
if( digitalRead(TRIGGER_PIN) == LOW ){
Serial.println(“Button Held”);
Serial.println(“Erasing Config, restarting”);
wm.resetSettings();
ESP.restart();
}

  // start portal w delay
  Serial.println("Starting config portal");
  wm.setConfigPortalTimeout(120);
  
  if (!wm.startConfigPortal("OnDemandAP","password")) {
    Serial.println("failed to connect or hit timeout");
    delay(3000);
    // ESP.restart();
  } else {
    //if you get here you have connected to the WiFi
    Serial.println("connected...yeey :)");
  }
}

}
}

String getParam(String name){
//read parameter from server, for customhmtl input
String value;
if(wm.server->hasArg(name)) {
value = wm.server->arg(name);
}
return value;
}

void saveParamCallback(){
Serial.println("[CALLBACK] saveParamCallback fired");
Serial.println("PARAM customfieldid = " + getParam(“customfieldid”));
}

void loop() {
if(wm_nonblocking) wm.process(); // avoid delays() in loop when non-blocking and other long running code
checkButton();
// put your main code here, to run repeatedly:
}

OK, well this may not be the news you’d like to hear, but I just tried to compile that sketch in my environment and compilation fails just as you originally described. I’ve never used WiFi manager, so I can’t really offer much more help on that front.

For what it’s worth though, sifting through the relevant files, I can see the code that wants to check the chip temperature, but I can also see the temp_sensor.h file that the complier would seem to be complaining about not being able to find. But at that point I run out of talent…

If, however, I comment out the code inside the temperature_read() function, and just let it return “NAN”, as if the read failed, the code compiles, but I’ve no idea what impact this will have on the hardware or the execution of the sketch.

If you’re interested, on my installation, the relevant file is located at:

Library/Arduino15/packages/Heltec-esp32/hardware/esp32/0.0.7/cores/esp32/esp32-hal-misc.c

and I commented out the content (after line 70) as illustrated below:

float temperatureRead()
{
    float result = NAN;
    /*
    temp_sensor_config_t tsens = TSENS_CONFIG_DEFAULT();
    temp_sensor_set_config(tsens);
    temp_sensor_start();
    temp_sensor_read_celsius(&result); 
    temp_sensor_stop();
    */
    return result;
}

in order to get the sketch to compile.

thanks for your help with this Pete. It ended up compiling. Unfortunately the wifi didn’t work but i’m not fussed I have gone back to using the the esp32 espressif library and that works with wifimanager.

Dear. I have of same problem. I comment this line, then the compilated work good. But I can´t to see the access point´s SSID in any device (Windows or Android). Could you help me. Thanks very much.