Can someone help to explain the command "unsecureport" is?

17 views
Skip to first unread message

Yejiang Luo

unread,
Jan 13, 2022, 11:16:39 PM1/13/22
to openthread-users
When I set the unsecureport, I can see the 'J' flag by scan command in other Node.
```
> scan
| J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
+---+------------------+------------------+------+------------------+----+-----+-----+
| 1 | OpenThread-6637  | 39ca6551ae5273d2 | 6637 | 6a9c3ee4332fc07d | 23 | -20 | 255 |
| 0 | OpenThread-25cd  | 90d043d38ca241d3 | 25cd | 7230d5fbcb98a38c | 24 | -79 |  60 |
Done
```
The following code is about the 'J' flag, is it?
```
bool Mac::IsJoinable(void) const
{
    uint8_t numUnsecurePorts;

    Get<Ip6::Filter>().GetUnsecurePorts(numUnsecurePorts);

    return (numUnsecurePorts != 0);
}

if (IsJoinable())
{
    beaconPayload->SetJoiningPermitted();
}
else
{
    beaconPayload->ClearJoiningPermitted();
}
```
Even if I don't set the  unsecureport, I can join the Thread network by NetworkKey or Commissioner, isn't it?
I want to know what is the scenario of unsecureport? 
Can anybody help me? Thanks!

Jonathan Hui

unread,
Jan 13, 2022, 11:22:05 PM1/13/22
to Yejiang Luo, openthread-users
Thread Commissioning requires a Joiner to communicate with a neighboring Joiner Router using UDP/IPv6 messages that are not secured at the link layer. Of course, the Joiner has no way to enable link layer security because it does not yet have the Thread credentials. At the same time, Thread devices attached to a network typically only accept traffic that is secured at the link layer. When a Commissioner is active on the Thread network, it instructs the Thread devices to open an unsecure port to enable Thread Commissioning.

--
Jonathan Hui



--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/7234290e-47e0-4d2a-bdc5-f889f579407an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages