设置:
- vsomeip 3.3.8
- 两台Xenomai机器(Debian 11)通过网络交换机连接
- 两台设备上的“镜像服务”。在节点1上提供服务4433.2211并请求服务1234.5678。Node 2则相反。
观察结果:
- 使用IPv4地址运行应用程序会产生预期的行为。两个应用程序交换数据。
- 使用IPv6地址和停用的服务发现以及相应客户端的硬编码IPv6地址运行相同的应用程序成功运行。这表明我的机器能够使用IPv6进行通信。
*问题:使用主动服务发现(没有服务的硬编码单播地址),两个应用程序之间没有通信(注意:Wireshark显示服务发现通信) - 我注意到Wireshark显示了一条ICMPv6消息,上面写着“Multicast Address Record Changed to exclude:ff0e::1”。这是我不明白的,因为我没有要求排除地址。
提问
有人知道为什么节点不通信吗?IPv6有什么特别需要设置的吗?
- 在我看来,它应该在C++应用程序之外的某个地方。它应该与我的Xenomai网络设置有关。或者JSON配置文件
附录:node 1的json配置文件和日志
我的node 1json文件:
{
"unicast" : "4242::1",
"logging" :
{
"level" : "trace",
"console" : "true",
"file" : { "enable" : "true", "path" : "/usr/cppPlayground/requestResponse2DevicesIpv6/node1.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "request-response",
"id" : "0x1"
}
],
"services" :
[
{
"service" : "0x4433",
"instance" : "0x2211",
"unreliable" : "30510"
}
],
"routing" : "request-response",
"service-discovery" :
{
"enable" : "true",
"multicast" : "ff0e::1",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "10",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}
我的node 2json文件:
{
"unicast" : "4242::2",
"logging" :
{
"level" : "trace",
"console" : "true",
"file" : { "enable" : "true", "path" : "/usr/CppPlayground/requestResponseMirrored2DevicesIpv6/node2.log" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "request-response-mirrored",
"id" : "0x9"
}
],
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unreliable" : "30509"
}
],
"routing" : "request-response-mirrored",
"service-discovery" :
{
"enable" : "true",
"multicast" : "ff0e::1",
"port" : "30490",
"protocol" : "udp",
"initial_delay_min" : "10",
"initial_delay_max" : "100",
"repetitions_base_delay" : "200",
"repetitions_max" : "10",
"ttl" : "3",
"cyclic_offer_delay" : "2000",
"request_response_delay" : "1500"
}
}
节点1的日志文件(在节点2之后启动):
2023-09-15 15:35:21.279421 [info] Using configuration file: "vsomeip-local_IPv6.json".
2023-09-15 15:35:21.281261 [info] Parsed vsomeip configuration in 2ms
2023-09-15 15:35:21.281666 [info] Configuration module loaded.
2023-09-15 15:35:21.282017 [info] Initializing vsomeip (3.3.8) application "request-response".
2023-09-15 15:35:21.282568 [info] Instantiating routing manager [Host].
2023-09-15 15:35:21.283269 [info] create_routing_root: Routing root @ /tmp/vsomeip-0
2023-09-15 15:35:21.283987 [info] Service Discovery enabled. Trying to load module.
2023-09-15 15:35:21.285998 [info] Service Discovery module loaded.
2023-09-15 15:35:21.286556 [info] Application(request-response, 0001) is initialized (11, 100).
2023-09-15 15:35:21.287161 [info] Starting vsomeip application "request-response" (0001) using 2 threads I/O nice 255
2023-09-15 15:35:21.287993 [info] Client [0001] routes unicast:4242::1, prefix:24
2023-09-15 15:35:21.287908 [info] main dispatch thread id from application: 0001 (request-response) is: 7f6d7edde700 TID: 1378
2023-09-15 15:35:21.288016 [info] shutdown thread id from application: 0001 (request-response) is: 7f6d7e5dd700 TID: 1379
2023-09-15 15:35:21.289400 [info] Watchdog is disabled!
2023-09-15 15:35:21.290087 [info] REQUEST(0001): [1234.5678:255.4294967295]
2023-09-15 15:35:21.290180 [info] io thread id from application: 0001 (request-response) is: 7f6d7d5db700 TID: 1381
2023-09-15 15:35:21.290169 [info] io thread id from application: 0001 (request-response) is: 7f6d7fedcec0 TID: 1375
2023-09-15 15:35:21.290694 [info] create_local_server: Listening @ /tmp/vsomeip-1
2023-09-15 15:35:21.292821 [info] OFFER(0001): [4433.2211:0.0] (true)
2023-09-15 15:35:21.293393 [info] vSomeIP 3.3.8 | (default)
2023-09-15 15:35:21.293815 [info] Network interface "eno1" state changed: up
2023-09-15 15:35:21.294766 [info] Route "ff00::/8 if: eno1 gw: n/a" state changed: up
2023-09-15 15:35:21.295200 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490
2023-09-15 15:35:21.295432 [debug] **Joining to multicast group ff0e::1 from 4242::1**
2023-09-15 15:35:21.295805 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30510
2023-09-15 15:35:21.295976 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490
2023-09-15 15:35:21.296000 [info] SOME/IP routing ready.
2023-09-15 15:35:22.293609 [info] OFFER(0001): [4433.2211:0.0] (true)
2023-09-15 15:35:22.294419 [warning] routing_manager_impl::handle_local_offer_service: Application: 0001 is offering: [4433.2211.0.0] offered previously by itself.
2023-09-15 15:35:23.294958 [info] OFFER(0001): [4433.2211:0.0] (true)
2023-09-15 15:35:23.295723 [warning] routing_manager_impl::handle_local_offer_service: Application: 0001 is offering: [4433.2211.0.0] offered previously by itself.
*[... all the same as the two messages before...]*
2023-09-15 15:35:29.039199 [info] STOP OFFER(0001): [4433.2211:0.0] (true)
2023-09-15 15:35:29.039906 [info] RELEASE(0001): [1234.5678]
2023-09-15 15:35:30.304243 [info] Stopping vsomeip application "request-response" (0001).
我为IPv6做了类似的步骤,就像我为IPv4做的一样。
1.将多播地址路由到以太网设备:sudo ip -6 route add ff0e::1 dev eno1
1.在两个节点上启动相应的应用程序:env VSOMIP_CONFIGURATION...
这样,我期待与IPv4相同的行为。当然,我尝试了很多与网络配置相关的其他东西,但与上述方法没有什么不同。
1条答案
按热度按时间ctzwtxfj1#
这是vsomeip 3.3.8中的一个bug。它不支持IPv6的服务发现。一个pull-request是在一段时间前打开的。不幸的是,当我搜索相关关键字时,github搜索并没有突出显示pull-request。