The problem is, although setting the logging level to trace there is almost no useful output that could point me to the actual issue. It would be helpful to get something like Could not connect to socket ... or something like that. It would be really helpful to have a guide like CommonAPI SomeIP for Dummies (:grin:). So this issue is not just particular to my problem but also the occasion for providing a thorough introductory guide that is a low burden for new developers. CommonAPI provides a high level of abstraction and ease of use but the complex deployment makes it little bit harder. :wink:
So some of my questions are:
Why there is the possibility to provide the port settings and unicast address in the deployment file when it is not used in the generated code (at least I cannot see any reference to it)?
What exactly is the matter of the service discovery? How exactly does it work?
The 10 minutes SomeIP guide says that the services field is not necessary on the client side. But in the user guide they are providing an example that explicitly list the services and provide a unicast address. Why (service discovery)?
Does the application id matter or can I randomly choose an identifier? As far as I understood they must be unique across the whole network. This means I must know all my clients in advance?
If you need further logging output I can provide it.
Logging output from the client:
[CAPI][DEBUG] Adding proxy mapping: local:Callbacks:v1_0:test --> libCallbacksProxy.so
[CAPI][DEBUG] Adding proxy mapping: local:Request:v1_0:test --> libRequestProxy.so
[CAPI][INFO] Loading configuration file '/etc/commonapi-client.ini'
[CAPI][INFO] Using default binding 'someip'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][DEBUG] Loading library for local:Request:v1_0:test proxy.
[CAPI][DEBUG] Added address mapping: local:Callbacks:v1_0:test <--> [001e.0028(0.0)]
[CAPI][DEBUG] Added address mapping: local:Request:v1_0:test <--> [000a.0014(0.0)]
[CAPI][VERBOSE] Registering function for creating "Request:v1_0" proxy.
[CAPI][DEBUG] Loading interface library "libRequestProxy.so" succeeded.
[CAPI][VERBOSE] Creating proxy for "local:Request:v1_0:test"
[info] Parsed vsomeip configuration in 0ms
[info] Using configuration file: "/etc/someip_config.json".
[info] Configuration module loaded.
[info] Initializing vsomeip application "Client".
[info] Instantiating routing manager [Host].
[info] create_local_server Routing endpoint at /tmp/vsomeip-0
[info] Service Discovery enabled. Trying to load module.
[info] Service Discovery module loaded.
[info] Application(Client, 2000) is initialized (11, 100).
[info] Starting vsomeip application "Client" (2000) using 2 threads I/O nice 255
[info] main dispatch thread id from application: 2000 (Client) is: 7ff446ffd700 TID: 32450
[info] shutdown thread id from application: 2000 (Client) is: 7ff4467fc700 TID: 32451
[info] REQUEST(2000): [000a.0014:0.4294967295]
[info] Watchdog is disabled!
[info] io thread id from application: 2000 (Client) is: 7ff4477fe700 TID: 32449
[info] io thread id from application: 2000 (Client) is: 7ff4457fa700 TID: 32453
[info] Listening at /tmp/vsomeip-2000
Checking availability of the service...
[info] vSomeIP 3.1.20.3 | (default)
[info] Network interface "eno2" state changed: up
[info] Route "224.224.224.245/32 if: eno2 gw: n/a" state changed: up
[info] udp_server_endpoint_impl: SO_RCVBUF is: 212992
[debug] Joining to multicast group 224.224.224.245 from 192.168.1.8
[info] udp_server_endpoint_impl: SO_RCVBUF (Multicast) is: 212992
[info] SOME/IP routing ready.
[info] vSomeIP 3.1.20.3 | (default)
[info] Stopping vsomeip application "Client" (2000).
Logging output from the server:
[CAPI][INFO] Loading configuration file '/data/commonapi-server.ini'
[CAPI][INFO] Using default binding 'someip'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][DEBUG] Loading library for local:Request:v1_0:test stub.
[CAPI][DEBUG] Added address mapping: local:Callbacks:v1_0:test <--> [001e.0028(0.0)]
[CAPI][DEBUG] Added address mapping: local:Request:v1_0:test <--> [000a.0014(0.0)]
[CAPI][DEBUG] Added address mapping: local:Request:v1_0:Request <--> [000a.0014(1.0)]
[CAPI][INFO] Registering function for creating "Request:v1_0" stub adapter.
[CAPI][DEBUG] Loading interface library "librequest-stub.so" succeeded.
[CAPI][INFO] Registering stub for "local:Request:v1_0:test"
[info] Parsed vsomeip configuration in 7ms
[info] Using configuration file: "/data/someip_config.json".
[info] Configuration module loaded.
[info] Initializing vsomeip application "serverapp".
[info] Instantiating routing manager [Host].
[info] create_local_server Routing endpoint at /tmp/vsomeip-0
[info] Service Discovery enabled. Trying to load module.
[info] Service Discovery module loaded.
[info] Application(serverapp, 1000) is initialized (11, 100).
[info] OFFER(1000): [000a.0014:0.0] (true)
[info] Listening at /tmp/vsomeip-1000
[CAPI][DEBUG] Loading library for local:Callbacks:v1_0:test stub.
[info] Starting vsomeip application "serverapp" (1000) using 2 threads I/O nice 255
[info] Watchdog is disabled!
[info] io thread id from application: 1000 (serverapp) is: abfc7450 TID: 3787
[info] vSomeIP 3.1.20.3 | (default)
[info] main dispatch thread id from application: 1000 (serverapp) is: b03ac450 TID: 3788
[info] shutdown thread id from application: 1000 (serverapp) is: b1bcd450 TID: 3789
[info] io thread id from application: 1000 (serverapp) is: ab7a9450 TID: 3791
[CAPI][DEBUG] Added address mapping: local:Callbacks:v1_0:Callbacks <--> [001e.0028(1.0)]
[CAPI][[info] Network interface "bridge0" state changed: up
[error] netlink_connector::receive_cbk received error message: 2 seq 3
[CAPI][INFO] Registering function for creating "Callbacks:v1_0" stub adapter.
[CAPI][DEBUG] Loading interface library "libcallbacks-stub.so" succeeded.
[CAPI][INFO] Registering stub for "local:Callbacks:v1_0:test"
As it can be seen in the logging output there isn't much going on, but I am seeing that there is a REQUEST on the client side and an OFFER on the server side. So something is happening. But no connection attempt. What looks suspicious to me is that the client requests the SomeIP address 000a.0014:0.4294967295 whereas the server offers the address 000a.0014:0.0 which indicates that the minor version is different. Can this be a problem here?
Help is really appreciated :wink: I don't know how to proceed :sweat_smile:
I am trying to connect to a CommonAPI Service that is running on an embedded device.
I am basically following the guide SomeIP in 10 minutes, but also tried several settings from the SomeIP User Guide without any success.
The SomeIP configuration at the client side (Linux Host) is similar to the following:
The SomeIP configuration at the service side (Linux Embedded Device) is similar to the following:
The problem is, although setting the logging level to
trace
there is almost no useful output that could point me to the actual issue. It would be helpful to get something likeCould not connect to socket ...
or something like that. It would be really helpful to have a guide likeCommonAPI SomeIP for Dummies
(:grin:). So this issue is not just particular to my problem but also the occasion for providing a thorough introductory guide that is a low burden for new developers. CommonAPI provides a high level of abstraction and ease of use but the complex deployment makes it little bit harder. :wink:So some of my questions are:
services
field is not necessary on the client side. But in the user guide they are providing an example that explicitly list the services and provide a unicast address. Why (service discovery)?If you need further logging output I can provide it.
Logging output from the client:
Logging output from the server:
As it can be seen in the logging output there isn't much going on, but I am seeing that there is a
REQUEST
on the client side and anOFFER
on the server side. So something is happening. But no connection attempt. What looks suspicious to me is that the client requests the SomeIP address000a.0014:0.4294967295
whereas the server offers the address000a.0014:0.0
which indicates that the minor version is different. Can this be a problem here?Help is really appreciated :wink: I don't know how to proceed :sweat_smile: