-
Notifications
You must be signed in to change notification settings - Fork 176
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
Support for Thread #484
Support for Thread #484
Conversation
Also need to figure out if/what safe APIs are necessary so as to support the Thread Border Router case. |
Still WIP but un-drafting it to see the CI. |
a187ebc
to
8ba65ea
Compare
Hey, im currently trying out this branch, and noticed it dosn't compile out of the box, with the error that I'm not sure if im missing something, but i think theres a typo here. Where its "native_host_cfg" once and "host_native_cfg" the other time Line 243 in 9b09e0e
Lines 442 to 457 in 9b09e0e
|
I know this could be annoying, but if you could wait a day or so. |
Currently it breaks because - it seems - the ESP Border Router only builds fine after 5.2.X, where I'm trying to figure out X = ?. |
Yea no worries :) Thanks for the work! |
f864a88
to
cb546f1
Compare
OK so the PR is at a point, where it has two examples:
Both seem to do something - meaning - once started, they output gobs of logs from OpenThread. Whether they work as they should - this is what we need to find out. But if you are still interested, you could try the Border Router one. |
I've managed to setup a BR using the one provided by espressif and this branch to setup a node and i managed to successfully ping the node from my host device, so this seems to work so far :) Going to try using this for the BR aswell later. Some of the requests time out after a while, but i don't think this is related to this. But also not sure what would cause this, since the BR keeps being pingable during this time |
Hmmmm, no idea. I plan to test the Thread "Node" use-case with |
Im using two esp32c6 to not having to use the co-exist of wifi and thread, since its not recommended. So i don't think its this. if you manage to setup matter keep me updated :) |
I do have troubles getting the thread_br example to run tho.
I did setup the [[package.metadata.esp-idf-sys.extra_components]]
remote_component = { name = "espressif/mdns", version = "1.2" } to my cargo.toml |
Just do |
This sadly didn't fix it. Does it work when the project is within a workspace? |
I never tried from within a workspace to be honest. Where do you currently have this metadata? I'm very certain it does work in regular crates (as in, just tested yesterday). BTW, this long path:
... is really asking for trouble. |
Okey, the workspace was the problem... Yea ik about the path, but theres an option on windows to disable the PATH_MAX, which apparently works |
It doesn't but let's not go there... I'm super tired with the misinformation which is being spread out by users about this issue... |
Anyways. The BR now compiles and seems to run. co-exist seems to cause some issues tho. The device dosn't seem to be reachable, and does crash after a while maybe these Logs can give some more insight. I tried setting it up with UART but that was unsuccessfull aswell. Logs. let uart_config = UartConfig::new()
.baudrate(Hertz::from(460800))
.data_bits(DataBits8)
.parity_none()
.stop_bits(STOP1)
.flow_control(FlowControl::None)
.flow_control_rts_threshold(0)
.source_clock(SourceClock::default());
let mut thread = EspThread::new_br_uart(
peripherals.uart0,
peripherals.pins.gpio16,
peripherals.pins.gpio17,
&uart_config,
sys_loop,
nvs,
mounted_event_fs,
wifi.wifi().sta_netif(),
)?; |
It is crashing at the same place which is weird.
|
ESP-IDF v5.3
Its not consistent, earlier it crashed after like 10-15 seconds and now it just crashes on startup while trying to send the first IPv6 msg.
|
Hm can you add the stack increases of the additional esp idf tasks from here: |
Especially the system event loop stack increase seems important as the esp idf br example also has it: |
Okay, I'm officially 100% lost now. It's now working sometimes?? After completely erasing the flash and reflashing the binary, it works for about 30 seconds, then crashes. Upon restarting, it fails with ESP_ERR_TIMEOUT while trying to connect to Wi-Fi. The only way I've found to recover from this state is to fully erase the flash again and reflash it (EDIT: this also doesn't seem to be 100% reliable). Simply resetting via Ctrl + R in the monitor leads to one of two outcomes: either the Wi-Fi connects and then instantly crashes, or it times out during connection. EDIT: This seems random. Right now its just working with me changing absolutely nothing |
Let's call it a day. I will recheck at my end tomorrow. |
3ee634e
to
3fa92d7
Compare
I'm still not sure what is the reason for the crash with earlier ESP-IDF versions. |
Btw CI fails because latest nightly changed the formatting rules of |
a618f43
to
30bfc73
Compare
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.
Looks pretty good for an experimental first introduction. And it only come with this tiny little breaking change in NetifConfiguration/NetifStack so nothing to swat about.
Thanks!
Subject says it all.
This is initial and under the
experimental
feature, but once bugfixed, should be fairly complete, in that