LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2019, 11:33 AM   #1
intoto john
LQ Newbie
 
Registered: May 2019
Posts: 4

Rep: Reputation: Disabled
SOMEIP Communication between two devices


ugesh M <infotougesh@gmail.com>

18:23 (9 minutes ago)

to genivi-ipc
Hello Team,
I am trying to enable the communication between the two devices but there were some problems and not able to find the cause for the problem.

The below is the json file

Server Json:
cat server.json
{
"unicast" : "192.168.1.5",
"logging" :
{
"level" : "debug",
"console" : "true",
"file" : { "enable" : "false" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "service-sample",
"id" : "0x1277"
}
],
"servicegroups" :
[
{
"name" : "default",
"unicast" : "local",
"services" :
[
{
"service" : "0x1234",
"instance" : "0x5678",
"unreliable" : "31000"
}
]
}
],
"routing" : "service-sample",
"service-discovery" :
{
"enable" : "false",
"multicast" : "224.244.224.245",
"port" : "30490",
"protocol" : "udp"
}
}


Client Json:
{
"unicast" : "192.168.1.6",
"logging" :
{
"level" : "debug",
"console" : "true",
"file" : { "enable" : "false" },
"dlt" : "false"
},
"applications" :
[
{
"name" : "client-sample",
"id" : "0x1343"
}
],
"routing" : "client-sample",
"service-discovery" :
{
"enable" : "false",
"multicast" : "224.244.224.245",
"port" : "30490",
"protocol" : "udp"
}
}

client rount -n :
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.173.202.0 0.0.0.0 255.255.255.240 U 0 0 0 l2tpeth0.4b
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
224.224.224.245 0.0.0.0 255.255.255.255 UH 0 0 0 eth0.4


server side: route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.49.252.1 0.0.0.0 UG 0 0 0 eth0
10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 lxcbr0
10.49.252.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
224.224.224.245 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
224.224.224.245 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
224.224.224.245 0.0.0.0 255.255.255.255 UH 0 0 0 eth1.4

client side:

usr/bin/HelloWorldClient -
2019-05-08 15:49:25.969919 [info] Parsed vsomeip configuration in 3ms
2019-05-08 15:49:25.971119 [info] Using configuration file: "/data/vsomeip/client.json".
2019-05-08 15:49:25.971556 [info] Default configuration module loaded.
2019-05-08 15:49:25.972278 [info] Initializing vsomeip application "client-sample".
2019-05-08 15:49:25.973214 [warning] Routing Manager seems to be inactive. Taking over...
2019-05-08 15:49:25.973879 [info] SOME/IP client identifier configured. Using 0006 (was: 1343)
2019-05-08 15:49:25.974214 [info] Instantiating routing manager [Host].
2019-05-08 15:49:25.975149 [info] init_routing_endpoint Routing endpoint at /tmp/vsomeip-0
2019-05-08 15:49:25.976078 [info] Client [6] is connecting to [0] at /tmp/vsomeip-0
2019-05-08 15:49:25.976532 [info] Application(client-sample, 6) is initialized (11, 100).
2019-05-08 15:49:25.977357 [info] REQUEST(0006): [1234.5678:1.4294967295]
Checking availability!
2019-05-08 15:49:25.979883 [info] Starting vsomeip application "client-sample" using 2 threads
2019-05-08 15:49:25.981802 [info] Watchdog is disabled!
2019-05-08 15:49:25.983173 [info] io thread id from application: 0006 (client-sample) is: b5fcf440 TID: 19765
2019-05-08 15:49:25.984915 [info] shutdown thread id from application: 0006 (client-sample) is: b4dff440 TID: 19767
2019-05-08 15:49:25.985002 [info] vSomeIP 2.10.21 | (default)
2019-05-08 15:49:25.986610 [info] main dispatch thread id from application: 0006 (client-sample) is: b55ff440 TID: 19766
2019-05-08 15:49:25.987662 [info] io thread id from application: 0006 (client-sample) is: b3dff440 TID: 19769
2019-05-08 15:49:29.181675 [warning] Releasing client identifier 1343. Its corresponding application went offline while no routing manager was running.
2019-05-08 15:49:29.181846 [info] Application/Client 1343 is deregistering.
2019-05-08 15:49:35.986157 [info] vSomeIP 2.10.21 | (default)

server logs:
~/work/project/build/HelloWorldService
2019-05-10 18:17:13.093941 [info] Parsed vsomeip configuration in 0ms
2019-05-10 18:17:13.094044 [info] Using configuration file: "/etc/someiptest/server.json".
2019-05-10 18:17:13.094082 [info] Default configuration module loaded.
2019-05-10 18:17:13.094112 [info] Initializing vsomeip application "service-sample".
2019-05-10 18:17:13.094202 [warning] Routing Manager seems to be inactive. Taking over...
2019-05-10 18:17:13.094318 [info] SOME/IP client identifier configured. Using 0009 (was: 1277)
2019-05-10 18:17:13.094349 [info] Instantiating routing manager [Host].
2019-05-10 18:17:13.094430 [info] init_routing_endpoint Routing endpoint at /tmp/vsomeip-0
2019-05-10 18:17:13.094516 [info] Client [9] is connecting to [0] at /tmp/vsomeip-0
2019-05-10 18:17:13.094548 [info] Application(service-sample, 9) is initialized (11, 100).
2019-05-10 18:17:13.094723 [info] OFFER(0009): [1234.5678:1.0]
2019-05-10 18:17:13.094793 [info] Starting vsomeip application "service-sample" using 2 threads
Successfully Registered Service!
Waiting for calls... (Abort with CTRL+C)
2019-05-10 18:17:13.095071 [info] shutdown thread id from application: 0009 (service-sample) is: 7fe61a45a700 TID: 44524
2019-05-10 18:17:13.095095 [info] main dispatch thread id from application: 0009 (service-sample) is: 7fe61ac5b700 TID: 44523
2019-05-10 18:17:13.095132 [info] Watchdog is disabled!
2019-05-10 18:17:13.095250 [info] io thread id from application: 0009 (service-sample) is: 7fe6

