Hi.
Using an ESP32-S, I can get the example SerialToSerialBT program to compile in the Arduino IDE and work - no problems. I can happily send and receive data to and from my Samsung S8 phone's .
But I need to use the ESP32-C3. The board is an "ESP32 Dev module" and is physically an Espressif ESP32-C3-DevKitM-1 v1.0 board.
I loaded the "ESP32-C3" board option and try to compile the example SerialToSerialBT and I get compiler errors with many undefined references.
For brevity, I have put in one error entry here...
c:/users/drb/appdata/local/arduino15/packages/esp32/tools/riscv32-esp-elf-gcc/gcc8_4_0-esp-2021r1/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\DRB\AppData\Local\Temp\arduino_build_305298\libraries\BluetoothSerial\BluetoothSerial.cpp.o: in function `.L0 ':
C:\Users\DRB\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\libraries\BluetoothSerial\src/BluetoothSerial.cpp:651: undefined reference to `esp_spp_deinit'
collect2.exe: error: ld returned 1 exit status
Using library BluetoothSerial at version 2.0.0 in folder: C:\Users\DRB\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\libraries\BluetoothSerial
exit status 1
Error compiling for board ESP32C3 Dev Module.
I have no idea what is causing this, other than it is a library problem. Any help here would be much appreciated. Maybe there is limited support for these ESP32-C3 modules in the Arduino IDE environment at this time.
I am wondering whether I should install the ESF-IDF suite and run this in a more conventional IDE where one can set breakpoints and debug code. I don't know how good the ESP-IDF is, but I really don't want to mess around as this project is rather urgent. I will need to drive a SDD1306 based OLED display and do an ADC conversion, so I suspect I should stay with the Arduino IDE due to its popularity and support. Any suggestion here would be welcomed in this regard too.
regards,
David
ESP32-C3 BLE Arduino compile problem
-
- Posts: 364
- Joined: Mon Jan 04, 2021 2:06 pm
Re: ESP32-C3 BLE Arduino compile problem
Hi,
ESP32-C3 has no support for Classic Bluetooth, only BLE. This library is for the Bluetooth Classic and that's why doesn't work for the ESP32-C3.
See BLE examples instead.
ESP32-C3 has no support for Classic Bluetooth, only BLE. This library is for the Bluetooth Classic and that's why doesn't work for the ESP32-C3.
See BLE examples instead.
Re: ESP32-C3 BLE Arduino compile problem
ESP-Minatel, I think you hit the nail on the head. THANKS for your reply!
I was confused because the Arduino IDE had listed under Examples -> Examples of ESP32C3 Dev Module -> BluetoothSerial -> SerialToSerialBT, which is incorrect as these functions won't work for the ESP32-C3.
My application is a 9-pin RS-232 (TX/RX only) converter to BLE (dongle), where data read from a machine and sent to a mobile phone, so the simple SerialToSerialBT would have been perfect. Now I'll need to go a bit deeper for BLE.
If I use the ESP32-S, then I could use Bluetooth classic, assuming all modern phones (Apple, Android) will use that. If I use the ESP32-C3, more programming and messing about but it is somewhat smaller.
- David
I was confused because the Arduino IDE had listed under Examples -> Examples of ESP32C3 Dev Module -> BluetoothSerial -> SerialToSerialBT, which is incorrect as these functions won't work for the ESP32-C3.
My application is a 9-pin RS-232 (TX/RX only) converter to BLE (dongle), where data read from a machine and sent to a mobile phone, so the simple SerialToSerialBT would have been perfect. Now I'll need to go a bit deeper for BLE.
If I use the ESP32-S, then I could use Bluetooth classic, assuming all modern phones (Apple, Android) will use that. If I use the ESP32-C3, more programming and messing about but it is somewhat smaller.
- David
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-C3 BLE Arduino compile problem
I have feeling you are mixing things. Here you are saying about BLE, but you want to use classic BT.
SerialToSerialBT is a classic BT example, just to be clear.
Re: ESP32-C3 BLE Arduino compile problem
Gents,
I have just spent the past 3 days (12 hour days) reading everything I could about BLE. Last Bluetooth project was a Bluegiga (now Silicon Labs) classic bluetooth device I did coding for about 7 years ago, so I was rusty.
Today I built a BLE tester using a Raspberry Pi and GATTTOOLs under Linux and it works a treat as a BLE analyser. Also used Kewlsoft's BLE Analyser on the phone which was not as good, as I could write scripts for testing with GATTTOOLs, for which I could easily get BLE_UART working on the ESP32-C3. I do not need Classic for this application.
Also, I got just over 50 meters range using a Samsung S8 before the signal dropped out - in a built up area outside. So I am pretty happy with that.
It appears the Arduino is quite basic as an IDE, but for this application it should be OK. There are MUCH better IDE's around. I probably could use the ESP-IF tool chain but could I be bothered if this does the job? Maybe next project.
Thank you all for your comments! I am going to relax now with a shot of Canadian Fireball Whisky.
cheers,
David
I have just spent the past 3 days (12 hour days) reading everything I could about BLE. Last Bluetooth project was a Bluegiga (now Silicon Labs) classic bluetooth device I did coding for about 7 years ago, so I was rusty.
Today I built a BLE tester using a Raspberry Pi and GATTTOOLs under Linux and it works a treat as a BLE analyser. Also used Kewlsoft's BLE Analyser on the phone which was not as good, as I could write scripts for testing with GATTTOOLs, for which I could easily get BLE_UART working on the ESP32-C3. I do not need Classic for this application.
Also, I got just over 50 meters range using a Samsung S8 before the signal dropped out - in a built up area outside. So I am pretty happy with that.
It appears the Arduino is quite basic as an IDE, but for this application it should be OK. There are MUCH better IDE's around. I probably could use the ESP-IF tool chain but could I be bothered if this does the job? Maybe next project.
Thank you all for your comments! I am going to relax now with a shot of Canadian Fireball Whisky.
cheers,
David
Who is online
Users browsing this forum: No registered users and 65 guests