Heltec V3 ESP LORA 32 Does NOT WORK!@#%* Aaron Lee Respond NOW

I have been trying to get my 2 Heltec V3 Lora 32 devices to work for the last week. I am TOTALLY FRUSTRATED since I CANNOT connect the board serially (fails each time. Have installed correct driver), cannot COMPILE any sketch with the same error message (shown below) unless I try using a Lora32 V2 board and then I get a wrong ESP32 error message and have tried 2 PCs, new type-c cables, deleted Arduino IDE and re-installed IDE about 25 times, gone through your protocol to install the V3 software and have COMPLETELY RUN OUT OF IDEAS. I cannot believe I am the ONLY person having these issues. If I CANNOT get this device working soon, the devices are going back to AMAZON for a complete refund. I have NEVER had an Arduino experience like this and I am NOT HAPPY. I am too old (79 years) to have to put up with this incompetence (am a retired Electrical Engineer with years of computer experience!!).

Here are my error messages:

#1 Error Message (Compiling with WiFi LORA 32(V3) board):

In file included from c:\users\dell optiplex\appdata\local\arduino15\packages\heltec-esp32\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32s3-elf\include\c++\8.4.0\string:41,
from c:\users\dell optiplex\appdata\local\arduino15\packages\heltec-esp32\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32s3-elf\include\c++\8.4.0\stdexcept:39,
from c:\users\dell optiplex\appdata\local\arduino15\packages\heltec-esp32\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32s3-elf\include\c++\8.4.0\array:39,
from c:\users\dell optiplex\appdata\local\arduino15\packages\heltec-esp32\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32s3-elf\include\c++\8.4.0\tuple:39,
from c:\users\dell optiplex\appdata\local\arduino15\packages\heltec-esp32\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32s3-elf\include\c++\8.4.0\functional:54,
from C:\Users\Dell Optiplex\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\cores\esp32/HardwareSerial.h:49,
from C:\Users\Dell Optiplex\AppData\Local\Arduino15\packages\Heltec-esp32\hardware\esp32\0.0.7\cores\esp32/Arduino.h:173,
from C:\Users\Dell Optiplex\AppData\Local\Temp\arduino-sketch-DA6E3C8473B3DAF0916C1101C8B3E1E7\sketch\Blink.ino.cpp:1:
c:\users\dell optiplex\appdata\local\arduino15\packages\heltec-esp32\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3\xtensa-esp32s3-elf\include\c++\8.4.0\bits\allocator.h:46:10: fatal error: bits/c++allocator.h: No such file or directory
#include <bits/c++allocator.h> // Define the base class to std::allocator.
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

exit status 1

Compilation error: exit status 1

#2 Error Message (compiling with WiFi LORA 32 board):

Sketch uses 219053 bytes (16%) of program storage space. Maximum is 1310720 bytes.
Global variables use 16088 bytes (4%) of dynamic memory, leaving 311592 bytes for local variables. Maximum is 327680 bytes.
esptool.py v3.3
Serial port COM8
Connecting…

A fatal error occurred: This chip is ESP32-S3 not ESP32. Wrong --chip argument?
Failed uploading: uploading error: exit status 2

This error is a development board selection error. You need to select a V3 development board.