server logs:
1b45c700 TID: 44522
2019-05-10 18:17:13.095296 [info] io thread id from application: 0009 (service-sample) is: 7fe619458700 TID: 44526
2019-05-10 18:17:13.095920 [info] vSomeIP 2.10.21 | (default)
2019-05-10 18:17:13.096073 [info] Network interface "eth1" state changed: up
2019-05-10 18:17:13.096112 [info] Service Discovery disabled. Using static routing information.
2019-05-10 18:17:13.096204 [info] SOME/IP routing ready.
2019-05-10 18:17:16.295199 [warning] Releasing client identifier 1277. Its corresponding application went offline while no routing manager was running.
2019-05-10 18:17:16.295263 [info] Application/Client 1277 is deregistering.
2019-05-10 18:17:23.096020 [info] vSomeIP 2.10.21 | (default)
2019-05-10 18:17:33.096145 [info] vSomeIP 2.10.21 | (default)
Waiting for calls... (Abort with CTRL+C)
2019-05-10 18:17:43.096256 [info] vSomeIP 2.10.21 | (default)
2019-05-10 18:17:53.096402 [info] vSomeIP 2.10.21 | (default)
2019-05-10 18:18:03.096579 [info] vSomeIP 2.10.21 | (default)
Waiting for calls... (Abort with CTRL+C)
2019-05-10 18:18:13.096691 [info] vSomeIP 2.10.21 | (default)
2019-05-10 18:18:23.096793 [info] vSomeIP 2.10.21 | (default)
2019-05-10 18:18:33.096969 [info] vSomeIP 2.10.21 | (default)
Waiting for calls... (Abort with CTRL+C)
2019-05-10 18:18:43.097113 [info] vSomeIP 2.10.21 | (default)

your support is pretty much appreciated.
 
Old 05-10-2019, 12:07 PM   #2
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by intoto john View Post

I am trying to enable the communication between the two devices but there were some problems and not able to find the cause for the problem.
Have you tested communication between two devices outside of your program (i.e. via telnet or netcat)?
And, please put the code and the log entries in CODE tags; otherwise it is too difficult to read.
 
1 members found this post helpful.
Old 05-10-2019, 01:26 PM   #3
intoto john
LQ Newbie
 
Registered: May 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
Have you tested communication between two devices outside of your program (i.e. via telnet or netcat)?
And, please put the code and the log entries in CODE tags; otherwise it is too difficult to read.
Yes, I have teseted the communication between the devices using ping. The ping is successful.
I followed the below links
https://at.projects.genivi.org/wiki/...pageId=5472320
https://at.projects.genivi.org/wiki/...pageId=5472320
 
Old 05-10-2019, 05:31 PM   #4
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by intoto john View Post
Yes, I have teseted the communication between the devices using ping. The ping is successful.
Well, is your application using ping for communicating? If not, then just ping is not a real rest.

In your JSON, I see:

Code:
"port" : "30490",
"protocol" : "udp"
So, let's say your client (let's say, 192.168.1.10) wants to communicate with your server (for example: 192.168.1.11), then you need to test exactly that with nc; for example, from client:

Code:
nc -vu <server_ip> <port>
Here "nc" is netcat command; "-v" is verbose; "u" is for UDP, since you have protocol udp defined in your JSON.

If it is successful, great; if not, there is a different problem, and until you fix that your program is not going to work.

Last edited by dc.901; 05-11-2019 at 09:17 AM. Reason: fixed typo
 
Old 05-13-2019, 05:36 AM   #5
intoto john
LQ Newbie
 
Registered: May 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
I have tried to fed the data to the port from the host(server side to client) but it returns. I hope it should be a blocking call and shall wait for input data.

Server side:

sudo route add -host 224.224.224.245 dev eth1
9:~$ nc -vu 192.168.1.6 30490 (return immediately )
9:~$ nc -vu 192.168.1.6 30490
9:~$

ifconfig :
eth1
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
 
Old 05-19-2019, 12:42 AM   #6
intoto john
LQ Newbie
 
Registered: May 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Tcpdump shows nothing
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CUPS HPLIP communication failures under -current causing communication errors. bamunds Slackware 10 09-24-2016 06:02 PM
Fault in KDE processes communication: Could not read network communication list Magnus Johansson MEPIS 0 03-30-2008 12:50 PM
Network Communication between two systems. ramaprasad.royal Linux - Networking 1 02-29-2008 12:52 AM
communication between two text files by c program hitesh.sharma84 Programming 2 05-04-2007 07:07 AM
How to perform communication between two kernel threads P.S.R.K.S.PRASAD Linux - Kernel 1 10-14-2006 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration