B4R Question ESP32 Bluetooth

Brian Dean

Well-Known Member
Licensed User
Longtime User
I have used B4A and B4J for years but I started on B4R yesterday. I have written microprocessor code but nothing for Arduino and I am going straight to ESP32. I have run the base B4R code (WiFi example) successfully on my ESP32. My next attempt is the ESP Classic Bluetooth wrap-test example here. The compilation cycle starts off fine and essentially completes, but at the end I get this log message . . .
...
Wrote 1054784 bytes (672110 compressed) at 0x00010000 in 11.2 seconds (751.8 kbit/s).
Hash of data verified.
Hard resetting via RTS pin...
New upload port: COM5 (serial)
[IDE message - 9:19:53]
An error occurred.
The directory name is invalid
I guess that this is some basic newbie oversight that I have missed, but I am conscious that the example code is dated May 2018 and I might be missing something that needs to be changed. Any pointers would be appreciated.

Edit : Just noticed that in the "Build Configurations" menu the entry for Package is "B4RDev" and is greyed out. That does not look right, but have not found out why.

Edit again : Think I have found the answer in another forum post - the Arduino compiler will not tolerate spaces in file (or folder?) names. Checking that out now.

Edit again again : Yes - that was the problem. Now get a "Sketch too big" error, but that will have to wait for tomorrow. And the B4RDev package name is still greyed out and that still seems unusual.
 
Last edited:

Brian Dean

Well-Known Member
Licensed User
Longtime User
Thanks - that is a useful pointer. The application I have in mind will be small, essentially a simple event logger, and Bluetooth is a convenient path to retrieve the data. I will experiment with alternative partition sizes.
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
Hello Brian, which model of ESP-32 do you use. Cause some models like the ESP32-C3 do not support classic bluetooth.
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
Hi @Toley - I am using the Elegoo ESP-WROOM-32 board. I have not used Elegoo before but it looked well-recommended and I must say that the boards look really well made and presented.

Edit : I have got my ESP32 app compiling successfully, by the way, but I have also realised that if I set my phone to be a wifi hotspot then I can communicate with the ESP32 by wifi, even in a "wifi desert". That is a problem that I am trying to solve and so might be a more attractive path. (And I understand why the BRDev package name is greyed out in the Build Configuration dialogue - all good.)
 
Last edited:
Upvote 0
Top