-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Support for ESP32-C6 #642
Comments
I wish this were possible but it is sadly not. Support for C6 and H2 is hindered by the way the Arduino core is configured when the bluetooth libs are built as bluedroid is enabled there and the new IDF version uses the same symbols now for the controller interface and conflicts when linked. The only way to support these 2 chips is either by using esp-idf and Arduino as a component (recommended) or using the Arduino lib builder to disable bluedroid and nimble, controller only config. |
Hmm, i lied... kinda. Here is a branch that compiles, no idea if it will work, probably not due to mixing of functions but give it a go and let me know. |
Thank you for development of the C6 branch !
Compilation of
Duplicate of |
That's odd, it seemed to link fine with the latest Arduino commit in platformio. |
To reproduce, please, use official Arduino CLI as follows
|
Actually I modified platformio to be able to build from the latest commit on master branch. Thanks though, I'll try that and see if I can reproduce. |
Reproduced and fixed, please do a reset --hard on the branch and try again. I'm not expecting it to work but worth a shot. Sadly I do not have one of these devices to test on. |
Thank you so much !
Sure! It enters into boot loop soon after
Will try to decode the backtrace later.... |
lol, not surprised at all. Mixing code is what's happening here. The real fix for this will be to rename A LOT of functions and hope that's enough. |
I've just pushed an update that renames all the conflicting symbols. Please do a |
A little bit different PC and SP, but the fault is of the same type
|
Thanks,that's too bad. Definitely need a backtrace to progress. I'll try to get my hands on a board to test with soon. |
My ESP32-C6 board does not have USB/JTAG (GPIO12/13) pins exposed, so capturing a backtrace with assistance of OpenOCD will be problematic for a while... I found out that ESP32-C3 build of the same sketch ( NimBLE_Client.ino ) with Arduino Core 3.0.0-alpha3 does also produce a binary that fails to boot properly.
So if you have ESP32-C3 readily available - you can try it first Use the following CLI instruction to build for C3:
|
Interesting, thanks! Looks like the queue is not initialized for these boards... I'll look into that |
@lyusupov,I just pushed a few commits to this, seems to work for me 😄 |
Thank you! Yes, it looks good to me as well, both with ESP32-C3 and ESP32-C6:
I suppose that your recent development efforts are sufficient to consider this GitHub ticket as 'complete'. If me or someone else will face up with another ESP32-C6 NimBLE issue - we should open a new ticket. |
Sounds good, thanks! Going to need to test this for some time before merging into master. |
Hello @h2zero , please accept my apology in advance for asking this in this thread, but I need some guidance/direction. I have a DFRobot ESP32-C6 board, which I would like to use to send sensor data over BLE to a mobile application. Let me give you a short background.. I do my hardest to learn and figure out things myself, (where possible), but Im certainly still a novice when it comes to coding. As you can see, I might have complete gone off in the wrong direction. If this is something that you could help me with, I would be grateful and if there is another way we could communicate, other than me spamming this thread, please let me know. Thank you!! |
Hello @NeilvdM, good for you for trying to sort this out and learn. You've gone in the right direction, it's just a little steeper of a learning curve 😄 The C6 is not able to be supported with this repo, but instead esp-nimble-cpp needs to be used, which means you will need to use esp-idf and Arduino as a component of that to get the Arduino interfaces. Or alternatively we can use a for of the Arduino core that @Jason2866 has created for use in platformio. I would suggest starting with the core that tasmota uses: https://github.com/Jason2866/platform-espressif32 follow the readme to setup the environment. Let me know how you get on with that and I'll try to help further. |
That was where I ended up before contacting you. Working in Platform.io is all greek to me, (at least it feels that way at the moment), with Arduino IDE Im at least familiar with, but Im sure the 2 basically works the same. So I followed the instructions, created a new project and added
Then I got an error about not having an environment, so looking at other sketches, I tried by changing it to:
this ran with no errors, except "UserSideException: Please install Git client from https://git-scm.com/downloads" I tried coping some sketch examples from Arduino and compile them in Platform.io, but got parsing errors I'll be completely honest, from here Im in the dark, I have no idea which direction to go, at least in Arduino I feel like I have a candlelight and can guide myself, bumping my head ever so often. I have a question (one of 100's :) ) ... Could I not just use the iBeacon sketch as my base, then after many searches figure out to replace the number sequence it is broadcasting, with the readings from the sensors? if you have another way that I can contact you, that would be great. |
You're getting close 🙂! As for your question, yes you could use that ibeacon example and work from there, that will use the default BLE library in the official arduino core. This library is designed to be a lighter weight and more capable/stable replacement for that. What you should do depends on your needs. |
obviously, the lighter weight and stability will be important for me .. so then what you are telling me is that I need to learn VSCode. Then that brings me to these points:
is this correct? Then start playing with the example sketches? Would you be willing to share an email address that I can contact you on? (thats if you dont mind) THANK YOU FOR THE INFO YOU HAVE SHARED SO FAR |
You'll certainly need to learn to use VScode and platformio for this, you'll be glad you did later 😄 This is what you need:
Then you can use the examples from here, you might have to add I prefer to keep the communication here so others can benefit. |
ok, so to see if I can get the basics working, I configured my ini file as such:
Then in the main.ccp I followed your beginner example to create a BLE server
But this is the error that Im getting now:
At this rate, it feels like Im never gonna get any where |
@NeilvdM I suggest you consider the pioarduino fork which I have nicely working with NImble-Arduino master here start here: espressif/arduino-esp32#10039 - maybe check the discord channel |
you are joking with this right? :) I just opened that page and its like Senior Varsity stuff, that is like throwing me at the bottom of the Mariana Trench and say, "alright, there you go, swim to the top" .. lol But In any case, Ill check out the other links you suggested. Thanks |
@NeilvdM Sorry for the delay, it looks like you have some issue with the folder arrangement, I will email you. |
I made an example. It is for the esp32 for the esp32-c6 it should work too. With only replacing the board against a c6 one. Change line |
I've re-opened this ticket due to high message traffic. |
I would also love to have a working solution for this. +1 |
i am sorry but I am a little bit confused. Is it a chance now to use nimBLE with arduino framework and esp-c6? (not arduino as an idf-component). I've tried to compile the release 1.4.2 , using: platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip |
It is not currently possible to use the C6 with this library and Arduino core. |
Currently working on making it easier to compile Arduino projects with IDF using Platformio. So I suggest to try your project with Arduino/espidf, with the platform above. |
The same is for the ESP32-H2, and the Android 3.1.0RC1 🥺 |
ESP32-C6 support is available in Arduino Core ESP32 since version 3.x-alpha
An attempt to build the
NimBLE_Client.ino
sketch from NimBLE-1.4.1 'examples' area witharduino-cli
for a ESP32-C6 devkit target gives a failure:The text was updated successfully, but these errors were encountered: