motamman - Esp32-c6 Arduino support, in a manne...
Esp32-c6 Arduino support, in a manner.
https://github.com/pioarduino/platform-espressif32
Looks like platformio and espressif have gone separate ways on this chip.
Before I jump in, does this mean that sensesp will work with Arduino and esp32-c6 variants?
9 Replies
Yeah. Good timing. 😄 See this: https://github.com/SignalK/SensESP/pull/801. I just created the PR but I've been working on it for some days now.
GitHub
Pioarduino support by mairas · Pull Request #801 · SignalK/SensESP
Support building with Pioarduino (ESP-IDF 5.3 and Arduino 3), either using the Arduino framework or as "Arduino as ESP-IDF component".
I haven't tested with -C6 yet but -C3 builds work, and I was able to get NMEA 2000 working with -C3, too.
ESP32-C6 support should be a matter of just editing the platformio.ini file.
I finally got around to testing it last night, and yes, works fine with the C6. (I didn't test sensesp. I just converted a couple of Arduino projects that use my own libraries.)
I will dive into sensesp this weekend, I hope. I am particularly interested in your nmea 2000 work.
OK, great. I just merged the pioarduino PR, so support should now be present in the repo main branch (not the released version yet). There's an example platformio.ini file in
examples/platformio.ini
. (Doh!) You can use for example the SensESP project template, but to use pioarduino, replace the ini file with the one mentioned above.
The ini file doesn't have support for C6 yet but adding it is quite trivial. You can find supported boards on this list: https://docs.platformio.org/en/latest/boards/index.html#espressif-32
To use NMEA 2000 with any module other than the original ESP32, use this driver instead of the ttlappalainen/NMEA2000_esp32 one: https://github.com/skarlsson/NMEA2000_twai.Since I have your ear. I am struggling with an issue that seems related to the C6 integration and maybe you have some ideas. In Arduino, I have a library that grabs some initializing json and html for my sensors. I ported that library to platformio and it compiles as expected, regardless of the chip (I am also using the S3.)
Using platformio, with the c6, however, it will not resolve the domain name but will work the ip address.
On the S3, it works exactly as expected.
Here is the error:
E (7515) OPENTHREAD: esp_openthread_task_switching_lock_acquire(38): Failed to acquire the lock because the mutex is not ready
E (7515) OPENTHREAD: esp_openthread_task_switching_lock_release(46): Failed to release the lock because the mutex is not ready
E (7526) OT_DNS64: Cannot find NAT64 prefix
[ 7225][E][NetworkManager.cpp:136] hostByName(): DNS Failed for 'mizzen.zennora.sv' with error '-54'
NB: the DNS is mosdef resolving the domain and i also tested with 8.8.8.8. I am not using thread and don't plan to, at least for now.
Here is a distilled version of offending function:
bool ZennoraCore::initializeSystemConfig(InitializationStatus& status) {
const char* configPath = "/config/systemConfig.json";
const char* remoteUrl = "http://<path to file>/systemConfig.json";
if (loadSystemConfig()) {
status.systemConfigLoaded = true;
return true;
}
Serial.println("System config not found locally. Attempting to fetch from remote server...");
if (fetchAndSaveSystemConfig(remoteUrl, configPath)) {
status.systemConfigFetched = true;
// Try loading the newly saved config
if (loadSystemConfig()) {
status.systemConfigLoaded = true;
return true;
} else {
Serial.println("Failed to load system config after fetching.");
}
} else {
Serial.println("Failed to fetch system config from remote server.");
}
return false;
}
Any ideas?
Pax,
Mo
The error message related to DNS64 and NAT64 sounds like you might be running IPv6 on that device? Could that be the case?
Do you get any log messages when you're connecting to network? If you only get an IPv6 address and NAT64 fails, DNS wouldn't be able to resolve an IPv4-only address.
Disclaimer: I only know anything about DNS64 and NAT64 because I googled for them after reading your message. So, not exactly much.
I think it is a bug in the C6 implention of wifi. And it's more of an issue than I thought. Nothing resolves,. I can't hit the mqtt broker or any other local hostnames. Everything needs to be ip based. If I use wifi with anything other than an IP address it kcks that error.
I agree that is probably an IPv6 issue but I i don't know enough yet to dive in.
Can you just disable IPv6 in your code?
not so far. still exploring
This is outta my league. I can't figure it out. I posted an issue on git.