-
Notifications
You must be signed in to change notification settings - Fork 168
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
Modem split cfg issue #227
Comments
@dragazo But if you don't have |
Hmm, I take my words back: the docu says that this option enables "software" coexistence, implying that by default these can coexist, based on hardware (how/if this works reliably I don't know). So yeah, I can remove this option for you if it makes life easier for you. |
@ivmarkov Well I'm actually ok with keeping the cfg if it's unclear in the docs if it's ok to have both, but I'm not sure why the method wasn't enabled even when i did set that option in my My bypass for this issue isn't bad by any means, so this isn't a huge issue. It basically just means i have to drop the modem object (for my own sanity) and instantiate wifi directly with the unsafe constructor. My only gripe is that that line is the only unsafe code in my entire project lol |
If you don't want to use wifi and BT simultaneously, why are you trying to split the
This I somehow highly doubt, as every other option configured so far in |
@ivmarkov Is there just some magic trait that lets it be used as an instance of I know the |
if you look here https://github.com/esp-rs/esp-idf-svc/blob/master/src/wifi.rs#L1015 EspWifi is just a thin wrapper around WifiDriver that does convenience stuff for you. If you look at the signature of WifiDriver https://github.com/esp-rs/esp-idf-svc/blob/master/src/wifi.rs#L333 you can see it takes the modem as a Peripheral here . To look how it than does the "some magic" have a look here were Wifi and BT got mapped to that https://github.com/esp-rs/esp-idf-hal/blob/master/src/modem.rs |
I really don't think there is anything more than a misunderstanding here. If you believe otherwise - reopen this bug and clarify. |
I'm getting an instance of
Modem
fromPeripherals::take
, but can't split it to access theWifiModem
. It looks like there's aModem::split
method, but it's protected by a cfg onesp_idf_esp32_wifi_sw_coexist_enable
. My first issue is that even withCONFIG_ESP_COEX_SW_COEXIST_ENABLE=y
in mysdkconfig.defaults
file, this doesn't enable the method, even with a fresh compile. But more importantly, do we even need this part of the cfg at all?Modem::split
takesself
by value, so it could just directly returnself.1
andself.2
by value. Simply moving a normal Rust object that already exists should require no special cfg considerations. So it seems like a simple#[cfg(not(esp32s2))]
would suffice and fix my issue. The same would apply forModem::split_ref
.The text was updated successfully, but these errors were encountered: