-
Notifications
You must be signed in to change notification settings - Fork 44
upgrade to Idf v5.3.2, added esp32c6 #70
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
Conversation
… is used. Also initial debug is also enable with debug build
ok let me know when you want me to test it! |
It still has issue with SSL connection, still troubleshooting, maybe certificate-related. Dan does mention it previously
|
testing BLE controller
- move SPIS definition to sketch.ino.cpp - max log level is info, debug will delay the initial boot causing reading CS incorrectly for BT and wifi mode (only available for 750ms)
fix c6 compile issue in release build type
I have move SPIS definition to sketch.ino.cpp to make parameterize pin easier. Tested WiFI & BT with both esp32 and esp32c6 both working well. Due to the different in BT HCI mode configuraation between esp32 and c6, 2 target specific config is added namely The only issue is GPIO0/9 for wifi data available (which I see we don't use much, but will still try to look at this). Except for this, @ladyada I think this is ready for tested. |
// Root certificate bundle provided by ESP-IDF. This available by default via ESP-iDF esp_crt_bundle_attach(), | ||
// but arduino-esp32 doesn't provide a way to invoke that default easily, so we declare these to use | ||
// the default bundle explicitly. | ||
extern const uint8_t x509_crt_imported_bundle_bin_start[] asm("_binary_x509_crt_bundle_start"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhalbert seems like we don't need to use combine.py to convert rootcert to binary + written it to NVS keys anymore ?
I (60) boot: Partition Table:
I (64) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (79) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (86) boot: 2 certs NVS keys 01 04 00010000 00020000
I (94) boot: 3 factory factory app 00 00 00030000 00180000
I (101) boot: 4 storage Unknown data 01 82 001b0000 00040000
I (109) boot: End of partition table
…ed as artifacts and release asseets
main/CommandHandler.cpp
Outdated
esp_netif_t *apNetif = get_esp_interface_netif(ESP_IF_WIFI_AP); | ||
|
||
if (staNetif != NULL && staNetif->lwip_input_fn != _staNetifInputHook) { | ||
CommandHandler.originalAPNetifInput = staNetif->lwip_input_fn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhalbert crash is due to typo, this should be original-staNetifInput
, I have renamed to make it easier to catch
…our hook as IRAM and also correct the context where handleWiFiReceive() is called
@ladyada @dhalbert wifi available with boot pin IO0 for esp32, IO9 for c6 is fixed and tested. The issue is mostly due to typo causing Null is called --> crash. I also notice that the hook is actually invoked in thread-context rather than isr as old sdk, therefore add a context check just to be safe. Also putting our hook into IRAM hoping to not slow down the lwip thing. It seems to work, screen shot with pulse captured by logic analyzer. So I guess this PR is 100% ready now :) |
whew i finally got through enough stuff to start testing this. initial test is good! i am uploading the debug bin and there's no MAC address (?) reported when using https://github.com/adafruit/WiFiNINA
|
update combine.py to take build folder and output filename run combine.py as postbuild
@ladyada yeah, I also got the MAC all zeroes, does not notice that before. Checking it out, I have update this PR to allow passing |
ok great, yeah i think if you can find the MAC address lookup fixed we can merge. (or let me know if its not possible to query the MAC) |
I think it is possible, we probably didn't get the correct function, I am checking it out. It has been awhile, trying to get back some memory for command handler :) |
just found out the root cause for mac address issue, the latest arduino-esp32 (which use idf 5.3.2 by this PR) required the interface (STA/AP) must be initialized before getting mac for example if we print mac after attempting to scan (which cause STA is enabled), or conect to an ssid, it will print out the mac just fine void loop() {
// scan for existing networks:
Serial.println("Scanning available networks...");
listNetworks();
byte mac[6];
WiFi.macAddress(mac);
Serial.print("MAC: ");
printMacAddress(mac);
delay(10000);
}
|
I tried to use efuse default mac addres in case the iterface is not up but it is not the same. They probably slight change the mac depending on the iterface in used (probably has more factors).
|
huh what if you run esptool read_mac command? |
sorry, I miss gh notification, seemns like esptool.py read_mac
esptool.py v4.8.1
Found 3 serial ports
Serial port /dev/ttyACM2
Connecting...
Detecting chip type... ESP32-C6
Chip is ESP32-C6FH4 (QFN32) (revision v0.1)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:ff:fe:59:7b:30
BASE MAC: 40:4c:ca:59:7b:30
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
MAC: 40:4c:ca:ff:fe:59:7b:30
BASE MAC: 40:4c:ca:59:7b:30
MAC_EXT: ff:fe
Hard resetting via RTS pin... |
found it PS: PR to add fruitjam + c6 pinout to WiFiNINA adafruit/WiFiNINA#13 (also refactor to move pin config to its own file to make it easier to update) |
thanks, ill test later this week, when i get the new hardware! |
C6 seems to work well, I guess we can merge this now. Any issues can be fixed in follow-up PR. @ladyada let me know if you also want to make the release or wait a bit more. |
yes lets do a release now, cc @brentru |
based on @dhalbert WIP https://github.com/dhalbert/nina-fw/tree/idf-5.x
This PR update idf to v5.3.2 and added esp32c6. What have done:
Need to do