device-to-device communication #20
-
Hello, thanks to your project, I have a chance to study about 'Adaptive AUTOSAR'. What I'm curious about in this project is how two devices can be configured and communicated. Socket communication has confirmed that communication between the two devices is possible. However, there was no multicast by "Service Discovery" between the two devices. When I uploaded and tested the project on each of the two devices, I found through "tcpdump" that only locally forwarded messages were received in the "Search for Services" section, which consists of multicast. Could you tell me how to fix this and communicate between the two devices? Also, if you look at "SdNetworkLayer," you can see that the Extended Vehicle and Diagnostic Manager has duplicate servers and clients. I wonder why you wrote the structure like this. The code attached below is the code I wrote to check if communication is possible. Same code except where socket communication is added.
That's about it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi! Happy to see you dived that deep to the project! Regarding your question about using the multicast communication for SD, maybe Regarding the communication between two devices, I can refer to the same interaction between ExtendedVehicle and DM. After SD, DM parses the offer packet to extract the interaction endpoint (which is Regarding your question about Regarding your code, at the first glance I cannot see where sendto(sock, message2, strlen(message2), 0, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); You can check this link as an example for UDP communication on Linux. |
Beta Was this translation helpful? Give feedback.
Hi! Happy to see you dived that deep to the project!
Regarding your question about using the multicast communication for SD, maybe
tcpdump
did not subscribe to239.0.0.1
multicast group. Because the SOME/IP SD server offers the service (in this case ExtendedVehicle AA) to239.0.0.1
group via loopback NIC (127.0.0.1) at5555 UDP
port. The SOME/IP SD client at Diagnostic Manager (DM) side subscribes to the239.0.0.1
group and waits for the offer. If DM does not receive the offer, it will reportPrefailed
which is not happening in my test. So, it means the SD is working fine (at least on my setup) over multicast.Regarding the communication between two devices, I can refer to the same intera…