mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'support/openthread_upstream_update' into 'master'
openthread: update openthread upstream See merge request espressif/esp-idf!22559
This commit is contained in:
commit
10864e353a
@ -59,6 +59,7 @@ if(CONFIG_OPENTHREAD_ENABLED)
|
|||||||
list(APPEND exclude_srcs
|
list(APPEND exclude_srcs
|
||||||
"openthread/examples/apps/ncp/main.c"
|
"openthread/examples/apps/ncp/main.c"
|
||||||
"openthread/src/core/api/backbone_router_api.cpp"
|
"openthread/src/core/api/backbone_router_api.cpp"
|
||||||
|
"openthread/src/core/api/child_supervision_api.cpp"
|
||||||
"openthread/src/core/api/dataset_api.cpp"
|
"openthread/src/core/api/dataset_api.cpp"
|
||||||
"openthread/src/core/api/dns_api.cpp"
|
"openthread/src/core/api/dns_api.cpp"
|
||||||
"openthread/src/core/api/entropy_api.cpp"
|
"openthread/src/core/api/entropy_api.cpp"
|
||||||
@ -86,6 +87,7 @@ if(CONFIG_OPENTHREAD_ENABLED)
|
|||||||
"openthread/src/core/thread/announce_begin_server.cpp"
|
"openthread/src/core/thread/announce_begin_server.cpp"
|
||||||
"openthread/src/core/thread/announce_sender.cpp"
|
"openthread/src/core/thread/announce_sender.cpp"
|
||||||
"openthread/src/core/thread/address_resolver.cpp"
|
"openthread/src/core/thread/address_resolver.cpp"
|
||||||
|
"openthread/src/core/thread/child_supervision.cpp"
|
||||||
"openthread/src/core/thread/discover_scanner.cpp"
|
"openthread/src/core/thread/discover_scanner.cpp"
|
||||||
"openthread/src/core/thread/energy_scan_server.cpp"
|
"openthread/src/core/thread/energy_scan_server.cpp"
|
||||||
"openthread/src/core/thread/key_manager.cpp"
|
"openthread/src/core/thread/key_manager.cpp"
|
||||||
|
@ -130,6 +130,13 @@ menu "OpenThread"
|
|||||||
Select this option to enable SRP Client in OpenThread. This allows a device to register SRP services to SRP
|
Select this option to enable SRP Client in OpenThread. This allows a device to register SRP services to SRP
|
||||||
Server.
|
Server.
|
||||||
|
|
||||||
|
config OPENTHREAD_DNS_CLIENT
|
||||||
|
bool "Enable DNS Client"
|
||||||
|
depends on OPENTHREAD_ENABLED
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Select this option to enable DNS Client in OpenThread.
|
||||||
|
|
||||||
config OPENTHREAD_BORDER_ROUTER
|
config OPENTHREAD_BORDER_ROUTER
|
||||||
bool "Enable Border Router"
|
bool "Enable Border Router"
|
||||||
depends on OPENTHREAD_ENABLED
|
depends on OPENTHREAD_ENABLED
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 19e18753c1ca97ffc68566f4852444f341e0319c
|
Subproject commit 091f68ed706ce7a4831802408cdd0b0b4f309e3b
|
@ -241,7 +241,7 @@ void otPlatRadioSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKe
|
|||||||
|
|
||||||
void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter)
|
void otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter)
|
||||||
{
|
{
|
||||||
SuccessOrDie(s_radio.SetMacFrameCounter(aMacFrameCounter));
|
SuccessOrDie(s_radio.SetMacFrameCounter(aMacFrameCounter, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_DIAG_ENABLE
|
#if OPENTHREAD_CONFIG_DIAG_ENABLE
|
||||||
|
@ -213,6 +213,9 @@
|
|||||||
#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 1
|
#define OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // CONFIG_OPENTHREAD_BORDER_ROUTER
|
||||||
|
|
||||||
|
#if !CONFIG_OPENTHREAD_RADIO_NATIVE
|
||||||
/**
|
/**
|
||||||
* @def OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT
|
* @def OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT
|
||||||
*
|
*
|
||||||
@ -224,7 +227,19 @@
|
|||||||
#define OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT 1
|
#define OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // CONFIG_OPENTHREAD_BORDER_ROUTER
|
/**
|
||||||
|
* @def OPENTHREAD_POSIX_CONFIG_RCP_TIME_SYNC_INTERVAL
|
||||||
|
*
|
||||||
|
* This setting configures the interval (in units of microseconds) for host-rcp
|
||||||
|
* time sync. The host will recalculate the time offset between host and RCP
|
||||||
|
* every interval.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#ifndef OPENTHREAD_POSIX_CONFIG_RCP_TIME_SYNC_INTERVAL
|
||||||
|
#define OPENTHREAD_POSIX_CONFIG_RCP_TIME_SYNC_INTERVAL (60 * 1000 * 1000)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
* @def OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
|
||||||
@ -234,16 +249,6 @@
|
|||||||
*/
|
*/
|
||||||
#define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 1
|
#define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 1
|
||||||
|
|
||||||
/**
|
|
||||||
* @def OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
|
||||||
*
|
|
||||||
* Define to 1 to enable Child Supervision support.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE
|
|
||||||
#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
|
* @def OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE
|
||||||
*
|
*
|
||||||
@ -264,16 +269,6 @@
|
|||||||
#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 1
|
#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* @def OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
|
|
||||||
*
|
|
||||||
* Define to 1 to enable DNS Client support.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
|
|
||||||
#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def OPENTHREAD_CONFIG_NCP_SPI_ENABLE
|
* @def OPENTHREAD_CONFIG_NCP_SPI_ENABLE
|
||||||
*
|
*
|
||||||
@ -431,4 +426,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
|
||||||
|
*
|
||||||
|
* Define to 1 to enable DNS Client support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE CONFIG_OPENTHREAD_DNS_CLIENT
|
||||||
|
|
||||||
#define OPENTHREAD_FTD 1
|
#define OPENTHREAD_FTD 1
|
||||||
|
@ -230,4 +230,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @def OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE
|
||||||
|
*
|
||||||
|
* Define to 1 to enable DNS Client support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE CONFIG_OPENTHREAD_DNS_CLIENT
|
||||||
|
|
||||||
#define OPENTHREAD_MTD 1
|
#define OPENTHREAD_MTD 1
|
||||||
|
@ -147,8 +147,7 @@ def get_linklocal_addr(dut:IdfDut) -> str:
|
|||||||
def get_global_unicast_addr(dut:IdfDut, br:IdfDut) -> str:
|
def get_global_unicast_addr(dut:IdfDut, br:IdfDut) -> str:
|
||||||
dut_adress = ''
|
dut_adress = ''
|
||||||
clean_buffer(br)
|
clean_buffer(br)
|
||||||
br.write('br omrprefix')
|
omrprefix = get_omrprefix(br)
|
||||||
omrprefix = br.expect(r'\n((?:\w+:){4}):/\d+\r', timeout=5)[1].decode()
|
|
||||||
clean_buffer(dut)
|
clean_buffer(dut)
|
||||||
dut.write('ipaddr')
|
dut.write('ipaddr')
|
||||||
dut_adress = dut.expect(r'(%s(?:\w+:){3}\w+)\r' % str(omrprefix), timeout=5)[1].decode()
|
dut_adress = dut.expect(r'(%s(?:\w+:){3}\w+)\r' % str(omrprefix), timeout=5)[1].decode()
|
||||||
@ -231,8 +230,7 @@ def clean_buffer(dut:IdfDut) -> None:
|
|||||||
def check_if_host_receive_ra(br:IdfDut) -> bool:
|
def check_if_host_receive_ra(br:IdfDut) -> bool:
|
||||||
interface_name = get_host_interface_name()
|
interface_name = get_host_interface_name()
|
||||||
clean_buffer(br)
|
clean_buffer(br)
|
||||||
br.write('br omrprefix')
|
omrprefix = get_omrprefix(br)
|
||||||
omrprefix = br.expect(r'\n((?:\w+:){4}):/\d+\r', timeout=5)[1].decode()
|
|
||||||
command = 'ip -6 route | grep ' + str(interface_name)
|
command = 'ip -6 route | grep ' + str(interface_name)
|
||||||
out_str = subprocess.getoutput(command)
|
out_str = subprocess.getoutput(command)
|
||||||
print('br omrprefix: ', str(omrprefix))
|
print('br omrprefix: ', str(omrprefix))
|
||||||
@ -448,12 +446,11 @@ def create_host_tcp_server(mytcp:tcp_parameter) -> None:
|
|||||||
|
|
||||||
def get_ipv6_from_ipv4(ipv4_address:str, br:IdfDut) -> str:
|
def get_ipv6_from_ipv4(ipv4_address:str, br:IdfDut) -> str:
|
||||||
clean_buffer(br)
|
clean_buffer(br)
|
||||||
br.write('br nat64prefix')
|
nat64prefix = get_nat64prefix(br)
|
||||||
omrprefix = br.expect(r'\n((?:\w+:){6}):/\d+', timeout=5)[1].decode()
|
|
||||||
ipv4_find = re.findall(r'\d+', ipv4_address)
|
ipv4_find = re.findall(r'\d+', ipv4_address)
|
||||||
ipv6_16_1 = decimal_to_hex(ipv4_find[0]) + decimal_to_hex(ipv4_find[1])
|
ipv6_16_1 = decimal_to_hex(ipv4_find[0]) + decimal_to_hex(ipv4_find[1])
|
||||||
ipv6_16_2 = decimal_to_hex(ipv4_find[2]) + decimal_to_hex(ipv4_find[3])
|
ipv6_16_2 = decimal_to_hex(ipv4_find[2]) + decimal_to_hex(ipv4_find[3])
|
||||||
ipv6_get_from_ipv4 = omrprefix + ':' + ipv6_16_1 + ':' + ipv6_16_2
|
ipv6_get_from_ipv4 = nat64prefix + ':' + ipv6_16_1 + ':' + ipv6_16_2
|
||||||
return str(ipv6_get_from_ipv4)
|
return str(ipv6_get_from_ipv4)
|
||||||
|
|
||||||
|
|
||||||
@ -461,3 +458,15 @@ def decimal_to_hex(decimal_str:str) -> str:
|
|||||||
decimal_int = int(decimal_str)
|
decimal_int = int(decimal_str)
|
||||||
hex_str = hex(decimal_int)[2:]
|
hex_str = hex(decimal_int)[2:]
|
||||||
return hex_str
|
return hex_str
|
||||||
|
|
||||||
|
|
||||||
|
def get_omrprefix(br:IdfDut) -> str:
|
||||||
|
br.write('br omrprefix')
|
||||||
|
omrprefix = br.expect(r'Local: ((?:\w+:){4}):/\d+\r', timeout=5)[1].decode()
|
||||||
|
return str(omrprefix)
|
||||||
|
|
||||||
|
|
||||||
|
def get_nat64prefix(br:IdfDut) -> str:
|
||||||
|
br.write('br nat64prefix')
|
||||||
|
nat64prefix = br.expect(r'Local: ((?:\w+:){6}):/\d+', timeout=5)[1].decode()
|
||||||
|
return str(nat64prefix)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user