Notifications
Clear all

ESP32 BLE examples for client and server do not compile sucessfully.

7 Posts
3 Users
1 Reactions
99 Views
(@butcha)
Member
Joined: 11 months ago
Posts: 4
Topic starter  

Arduino support says this is not their problem.  Espressif does not respond.  I am hoping someone can help with this...

Testing done with Arduino IDE 2.3.2, boards manager esp32 by Espressif ver. 3.0.2 (and lower versions), ESP32C3 (& other modules), windows 11...

 

Selecting file > examples>examples > custom libraries > ESP32 BLE Arduino > BLE client loads sketch client.ino

Compiling gets: Many errors ending in Compilation error: 'BLEUUID' does not name a type

 

Selecting file > examples>examples > custom libraries > ESP32 BLE Arduino > BLE server loads sketch server.ino

Compiling gets: Many errors ending in Compilation error: 'init' is not a member of 'BLEDevice'

 

Any and all help appreciated - thanks


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7381
 

@butcha Both of those are the wrong place to get support, you have no proof that the espressif products have a bug, or that the IDE is at fault. If you created the sketches, then it's your problem and we will gladly help. If you copied them from a reputable source, then the issue is in your environment. We have a plan for that but it is extreme (format?)

The first thing you need to provide is a LINK to the code and any videos but much better the accompanying articles. then zip up the entire compile output so I can see what is happening.

At this stage, my hunch is you have not installed some libraries or the IDE correctly (BTW, what OS)

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7381
 

@butcha I took a quick look, and the key compile errors (at the beginning) are missing types! This is serious. Unless you have human lives or a lot of money at risk if this project can't be done I suggest you make the following changes.

Drop back to esp32 ver 2 boards, too many unknowns with the new 3's still.

Start with Bills recent BT video/article

EDIT

The underlying reason is that ESP released a new major release of the API. See this LINK  You could drop back to a 2.x release, but you are now either locked into the past for everything, or you have to remenber to constanlty upgrade, downgrade. Not worth it, the best strategy is patience.

Have a look at what Bill posted recently VIDEO  and ARTICLE

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@butcha)
Member
Joined: 11 months ago
Posts: 4
Topic starter  

@zander 

Thanks for the response, Ron. I will try to answer as follows:

You said: "Both of those are the wrong place to get support"
I say: If I cannot get help from the software authors, then where else should I seek help?

You: "you have no proof that the espressif products have a bug, or that the IDE is at fault"
Me: My "proof" is that the examples do not compile. I do not exactly know who is at fault.

You: "If you created the sketches, then it's your problem and we will gladly help. If you copied them from a reputable source, then the issue is in your environment."
Me: Key point is that these are examples by espressif. I did NOT create or copy these sketches.

You: "The first thing you need to provide is a LINK to the code..."
Me: The code is as stated in my original post.
custom libraries > ESP32 BLE Arduino > BLE client loads sketch client.ino
custom libraries > ESP32 BLE Arduino > BLE server loads sketch server.ino

You: "Drop back to esp32 ver 2 boards..."
Me: As stated in my original post, I tried boards manager esp32 by Espressif ver. 3.0.2 (and lower versions). No joy

You: "(BTW, what OS)" sic.
Me: As stated in my original post, windows 11...

Some history: I tried to explain to Arduino support that the examples should work, period.
If examples do not work, then they should NOT be listed or a warning should be given that they do not work.
When I teach code to STEM kids, I expect examples to work. period.


   
Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7381
 

@butcha This

I expect 

says it all. I had a few great teachers, but unfortunately more bad teachers. I have been waiting all my life to get some payback. YOU ARE IT! My friend Harrison punched out the teacher that publicly insulted him, he was not reprimanded, the teacher was. That was my first exposure to justice.

I am 82yo, diagnosed Autistic Spectrum Disorder, ADD and later Asperger's syndrome (my 'thing' is finding other peoples bugs and making code run fast. I held the world record for transaction speed on the global financial markets at one time.

I discovered computers in 1959. I retired from my Computer consulting company in 2004. Besides myself, I had two employees who were paid $100k+ a year. This was in Canada and that was good money then. 

Now that you have a better idea who and what I am, let's move on.

Below is a screen grab showing the two sketches you are unable to compile clean. I was able to do so. My 'secret' is I can do research which is mostly reading. There is a bug, and a fix is documented. I will tell you it is a clash between Espressif and Arduino. I suspect the reason you did not get the answer may have something to do with the way you communicate. Having worked support for many years, we often ran into people like you. Those are the people we told to format their hard drive and start over.

One last thing, since you mentioned students, that means you are asking me to do your job. THAT WILL NOT HAPPEN!

Here is a screen grab of the two sketches compiling clean for a ESP32C3 dev board.

The answer is out there.

Screenshot 2024 07 05 at 08.26.41

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 124
 

@butcha 

The short story.

I have had problems with some of their examples also so your not alone. The arduino framework for the esp32 is an open source project maintained by Espressif.  It is NOT their flagship product, the esp-idf is. When a major release occurs, version 2 to version 3, there are going to be breaking changes. With limited man power I am sure some things are going to slip through the cracks. I think you may have better luck reverting back to Version 2 of the framework and then running the examples with that version, from that version.

Also, any 3rd party libraries (non Espressif and not included in the framework, like really external) are going to have to catch up if any breaking changes touch their libraries.

For BLE I found these changes were made going from version 2 to 3:

----------------

BLE

Changes in APIs

  • Changed APIs return and parameter type from std::string to Arduino style String.

  • Changed UUID data type from uint16_t to BLEUUID class.

  • BLEScan::start and BLEScan::getResults methods return type changed from BLEScanResults to BLEScanResults*.

----------------------

This post was modified 13 hours ago by noweare

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7381
 

@noweare There is a very simple fix as I already posted earlier. Here is the ESP official guide, BUT that is NOT what I did to make the code work.

https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

Also the Random Nerds have the same information at 

https://randomnerdtutorials.com/esp32-migrating-version-2-to-3-arduino/

BUT again, I got the sketches that the OP mentioned to compile without going through the migration.

This post was modified 12 hours ago 2 times by Ron

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote