-
Notifications
You must be signed in to change notification settings - Fork 8.6k
drivers: wifi: esp-hosted: Add support for the latest firmware. #103154
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
base: main
Are you sure you want to change the base?
drivers: wifi: esp-hosted: Add support for the latest firmware. #103154
Conversation
8ea205c to
693bdfb
Compare
| config WIFI_ESP_HOSTED_LEGACY | ||
| bool "Support legacy (<= v0.0.5) firmware" |
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.
this should in my option come from the devicetree
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.
Note it's not just a runtime option, the option changes which protocol file gets used.
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.
And in zephyr the devicetree is also constant, unlike to linux.
you could for example use
https://docs.zephyrproject.org/latest/build/kconfig/preprocessor-functions.html
$(dt_compat_all_has_prop,<compatible string>,<prop>[,<value>])
$(dt_compat_any_has_prop,<compatible string>,<prop>[,<value>])
to access a value from the dt.
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.
But can I check in CMakeLists.txt? That's where the protocol file is switched. I guess it's possible, but other than that, any good reason for that? I mean the config option is working perfectly fine, and it's been tested with both old/new firmware.
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.
But can I check in CMakeLists.txt?
yes
The point is, that the devicetree should contain all necessary information about the hardware. The right way would be to have two different compatibles, as both versions are not compatible with each other.
btw you can still use a Kconfig as a intermediate, that is set by the dt.
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.
see https://docs.zephyrproject.org/latest/build/dts/dt-vs-kconfig.html
The software version of esp-hosted on the remote esp32 would be considered a hardware property.
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.
Okay, let me give it a try.
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.
The software version of esp-hosted on the remote esp32 would be considered a hardware property.
I'm honestly not sure, I think it's a gray area, but I don't mind changing it.
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.
Updated. I think this is what you meant.
8732c7e to
8f68d01
Compare
Rename legacy esp-hosted protobuf protocol file, and add the latest protocol. Signed-off-by: Ibrahim Abdalkader <[email protected]>
Add support for esp-hosted v1.0.0.0.0 firmware. Signed-off-by: Ibrahim Abdalkader <[email protected]>
Use legacy esp-hosted firmware protocol. Signed-off-by: Ibrahim Abdalkader <[email protected]>
8f68d01 to
7d258d0
Compare
|



The latest stable ESP-hosted firmware (v1.0.0.0.0) is no longer backward compatible with Zephyr's host driver. The main breaking change is the
ConnectAPresponse changing from a synchronous response to an asynchronous event. This is a good change and it's in line with other requests, but it breaks backward compatibility.This PR adds support for the latest firmware while maintaining support for the legacy firmware (v0.0.5) shipped with some boards, via a config option. Moving forward, if ESP ever releases an update, the host driver in Zephyr should by default support the latest firmware.
Note: The latest firmware also introduces new features, such as set/get country code, band argument in requests and responses, uid for frames and some additional events. This PR does not attempt to support every new feature, but just the base functionality.