On 15/09/17 18:51, Stuart Longland wrote:
> On 15/09/17 18:31, Stuart Longland wrote:
>> A second problem I'm having is that `wpantund` seems to want to join the
>> mesh as an end-device. I need it to join as a router. I see in
>> `wpanctl get` there's:
>>
>>> Network:NodeType = "end-device"
>> but if I try to change that, it tells me:
>>> wpanctl:wpan0> set Network:NodeType router
>>> set failed with error 16. PropertyNotFound
>>> Error 16 (0x10)
>> Resetting again, doesn't help. It's stuck in end-device mode. How does
>> one force a NCP to become a router?
>
> For reference, these are the ./configure settings I use:
>
> $ …/openthread/configure --host=arm-none-eabi
> --prefix=/home/stuartl/vrt/projects/widesky/hub/hal/build/ncp-lib
> --with-platform-info=WIDESKYHUBNCP --disable-docs --enable-ncp-app=ftd
> --with-ncp-bus=uart --disable-raw-link-api --enable-tmf-proxy
> --enable-border-router --enable-joiner
>
> This worked last time I built NCP firmware.
>
Okay, so this morning, I had a look at the OpenThread commit logs and
saw this…
> commit 36f4f43adc55ef3ed411001915fd10d078c15721
> Author: Abtin Keshavarzian <
abt...@google.com>
> Date: Mon Aug 28 21:16:38 2017 -0700
>
> [ncp-uart] fix the bug in uart encoder (#2145)
>
> This commit fixes an issue with the `NcpUart::EncodeAndSendToUart()`
> code where the last message can be removed from `mTxFrameBuffer`
> and if we ran out of buffer and cannot finalize the HDLC encoded
> frame, the final bytes would not be sent until next message is
> queued in `mTxBuffer`.
I wondered if this might be related to my issue, and so figured I'd try
building a firmware image based on this.
Re-building the NCP firmware based on the current OpenThread master
code, I now find I cannot form a mesh with the NCP:
> Sep 18 09:52:18 wsg-74fe481fe117 otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:52:18 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: [-NCP-]: NCP was reset (STATUS_RESET_POWER_ON, 112)
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: State change: "offline" -> "uninitialized"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: [-NCP-]: NCP was reset (STATUS_RESET_POWER_ON, 112)
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: State change: "offline" -> "uninitialized"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:18 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property IPv6:MeshLocalAddress changed.
> Sep 18 09:52:18 wsg-74fe481fe117 otbr-agent[937]: NCP property IPv6:MeshLocalAddress changed.
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: State change: "uninitialized" -> "offline"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: State change: "uninitialized" -> "offline"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: NCP is running "OPENTHREAD/0.01.00; CC2538; Sep 15 2017 15:17:11"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: Driver is running "0.08.00d (/038e8b0; Sep 15 2017 00:12:23)"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: NCP is running "OPENTHREAD/0.01.00; CC2538; Sep 15 2017 15:17:11"
> Sep 18 09:52:18 wsg-74fe481fe117 wpantund[486]: wpantund[486]: Driver is running "0.08.00d (/038e8b0; Sep 15 2017 00:12:23)"
> Sep 18 09:52:18 wsg-74fe481fe117 otbr-agent[937]: NCP property NCP:Channel changed.
> Sep 18 09:52:18 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property NCP:Channel changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:PANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:PANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property NCP:MACAddress changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property NCP:MACAddress changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:Name changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:Name changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:XPANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:XPANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property IPv6:LinkLocalAddress changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property IPv6:LinkLocalAddress changed.
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: Network is not joinable
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: Network is not joinable
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: Resetting interface(s). . .
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: Finished initializing NCP
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: Resetting interface(s). . .
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: ../util/netif-mgmt.c:530: Requirement Failed ((ret) == 0)
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: Finished initializing NCP
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property NCP:State changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property NCP:State changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:KeyIndex changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:KeyIndex changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:PANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:PANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:XPANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:XPANID changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property IPv6:MeshLocalAddress changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property IPv6:MeshLocalAddress changed.
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: State change: "offline" -> "associating"
> Sep 18 09:52:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: State change: "offline" -> "associating"
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property NCP:State changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property NCP:State changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property NCP:Channel changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property NCP:Channel changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Network:Name changed.
> Sep 18 09:52:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Network:Name changed.
> Sep 18 09:53:19 wsg-74fe481fe117 otWeb[489]: reply is NULL; error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
> Sep 18 09:53:19 wsg-74fe481fe117 otWeb[489]: reply error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
> Sep 18 09:53:19 wsg-74fe481fe117 otWeb[489]: wpan service error: 9
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-web[489]: otWeb[489]: reply is NULL; error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-web[489]: otWeb[489]: reply error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-web[489]: otWeb[489]: wpan service error: 9
> Sep 18 09:53:19 wsg-74fe481fe117 wpantund[486]: SpinelNCPTaskForm.cpp:404: Requirement Failed (ncp_state_is_associated(mInstance->get_ncp_state()))
> Sep 18 09:53:19 wsg-74fe481fe117 wpantund[486]: Form failed: 1
> Sep 18 09:53:19 wsg-74fe481fe117 wpantund[486]: State change: "associating" -> "offline"
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-agent[937]: NCP property NCP:State changed.
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.
> Sep 18 09:53:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: SpinelNCPTaskForm.cpp:404: Requirement Failed (ncp_state_is_associated(mInstance->get_ncp_state()))
> Sep 18 09:53:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: Form failed: 1
> Sep 18 09:53:19 wsg-74fe481fe117 wpantund[486]: wpantund[486]: State change: "associating" -> "offline"
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property NCP:State changed.
> Sep 18 09:53:19 wsg-74fe481fe117 otbr-agent[937]: otbr-agent[937]: NCP property Daemon:ReadyForHostSleep changed.