When I select a V3 development board, I can NOT compile the sketch (see Error #1 above). So there are 2 issues - cannot compile any sketch (including BLINK) because I get the Allocator.h error with V3 development board and if I try to use any other development board option, I get the Wrong chip error.

I need someone, primarily Heltec, to give me a solution to Error Message #1 above so I can at least compile a sketch. After being successful with a sketch compile, I can then see if I load the sketch into the V3 board correctly. This is VERY FRUSTRATING…

The other issue that I continue to see is that the V3 device, when I apply power, says it is Connecting and then always Fails. Can someone help me with this behavior??? Is it a boot code issue? Is it a USB issues (I have tried 3 different type-C cables, 3 different PCs and still get the same results). As I have stated in another post, the device after the Connection Failure, goes on and sets up WiFi, does a WiFi scan correctly and then waits for lora activity. I ask - is all of this NORMAL behavior?? I believe the Connection Failure represents the board is NOT connected serially to the PC. Ah Yes, I have installed the CP210X driver and can see it is installed correctly by looking at Widows Device Manager. Any and ALL HELP will be appreciated…

Art

Looking at the code (File > Examples > Heltec-Example > Factory_Test > WiFi_LoRa_32_V3_FactoryTest), the “Connecting…Failed” message is issued when the WiFi connection fails, and this is probably because, by default, the MCU is attempting to connect to the WiFi network “Your WiFi SSID”, which, more than likely, doesn’t exist. Of course, not being able to load anything and get it running, you are not in a position to edit the sketch and insert a valid SSID and Password and get the board to connect to an actual WiFi network…

So the short answer to your question is, I believe, “Yes”, what you are seeing is exactly what I see when I power up a board with the Factory_Test code installed (without modification), which is how I believe the boards are shipped.

I’ve been away for a couple of days, so I haven’t been able to look more deeply into what is going on with the Allocator.h file—that path definitely looks wrong though. But I don’t understand why it’s not impacting others in exactly the same way it is you, because that path is wrong in my installation too, it just doesn’t seem to be used…

Hi UniquePete,

You are ahead of me here. I am talking about when you insert the V3 board into the PC USB slot (I have used the USB on the PC and also a powered USB hub with the same results), the screen first shows HELTEC Logo and then the board shows Connecting. It waits a few second and then says Failed. The board then proceeds to setup WiFi and scan for WiFi connections which it does successfully. The V3 boards never connects serially to the PC. When I look at Board Info on IDE, it does not show any information. I went on the Arduino forum and followed a post that showed how to look at Serial-Discovery using Windows Powershell and some commands. When I run the program in Powershell, it shows all the Com Port connections including Com 8 which is where the V3 resides. When I disconnect from Com 8 in Powershell, I get all of the board information with PID, VID etc. telling me for some unknown reason, the V3 board is not recognized by IDE when I plug in the USB cable. I will send along some screenshots shortly trying to show all of this. Any help on Allocator.h would be wonderful…

Thanks,
Art

Hi @artl,

I think we’re looking at two different problems here. The board will run with just the power from the USB port, even if it can’t communicate with the PC on the serial port. So what you’re seeing on the OLED display is more than likely just the board doing its thing (running the Factory_Test sketch) as best it can.

Here’s the relevant part of the sketch to better illustrate this first issue:

void setup()
{
	Serial.begin(115200);
	VextON();
	delay(100);
	factory_display.init();
	factory_display.clear();
	factory_display.display();
	logo();
	delay(300);
	factory_display.clear();

	WIFISetUp();
	WiFi.disconnect(); //
	WiFi.mode(WIFI_STA);
	delay(100);

	WIFIScan(1);

When you power up the module, by battery or USB connection, it executes the factory-loaded (WiFi_LoRa_32_V3_FactoryTest.ino) sketch. The initial phase of the sketch is as illustrated above. The factory_display stuff is what displays the logo. Then it moves on to the WiFiSetUp routine, which attempts to connect to the ‘predefined’ WiFi network (“Your WiFi SSID”).

The WiFiSetUp routine just reports the result of the WiFi connection request, which is what you are seeing—“Connecting…”, while it tries 10 times to connect, then the result “Connecting…Failed” when it fails to make the WiFi connection to the non-existent WiFi network “Your WiFi SSID”. Then the sketch moves on to scan for available WiFi networks.

My reading of the code is that it does this regardless of whether or not the initial connection request succeeds. This is just a factory test, after all. It’s testing various aspects of the module, not necessarily doing anything more useful, and in the case of the WiFi LoRa 32 module, which has an OLED display, it’s reporting the results on the OLED display.

The Serial output I can see [in the code] mainly relates to the LoRa side of things, but you should see those messages if you have an ‘active’ USB connection.

If there’s something wrong with the COM port, I would suggest that that is a different problem, and may be related to the IDE configuration as much as the Heltec board. But when you say that when you choose the wrong processor, you get an error message saying that the wrong processor has been chosen, I would suggest that this implies that you have been able to communicate through the COM port—the IDE has attempted to do something [through the serial connection] and discovered that the board it is talking to is not running the processor it is expecting. For this to happen, it would seem to me that there is indeed some level of serial communication going on.

EDITED: Please note, my edits have only added explanatory text, not changed anything in the original response.

OK, back again.

I’ve fiddled around all over the place but I can’t reproduce your [compiler] error. Now, I am using a Mac, so some things might be different, but others who have contributed to related discussions are using Windows successfully.

I can’t get past the option that there’s a problem with your IDE/Heltec support software installation—nothing to do with the boards per sé. I have been compiling sketches with no modules connected, just compiling code, and I can’t get the IDE to fail [to compile a sketch]. Quite apart from any other problem you might be having, if you can’t even compile code, there’s got to be a problem with your IDE configuration.

So, please excuse me if these are dumb questions. They’re a bit like “Is the power cord plugged in?”, but I’ve just done the following myself—fresh install in a virgin work area—to ensure that what I’ve been using hasn’t been ‘fiddled with’ to get it working.

  1. Are you using the latest Arduino IDE (2.0.2)?
  2. Are you using the latest Heltec support software (0.0.7)? The main reason I ask this is that you mention that you are compiling with a “WiFi LORA 32(V3) board”, but the actual name of the board definition that you should be using is “WiFi LoRa 32(V3) / Wireless shell(V3) / Wireless stick lite (V3)”. (see the posts from @kbitsnbyte here and here)
  3. Is it possible to do a fresh install in a ‘clean’ user environment (sorry, I don’t know how Windows works with this sort of thing)? (There are several threads on this subject and I can’t remember who’s done this already) But by this I mean, only install the Arduino IDE (2.0.2) and the Heltec support software (0.0.7), nothing else.

As noted above, I’ve just done all that myself, and it worked out of the box… And because I can’t get a compile to fail, I can’t see what changes might remove the allocator.h error you’re seeing. But if all the above still doesn’t work, are you able to locate the allocator.h file in your installation and just fix that problem with the erroneous path specification (change #include bits/c++allocator.h to #include bits/c++/allocator.h)? That might at least cause a different error, which might give us another lead…

I’m not a young bloke either, so I do feel your pain… :wink:

Hi UniquePete,

Glad to communicate with another “Old Bloke!!!”

  1. I am using Ardunio IDE (2.0.2)
  2. I am using Heltec support software 0.0.7
  3. Fresh install coming up

I have tried so many combinations and permutations with different ESP32 boards (Adafruit included), a V2 Heltec board, 2 V3 Heltec boards, 3 PCs, both older Arduino IDE and the 2.0.2 Arduino IDE, etc that it is time to delete ALL of Ardunio software and do a CLEAN install and do what you recommend - use Ardunio IDE 2.0.2 and Heltec support software 0.0.7 ONLY.

I will start the process now and get back to you with the results. Something has to break, I hope. If not, I will try to track down allocator.h…

Again Thanks so Much for taking the time and effort to help me. Wish you lived close to me so I could take you out to lunch to try to pay back your help!

Art

I did ALL of the above but still have the same compile issue. I tracked down the file in the error message and I could see allocator.h in the right place. I am completely out of ideas. I have published my compile issue on the Arduino forum and hopefully someone over there can give me a hint. I wonder if it is a path length problem?? I will let you know if I get any help from the Arduino folks. Thanks…
Art

What was the error message after you fixed the file (path) specification in the allocator.h file?

Hi @artl. I had a similar problem when I migrated my environment to a new pc. It was caused by a blank character in the user name - some scripts seem to cut off the file/path string at that blank. I tried moving everything to a folder without blanks in the path name but it turns out the arduino environment always puts some stuff in your user data path.
I saw in your first post that you might have a similar issue:

I ended up creating a new user on my new (Windows) pc which has no blank or other funny characters in the user name and reinstalled the arduino environment. after that the errors disappeared. Maybe this approach is worth a try in your situation…

Hi Wolfi45,

Thank You so very much for your reply to my frustrating issue. I will set up a new user without blanks and funny characters. Your tip makes sense since I have tried different PCs, 2 V3 boards, different IDE versions and just about everything I can (and others who have helped me) think of to get around this problem… I will get back to you today and let you know my results… Again THANKS!!!

Art

Hallelujah!!! Wolfie45, IT WORKS!!! I can COMPILE, I can UPLOAD and ALL is WELL… I just finished uploading one of the Heltec Examples OLED Simple Demo where I am seeing all the characters on the screen. Hard to believe I have been working on this board for over a week, all because of a SPACE in my USER NAME… I guess that is life. I did learn much about the inner workings of Arduino and I have met some wonderful Folks like You, UniquePete and Kbitsnbyte who have stayed with me all week and offered great suggestions. I am happy to close this session… Thanks to ALL! The “Old Codger” Art

1 Like

See my solution for this and many other V3 problems at: