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在Linux设备上运行,IP地址为192.168.1.1,而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设备上运行时,需要做些什么才能ping bbservice。
谢谢,
P上。 TRAN
答案 0 :(得分:0)
Linux设备上存在网络问题,导致bbclient在这些Linux设备上运行时无法ping bbservice。
修复网络问题后,bbclient可以成功ping bbservice。
谢谢,
P上。 TRAN