-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add ESP-32 Wi-Fi and BLE driver #352
base: master
Are you sure you want to change the base?
Conversation
Is there an Mbed board that has an ESP32 on it? One of the Renesas ones it seems like? |
Both GR-LCYHEE and GR-PEACH. |
Might have to order one of those boards to run the wifi tests on it, unless you have one |
@chrissnow would you be able to take a look at these CI failures? Also could you confirm whether you have a board with this chip on it to test on? |
@multiplemonomials it build OK so I wonder whey it's failing, can mbed.h not be included here? I don't have a Renesas board, but do have various ESP32 dev boards, we have one attached to a STM32 for testing. I will tidy up and report back but it might be next week now. |
Yeah I think that things inside mbed os should include only the specific headers they need (e.g. NetworkInterface.h) rather than the top level mbed.h |
connectivity/drivers/wifi/COMPONENT_ESPRESSIF_ESP32/ESP32/ESP32.h
Outdated
Show resolved
Hide resolved
connectivity/drivers/wifi/COMPONENT_ESPRESSIF_ESP32/ESP32/ESP32.h
Outdated
Show resolved
Hide resolved
Not yet fully tested but issues should now be resolved. |
@@ -566,7 +566,7 @@ spif_bd_error SPIFBlockDevice::_spi_send_program_command(int prog_inst, const vo | |||
spif_bd_error SPIFBlockDevice::_spi_send_erase_command(int erase_inst, bd_addr_t addr, bd_size_t size) | |||
{ | |||
tr_debug("Erase Inst: 0x%xh, addr: %llu, size: %llu", erase_inst, addr, size); | |||
addr = (((int)addr) & 0xFFFFF000); | |||
//addr = (((int)addr) & 0xFFFFF000); |
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.
Wait, why are we changing this?
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.
That shouldn't be in there, need a separate PR for that.
@chrissnow thanks for your work on this! Could you take a look at the failing doc and style checks? It can't be merged until those are resolved. If you give me push access to your repo, I can take a look though! |
I'm still testing it and want to figure out the reset timing a bit more but it seems to be working fine. The driver doesn't check return codes enough and blindly continues which probably want looking at. |
@chrissnow Mr. Snow, have you tested auto-reconnect of ESP32 modules? I briefly tested it by powering cycle AP, ESP32 doesn't seem automatically reconnect at all, even with the following line added into the start up routine:
|
@zhiyong-ft good to hear someone else is interested in this :-) I haven't spent too much time testing this and certainly not auto reconnect. I do however know the current code doesn't work in non-blocking mode and I cant see an easy way to implement it given the AT response wont return until it's timed out. I'm also not sure how well auto reconnect is going to behave with the mbed stack, it could handle the unsolicited connected\disconnected messages but would need work I think. Help would be welcome on it :-) @multiplemonomials I don't think I can easily grant you write access to this repo\branch because there's a few branches we use for production. Would it let you submit a PR against it? |
To fix the style, just run For the docs check failures, it looks like there are just 5-10 function doc comment issues that need to be fixed. Let me know if you need help finding the issues! |
Summary of changes
Add Renesas ESP-32 driver which adds Wi-Fi and BLE support to any target with a serial port at very low cost
Impact of changes
Migration actions required
Documentation
TBC?
Pull request type
Test results