pkg/openthread: add FTD-MTD-NCP tests#7149
Conversation
|
It's a WIP PR because NCP does not work anymore and I've discovered a bug in our port of OpenThread. The problem is still linked with otTasklets.
By putting So I don't really know where to add |
|
@biboc could you try something like: When otTasklestsProcess was in the beginning of the while loop, it was executed each time a msg arrived. I'm not sure if adding a flag resolves the issue, but I would give it a try. Cheers |
|
Something like this should do like POSIX example does: But still it does not work as expected |
5d7d66c to
e7cdab8
Compare
|
My last edits work great! This is the right way to implement otTask. |
b5fc78f to
e4a877f
Compare
|
Works better now! |
|
Hi @biboc. For some reason I'm have 2 leader nodes with the openthread_ftd example. I'm investigating what might cause that. I will do some NCP tests as well. |
|
@biboc the scan is working. But, as said before, there's something wrong with the core. That could be related to the "form" problem. Cheers |
|
@biboc after some attempts, 2 ftd nodes are working ok. I will test it on Iot-LAB Cheers |
|
@biboc just discovered something strange: There are some commands I'm unable to execute with the OpenThread CLI. Have you had this behavior before? |
|
To change the panid you need to "thread stop" before |
|
Your test is great help, thanks |
|
I upgraded OpenThread to the last version. |
|
The problem here is the change in OpenThread API, instead of using So I need to pass the ACK frame as mentioned here: Is it clearer? @jia200x |
|
We've fixed UART problem for NCP with buffering the current frame before giving it to OpenThread, it works great! Now I would like @jia200x to have a look at the |
|
hi @biboc. Your buffering solution is very smart! Congratz. Concerning the ACK part, IMHO I would enable OPENTHREAD_CONFIG_LEGACY_TRANSMIT_DONE and use the otPlatRadioTransmitDone, until we find another solution. There's no way to retrieve the ACK from the driver with Auto ACK. Also, passing Ack=NULL may have side effects. Cheers! |
|
Yes they use it only for |
|
So it's not the ACK itself, but the LQI or RSSI of the ACK that you need? |
|
@gebart, it might be only for this yes but since we can still use old function I'll vote to use old function and not "hack" the function by filling only receiving power and even this I'm not sure power is updated when an ACK is received. |
|
@kaspar030, small correction for the title: pkt -> pkg. |
thx! |
pkg/openthread: fix bit alignment error of uart driver
|
This EDBG issue is still happening after the fix: That's whatI get when I ping. If I modify the packet size, it works |
|
I'm pretty sure is a Flow Control issue, as seen here. In that case, the fix is not related to this PR. |
|
Are you OK in splitting this PR in FTD/MTD support and NCP?
Also, merging the FTD part can speed up the adoption to other radios, and improve the OpenThread port. Comments? |
|
BTW splitting this PR should be fast. All NCP parts are marked via |
|
I agree :) Let’s split and merge this! |
|
@jia200x, just in case, This is what you mean right? https://github.com/openthread/openthread/releases/tag/thread-reference-20170716 |
@Hyungsin, exactly! The tag name is confusing but the version is from last November. Is this version ok for you ? |
|
@jia200x, sure. |
|
@Hyungsin @aabadie it's quite confusing, since I checked this is the last commit of OpenThread (July 2017). However, I still tend to think it's good to keep the Thread Reference implementation (it will be easier for certification, etc). The current code doesn't run with that version (function prototypes changed) but it's not a big deal to make it work again. There are some features that are not present in the old version (specially CLI) but most important features are there (MTD, SED, Border Router support, etc). @Hyungsin do you have out of your head any features we might miss with the release? In any case, I'm pretty sure there will come another Release and we will need this PR. |
|
I think we don't have to worry about features at this time, which can be added in future PRs. So if you can work on re-prototyping, please go ahead and let it merged :) After this PR, may be you can keep working on NCP and I can reflect the features I have added so far, including re-re-prototyping. Given that the current NCP works with small packets, can we also merge the current NCP part with the comments about the limitation? |
|
Any update here? |
|
@jia200x. Cool!! Thanks! |
|
#9336 was merged. So I guess this can be closed. |
|
it still has some code to be ported (NCP, etc), but closing it won't hurt anyone :) |
|
Then I archive it. |
This
WIPPR implements OpenThread Full Thread Device (FTD), Minimal Thread Device (MTD) and Network Co-Processor (NCP) in RIOT.FTD is a Thread device with routing-capability.
MTD does not have routing capability.
NCP is able to communicate with wpantund on a linux machine by UART.