GKTank示例不起作用

时间:2010-05-30 21:30:05

标签: iphone objective-c bluetooth p2p gksession

我正在努力让GKTank示例使用2部iPhone。两者都启用了蓝牙功能。我在两台设备上启动应用程序并点按屏幕。 Peer Picker出现,设备互相找到。如果我在列表中选择一个设备,它会永远显示“等待{其他iPhone} ...”。在{other iPhone}上,等待的电话变灰了。如果我同时从两个设备中选择要连接的设备,它们将永远进入等待状态......

如果我在调试设备上选择其他iPhone,调试日志会说明这一点:

  

2010-05-30 23:20:24.331 GKTank [2433:4e03] handleEvents started(2)

     

2010-05-30 23:20:25.269 GKTank [2433:4e03] ~DNSServiceRegister回调:Ref = 135f70,Flags = 2,ErrorType = 0 name = 00oRWv-0A.David,ôôsiPhoneregtype = _gktank._udp 。域本地=

     

2010-05-30 23:20:25.375 GKTank [2433:4e03] ~DNSServiceBrowse回调:Ref = 134f30,Flags = 2,IFIndex = 8(name = [en2]),ErrorType = 0 name = 00oRWv-0A ..David,也就是iPhone regtype = _gktank._udp。域本地=

     

2010-05-30 23:20:30.691 GKTank [2433:4e03] ~DNSServiceBrowse回调:Ref = 134f30,Flags = 2,IFIndex = -3(name = []),ErrorType = 0 name = 00K83eS0A .. iPhone von Tamara regtype = _gktank._udp。域本地=

     

2010-05-30 23:20:30.855 GKTank [2433:4e03] ~DNSServiceQueryRecord回调:Ref = 13a320,Flags = 2,IFIndex = -3(name = []),ErrorType = 0 fullname = 00k83es0a .. iphone \ 032von \ 032tamara._gktank._udp.local。 rrtype = 16 rrclass = 1 rdlen = 18 ttl = 7200

     

2010-05-30 23:20:30.872 GKTank [2433:4e03] **同行480260628:oldbusy = 0,newbusy = 0

     

2010-05-30 23:20:35.215 GKTank [2433:207] **停止解决?可能以前的决议

     

2010-05-30 23:20:35.226 GKTank [2433:207] **********开始时分辨率:480260628

并保持这种状态。在第二部iPhone上,该设备被列为不可用并显示为灰色。

如果我同时选择对方,则会说:

  

2010-05-30 23:24:31.416 GKTank [2442:4e03] handleEvents started(2)

     

2010-05-30 23:24:32.321 GKTank [2442:4e03] ~DNSServiceRegister回调:Ref = 135120,Flags = 2,ErrorType = 0 name = 006JiAZ0A..David,也就是iPhone regtype = _gktank._udp。域本地=

     

2010-05-30 23:24:32.419 GKTank [2442:4e03] ~DNSServiceBrowse回调:Ref = 134f30,Flags = 2,IFIndex = 8(name = [en2]),ErrorType = 0 name = 006JiAZ0A ..大卫,iPhone的regtype = _gktank._udp。域本地=

     

2010-05-30 23:24:57.156 GKTank [2442:4e03] ~DNSServiceBrowse回调:Ref = 134f30,Flags = 2,IFIndex = -3(name = []),ErrorType = 0 name = 004_n6C0A .. iPhone von Tamara regtype = _gktank._udp。域本地=

     

2010-05-30 23:24:57.308 GKTank [2442:4e03] ~DNSServiceQueryRecord回调:Ref = 13a320,Flags = 2,IFIndex = -3(name = []),ErrorType = 0 fullname = 004_n6c0a .. iphone \ 032von \ 032tamara._gktank._udp.local。 rrtype = 16 rrclass = 1 rdlen = 18 ttl = 7200

     

2010-05-30 23:24:57.314 GKTank [2442:4e03] ** peer 203104196:oldbusy = 0,newbusy = 0

     

2010-05-30 23:25:02.383 GKTank [2442:207] **停止解决?可能以前的决议

     

2010-05-30 23:25:02.425 GKTank [2442:207] **********开始时分辨率:203104196

     

2010-05-30 23:25:13.562 GKTank [2442:4e03] ~DNSServiceQueryRecord回调:Ref = 13a320,Flags = 2,IFIndex = -3(name = []),ErrorType = 0 fullname = 004_n6c0a .. iphone \ 032von \ 032tamara._gktank._udp.local。 rrtype = 16 rrclass = 1 rdlen = 18 ttl = 7200   2010-05-30 23:25:13.569 GKTank [2442:4e03] **同行203104196:oldbusy = 0,newbusy = 1

     

2010-05-30 23:25:33.660 GKTank [2442:4e03] ~DNSServiceBrowse回调:Ref = 134f30,Flags = 0,IFIndex = -3(name = []),ErrorType = 0 name = 004_n6C0A .. iPhone von Tamara regtype = _gktank._udp。域=本地。   2010-05-30 23:25:33.671 GKTank [2442:4e03] Peer [203104196]删除了? (0)。

     

2010-05-30 23:25:33.683 GKTank [2442:4e03] GKPeer [139f10] 203104196服务人数= 1新= 0

     

2010-05-30 23:25:37.786 GKTank [2442:4e03] ~DNSServiceBrowse回调:Ref = 134f30,Flags = 2,IFIndex = -3(name = []),ErrorType = 0 name = 004_n6C0A .. iPhone von Tamara regtype = _gktank._udp。域本地=

     

2010-05-30 23:25:37.816 GKTank [2442:4e03] GKPeer [139f10] 203104196服务人数= 0新= 1

......等待永远。 有人知道这个样本有什么问题吗?

1 个答案:

答案 0 :(得分:0)

没关系,关闭再打开蓝牙再次解决问题:P我喜欢依赖于那种可靠性......