-
Notifications
You must be signed in to change notification settings - Fork 95
Smoltcp 0.9 upgrade #124
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
Smoltcp 0.9 upgrade #124
Conversation
- Merge the Network and Wifi structs into WifiStack - Get it building & running with just TCP socket for now
7f1369d
to
cc4fb43
Compare
Thanks a lot - this looks very good! Also, good you replaced that Code looks fine but I have no idea why the re-format changed so much - I thought I always do a format 🤷♂️ When testing I found a few things (which I cannot mark in the diff)
A couple of "unused warning: unused `Result` that must be used
--> esp-wifi\src\esp_now\mod.rs:490:9
|
490 | / queue.enqueue(ReceivedData {
491 | | len: slice.len() as u8,
492 | | data: data,
493 | | info,
494 | | });
| |__________^
|
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default
warning: unused `Result` that must be used
--> esp-wifi\src\ble\npl.rs:1229:9
|
1229 | / queue.enqueue(ReceivedPacket {
1230 | | len: (len + 3) as u8,
1231 | | data,
1232 | | });
| |__________^
|
= note: this `Result` may be an `Err` variant, which should be handled
warning: unused `Result` that must be used
--> esp-wifi\src\ble\npl.rs:1250:9
|
1250 | / queue.enqueue(ReceivedPacket {
1251 | | len: (len + 1) as u8,
1252 | | data,
1253 | | });
| |__________^
| But a real problem is, the |
I imagine this was silently failing, as the bool from enqueue was not checked, so I guess its good we now check it :D.
Thanks! This got lost in the refactor. I forgot to mention in the top level PR, but |
2aedf13
to
897f75d
Compare
This might be because I format with nightly, maybe there are changes in the way it formats in newer versions? 🤔 |
Yes, I think it was like that - I think that old |
Now the static_ip example crashes with
I think we lost this (storage for ip_addr and also multicast_storage) https://github.com/esp-rs/esp-wifi/blob/5c66d0e15577c1f5d7b909701e2874ea71d02eb2/esp-wifi/src/wifi/utils.rs#L21-L23 Probably multicasts also won't work because of this anymore but we don't have an example for it, currently I haven't seen how this is done in 0.9.x now 🤷♂️ |
897f75d
to
2c71a17
Compare
2c71a17
to
aa632f3
Compare
Okay, now it should work - I actually tested it properly now :D. In smoltcp 0.9 there are defaults: https://github.com/smoltcp-rs/smoltcp/blob/9027825c16c9c3fbadb7663e56d64b590fc95d5a/src/lib.rs#L141 so multicast should still work. |
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.
Thanks for taking care of this
* switch to heapless for SimpleQueue * Merge Network into WifiStack - Merge the Network and Wifi structs into WifiStack - Get it building & running with just TCP socket for now * get dhcp example building with changes and no warnings * fixup error checking * Fix other examples * fmt * Remove redundant comment * fix unused results * bump BT_INTERNAL_QUEUE to 10 * add back static ip configuration in work()
Was a bigger job than I first anticipated 😅.
smoltcp::Device
changesNetwork
andWifi
to createWifiStack
Closes #123