AllJoyn框架版本15.09.00a用于在Linux平台上构建bbservice和bbclient应用程序,用于执行以下测试。
如果使用以下命令在同一个Linux设备上运行bbservice和bbclient
bbservice -n com.test &
bbclient -n com.test -d -c 5 &则bbclient可以成功ping通bbservice 5次。
下面是此测试的输出。
bbservice -n com.test &
AllJoyn Library version: v15.09.00
AllJoyn Library build info: AllJoyn Library v15.09.00 (Built Mon Feb 29 22:13:06 UTC 2016)
opts.transports = 0x105
bbservice com.test ready to accept connections
bbclient -n com.test -d -c 5 &
AllJoyn Library version: v15.09.00
AllJoyn Library build info: AllJoyn Library v15.09.00 (Built Mon Feb 29 22:13:06 UTC 2016)
FindAdvertisedName 0x100 takes 54 ms
FoundAdvertisedName(name=com.test, transport=0x100, prefix=com.test)
FindAdvertisedName 0x4 takes 66 ms
FoundAdvertisedName(name=com.test, transport=0x4, prefix=com.test)
Accepting JoinSession request from :9-ewflpc.2
Accepting JoinSession request from :9-ewflpc.2
NameOwnerChanged(:okSgAM9h.1, null, :okSgAM9h.1)
Session Established: joiner=:9-ewflpc.2, sessionId=e78616c5
NameOwnerChanged(:okSgAM9h.2, null, :okSgAM9h.2)
NameOwnerChanged(com.test, null, :okSgAM9h.2)
Session Established: joiner=:9-ewflpc.2, sessionId=e80376f3
Link timeout was successfully set to 10
JoinSession 0x4 takes 72 ms
Sending "Ping String 1" to org.alljoyn.alljoyn_test.my_ping synchronously
JoinSession 0x100 takes 76 ms
Pinged with: Ping String 1
Link timeout was successfully set to 10
com.test.my_ping ( path=/org/alljoyn/alljoyn_test ) returned "Ping String 1"
Sending "Ping String 2" to org.alljoyn.alljoyn_test.my_ping synchronously
Pinged with: Ping String 2
com.test.my_ping ( path=/org/alljoyn/alljoyn_test ) returned "Ping String 2"
Sending "Ping String 3" to org.alljoyn.alljoyn_test.my_ping synchronously
Pinged with: Ping String 3
com.test.my_ping ( path=/org/alljoyn/alljoyn_test ) returned "Ping String 3"
Sending "Ping String 4" to org.alljoyn.alljoyn_test.my_ping synchronously
Pinged with: Ping String 4
com.test.my_ping ( path=/org/alljoyn/alljoyn_test ) returned "Ping String 4"
Sending "Ping String 5" to org.alljoyn.alljoyn_test.my_ping synchronously
Pinged with: Ping String 5
com.test.my_ping ( path=/org/alljoyn/alljoyn_test ) returned "Ping String 5"
com.test.GetProperty ( path=/org/alljoyn/alljoyn_test) returned "100"
SessionLost(e78616c5) was called. Reason = 2.
SessionLost(e80376f3) was called. Reason = 2.
bbclient exiting with status 0 (ER_OK)如果bbservice运行在IP地址为192.168.1.1 Linux设备上,而bbclient运行在另一台IP地址为192.168.1.2的Linux设备上,则bbclient无法找到并ping通bbservice。这两台Linux设备通过以太网线相连,可以通过Linux ping命令相互ping通。
下面是此测试的输出。
(在192.168.1.1 Linux设备上)
bbservice -n com.test &
AllJoyn Library version: v15.09.00
AllJoyn Library build info: AllJoyn Library v15.09.00 (Built Mon Feb 29 22:13:06 UTC 2016)
opts.transports = 0x105
bbservice com.test ready to accept connections(在192.168.1.2 Linux设备上)
bbclient -n com.test -d -c 5 &
AllJoyn Library version: v15.09.00
AllJoyn Library build info: AllJoyn Library v15.09.00 (Built Mon Feb 29 22:13:06 UTC 2016)因此,当bbclient在不同Linux设备上运行时,需要做些什么才能使bbclient能够ping通bbservice。
谢谢,
P.Tran
发布于 2016-03-03 08:24:26
Linux设备上存在网络问题,导致bbclient在这些Linux设备上运行时无法ping通bbservice。
修复网络问题后,bbclient可以成功ping通bbservice。
谢谢,
P.Tran
https://stackoverflow.com/questions/35712662
复制相似问题