Module 12 · Lesson 38 of 114

The routing manager and comparing three layers

Trace local and remote vsomeip communication and compare the application code and deployment responsibilities of raw vsomeip, CommonAPI and ara-lite.

  • Beginner to advanced
  • 9 min read
  • 30 min lab
What you will need

Ubuntu 24.04 in WSL2 or a VM; the M8 project-studio middleware with its M12 vsomeip configuration and ara-lite adapter; routingmanagerd; Wireshark and two Ubuntu endpoints on a multicast-capable network for the remote capture

Your place in the module
By the end you can 4 objectives
  • Identify which process hosts the routing manager in the course deployment
  • Distinguish local service availability from a remote SOME/IP-SD announcement
  • Trace a typed ara-lite call through the M8 middleware to a provider
  • Compare payload encoding and deployment responsibilities across the three APIs
Video coming soonThe routing manager and comparing three layers
The video for this lesson is being recorded. Read the lesson below in the meantime.
Recall first from The ara-lite shim over vsomeip
  • vsomeip transports payload bytes while the shim encodes and decodes application values.
  • The client requests an event by event ID and subscribes using its eventgroup ID.
  • A provider-side shim can preserve the client contract when the deployment, payloads, and observable behavior remain compatible.
01

What the routing manager does

4 min read

The ara-lite shim reuses the M8 middleware. This lesson answers how the vsomeip routing daemon wires everything at runtime and how raw vsomeip, CommonAPI and ara-lite differ.

A provider and consumer can exchange a method request successfully on one Ubuntu machine while Wireshark shows no method packet on its Ethernet interface. Linux UNIX domain sockets carry data between processes on the same machine. An interface capture observes traffic on the chosen network interface. Together, these two facts explain how a working service can produce an empty method trace. The distinction is documented in the unix(7) and packet(7) references.

The lives in a process on each host in the two-host setup. With a dedicated daemon, set the top-level routing value in the host's vsomeip JSON to routingmanagerd, the application name of the daemon that the vsomeip build provides (the routingmanagerd executable creates its application with that name and exits with an error if the configuration does not make it the routing host). The provider and consumer have their own application names. Their configuration must agree with the daemon on the routing host and the local vsomeip network they use. The routing manager can also live inside a configured application. In the dedicated deployment, stopping a provider lets the routing daemon continue serving other applications.

Start the daemon with the course configuration for that host, then start the provider and consumer using their course configuration. The provider announces its service instance to the local runtime with offer_service. The consumer expresses interest with request_service. In a raw client, an availability callback lets the application know when the requested service becomes available. A typed client receives equivalent information through its own API. Starting the consumer before the provider lets you see the difference between starting a process and finding the requested service.

Compare what happens when the provider stops and what happens when the daemon stops. If the provider withdraws its offer, consumers lose that service instance while unrelated local services can continue. Stopping the configured routing daemon interrupts the shared routing function. A provider process and consumer process can still be present while their communication is unavailable. During startup diagnosis, establish whether each application has joined the runtime, then check for the requested service and instance. If the instance is available but the call fails, examine the method identifier, payload and provider handler.

Remote method requestConsumerConsumer hostrouterProvider hostrouterProviderLocal requestSOME/IPrequestLocal delivery1. Consumer → Consumer hostrouterLocal request2. Consumer host router →Provider host routerSOME/IP request3. Provider host router →ProviderLocal delivery
A remote request goes through the routing manager on each host and reaches the provider process.
Going deeperHow one manager handles multiple applications

The manager associates registered local applications with client identities and tracks the service instances they offer or request. A single local application can consume one service and provide another. Several consumers can request the same instance, and several providers can offer distinct instances. The manager uses service and instance information to resolve a request to the relevant local provider or remote endpoint. The reply is associated with the requesting client and its request session, so simultaneous calls to the same method can be distinguished.

On Linux, local vsomeip communication commonly uses UNIX domain sockets. Local applications register through the routing manager, and local data can travel directly between applications once the runtime has made the local destination known. Keep the manager in your explanation of registration and availability without assuming that every local payload goes through the daemon process.

With SOME/IP Service Discovery enabled, the routing manager's SD component handles discovery traffic for the host. It can advertise network-visible local offers and use received offers and their endpoint options to make remote services available to local consumers. Incoming remote requests arrive at a service transport endpoint and are delivered to the local provider through the runtime. The application-level method handler still runs in the provider process. For events, the runtime also tracks subscriptions by eventgroup so that notifications can reach the appropriate subscribers.

02

Observing service discovery on the network

4 min read

For a live network observation, put the provider and consumer on separate Ubuntu hosts or VMs attached to a network that carries multicast between them. Run the configured routing daemon on each host. Use the course SD settings on both sides, including the same discovery multicast group and UDP port, and use each host's own reachable unicast address. The provider's instance needs a configured service endpoint for its method traffic. That endpoint is separate from the SD endpoint. Ubuntu in a VM can make the capture easier to interpret because you can choose a virtual network shared by both guests. In WSL2, confirm that both endpoints can exchange the configured multicast traffic before using absence of discovery packets as evidence. ip(7) describes the Linux IPv4 socket behavior behind multicast group membership and interface selection.

Start Wireshark on the interface carrying traffic between the two hosts before you start the provider. Where Wireshark decodes the discovery traffic, use the display filter someipsd. If that view is empty, clear the display filter first, then look for UDP traffic using the SD port from your configuration. This distinguishes a packet visibility problem from a dissection problem. In the packet details, find an OfferService entry from the provider host. Match its service and instance identifiers to your configuration and read the advertised endpoint information. As the consumer starts, compare its availability notification with the discovery traffic captured on its host.

Evidence for a remote callMatch theofferservice,instanceandendpointCheckconsumer availabilityFind therequestservicetransportendpointMatch thereplyclient andsessionidentifiersMatch theofferservice,instanceandendpointCheckconsumer availabilityFind therequestservicetransportendpointMatch thereplyclient andsessionidentifiers
The discovery entry, the consumer's availability notification and the method traffic establish different facts.

A FindService entry is useful when you capture one, but a consumer can learn about an instance from an offer without an observed Find followed by an Offer. The capture may start after a Find, or the consumer may receive an offer without needing to send one. Use the matching offer as evidence that the provider host advertised the instance. Use the consumer's availability notification as evidence that its runtime recognised a matching instance. Finally, let the client make a method call and inspect the traffic on the advertised service endpoint. A display filter restricted to someipsd hides those ordinary method packets.

For the method exchange, look for the expected service and method IDs. Compare the request and reply using the client and session identifiers. The successful typed result is an additional observation. Even when a request and reply are visible, the consumer still needs to decode the returned payload according to its contract. If you observe an offer but no method traffic, check that the consumer actually issued the call and that you are viewing traffic for the service endpoint and its configured transport. If a request reaches the provider's host without a usable reply, compare the packet details with the provider's method handling and the consumer's result.

A clean withdrawal and an unexpected stop can look different. A stop offer carries a zero time to live. If the provider host disappears before it can advertise a withdrawal, discovery state on the receiver can instead expire when the advertised time to live runs out. Record when the consumer reports the service unavailable and which, if any, withdrawal appears in the capture. This matters when you compare an orderly provider shutdown with the loss of a host. On a fully local deployment, use the applications' availability and call results to diagnose local communication. Local IPC can succeed regardless of whether any discovery traffic is visible on your capture interface.

03

What changes across the three APIs

3 min read

Consider the same typed service operation in three implementations. Hold the service contract and host placement fixed while you compare how the consumer requests the operation, how the provider supplies a result, and where the mapping to bytes lives. The three APIs are alternative entry points for this example. CommonAPI and ara-lite each can use vsomeip underneath, and the course shim can use the M8 backend without going through CommonAPI.

Responsibilities across the three APIsRaw vsomeipCommonAPISOME/IPara-liteClient interfaceMessagesGeneratedproxyCourse proxyProviderinterfaceMessagehandlerGeneratedstubCourseskeletonPayload codecApplicationcodecGeneratedbindingM8 codecIdentifiermappingApplicationcodeSOME/IPdeploymentCourseadapterRouting runtimevsomeipvsomeipvsomeip viaM8
The API choice changes who owns the typed interface, payload codec and identifier mapping.

With raw vsomeip, the application works with the service, instance and method identifiers and registers message and availability handlers. It creates the request and supplies a payload. At the other end, the provider interprets the request bytes, runs its implementation and encodes the response bytes. vsomeip carries the payload and handles messaging and routing. The application or its codec owns the layout of the operation's arguments and result. This is the most direct interface for correlating application actions with a service ID, a method ID or payload bytes in a capture.

With CommonAPI C++ and its SOME/IP binding, application code calls a generated typed proxy and the provider implements the generated stub interface. The Franca interface defines the operation and data types. The SOME/IP deployment supplies binding information, including numeric identifiers, and the generated binding code and runtime handle serialization for the typed interface. The provider still implements the operation. vsomeip still has to be configured for the processes and their network endpoints. The generated C++ signature tells you how the client calls the operation. To explain which bytes and identifiers appear on the network, inspect the binding and deployment.

With ara-lite, build the typed interface in the course shim and use the M8 project-studio middleware as its backend. Give the consumer an ara::com-style proxy and discovery operation that returns a service handle. Give the provider a skeleton with an offer and withdrawal lifecycle and a typed method to implement. Keep the mapping from the course instance to the SOME/IP service and instance identifiers in the adapter or its deployment configuration. The proxy takes typed arguments, uses the M8 request and codec path, and completes the call with a typed result or a failure. The skeleton registers the corresponding M8 handler, decodes inputs, calls the provider implementation and returns the encoded result through M8. Keep transport failures and unavailable-service results visible at the typed boundary so that an application can distinguish those outcomes from a successful result. The shim mirrors the selected API shape for teaching. A production ara::com implementation has its own platform integration and specified behavior.

The API can hide numeric identifiers from business logic while leaving them essential at deployment. If all three variants use the same SOME/IP identifiers, compatible versions, suitable endpoint configuration and compatible payload layouts, the receiver can interpret the sender's call. Two proxies with similar C++ signatures can still emit different bytes. For example, CommonAPI's generated binding and a handwritten M8 codec must agree on the encoding for the same arguments and result before you substitute one endpoint for another. An offer can match and the method can arrive even when the receiver cannot parse its payload. Match the wire contract before using mixed endpoints to compare application APIs.

When a same-host ara-lite call works and the remote call fails, first compare runtime availability and endpoint evidence between the two deployments. A missing remote offer gives you a discovery question. An offer followed by a request with an unexpected method ID points to deployment mapping. A correctly addressed exchange followed by a decoding failure points to the payload contract. The typed API tells you how the application experiences the failure. The runtime observations tell you where to investigate it.

The next lesson, Execution management and machine states, asks how the system decides when to start or stop the processes whose communication you traced here.

Key takeaways

  • In the daemon deployment, routingmanagerd hosts the local routing manager and the provider runs the service implementation.
  • Same-host calls can succeed over local IPC without the method appearing in a network capture.
  • CommonAPI with its SOME/IP binding and the course ara-lite adapter both depend on vsomeip in the deployments discussed here.
  • Wire interoperability requires agreement on identifiers, versions, transport and payload encoding.
Reflect
  1. Explain to a colleague, in two sentences: identify which process hosts the routing manager in the course deployment
  2. Which objective are you least sure about? Re-read that section, then do its exercise in the practice pack.
  3. What surprised you when you ran the commands yourself?
On a real board

Repeat the key commands on your Raspberry Pi or lab board over SSH or the serial console. Note anything that behaves differently from your PC, such as missing tools, a BusyBox shell or a read-only filesystem.

References and further reading

Find your next step

↑ ↓ to move · Enter to open · Esc to close