GKTank 示例无法正常工作

发布于 2024-09-03 12:02:51 字数 3462 浏览 4 评论 0原文

我正在尝试让 GKTank 示例与 2 部 iPhone 一起使用。两者都启用了蓝牙。我在两台设备上启动该应用程序并点击屏幕。 Peer Picker 出现,设备找到彼此。如果我在列表中选择一台设备,它会永远显示“正在等待 {other iPhone}...”。在 {other iPhone} 上,等待的电话会显示为灰色。如果我同时从两个设备中选择要连接的设备,则两个设备都会永远进入等待状态...

如果我在调试设备上选择另一台 iPhone,则调试日志会显示以下内容:

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

2010-05-30 23:20:25.269 GKTank[2433:4e03] ~ DNSServiceRegister 回调:Ref=135f70,Flags=2,ErrorType=0 name=00oRWv-0A..David‚s iPhone regtype=_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 已启动 (2)

2010-05-30 23:24:32.321 GKTank[2442:4e03] ~ DNSServiceRegister 回调:Ref=135120,Flags=2,ErrorType=0 name=006JiAZ0A..David‚s 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.. David 的 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] ** 同行 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] 同行 [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

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

I'm trying to get the GKTank example working with 2 iPhones. Both have bluetooth enabled. I start the app on both devices and tap the screen. The Peer Picker comes up and the devices find each other. If I select one device in the list it says "Waiting for {other iPhone}..." forever. On the {other iPhone} the waiting phone gets grayed out. If I select the device to connect to from both devices at the same time both go into waiting state forever...

The debug log says this if I select the other iPhone on the debugged device:

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

2010-05-30 23:20:25.269 GKTank[2433:4e03] ~ DNSServiceRegister callback: Ref=135f70, Flags=2, ErrorType=0 name=00oRWv-0A..David’s iPhone regtype=_gktank._udp. domain=local.

2010-05-30 23:20:25.375 GKTank[2433:4e03] ~ DNSServiceBrowse callback: Ref=134f30, Flags=2, IFIndex=8 (name=[en2]), ErrorType=0 name=00oRWv-0A..David’s iPhone regtype=_gktank._udp. domain=local.

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

2010-05-30 23:20:30.855 GKTank[2433:4e03] ~ DNSServiceQueryRecord callback: 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] ** peer 480260628: oldbusy=0, newbusy=0

2010-05-30 23:20:35.215 GKTank[2433:207] ** Stop resolving? potentially previous resolves

2010-05-30 23:20:35.226 GKTank[2433:207] ********** BEGIN RESOLVE: 480260628

and it stays that way. On the second iPhone the device is listed as not available and grayed out.

If I select each other at the same time it says this:

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

2010-05-30 23:24:32.321 GKTank[2442:4e03] ~ DNSServiceRegister callback: Ref=135120, Flags=2, ErrorType=0 name=006JiAZ0A..David’s iPhone regtype=_gktank._udp. domain=local.

2010-05-30 23:24:32.419 GKTank[2442:4e03] ~ DNSServiceBrowse callback: Ref=134f30, Flags=2, IFIndex=8 (name=[en2]), ErrorType=0 name=006JiAZ0A..David’s iPhone regtype=_gktank._udp. domain=local.

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

2010-05-30 23:24:57.308 GKTank[2442:4e03] ~ DNSServiceQueryRecord callback: 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] ** Stop resolving? potentially previous resolves

2010-05-30 23:25:02.425 GKTank[2442:207] ********** BEGIN RESOLVE: 203104196

2010-05-30 23:25:13.562 GKTank[2442:4e03] ~ DNSServiceQueryRecord callback: 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] ** peer 203104196: oldbusy=0, newbusy=1

2010-05-30 23:25:33.660 GKTank[2442:4e03] ~ DNSServiceBrowse callback: Ref=134f30, Flags=0, IFIndex=-3 (name=[]), ErrorType=0 name=004_n6C0A..iPhone von Tamara regtype=_gktank._udp. domain=local.
2010-05-30 23:25:33.671 GKTank[2442:4e03] Peer [203104196] removed? (0).

2010-05-30 23:25:33.683 GKTank[2442:4e03] GKPeer[139f10] 203104196 service count old=1 new=0

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

2010-05-30 23:25:37.816 GKTank[2442:4e03] GKPeer[139f10] 203104196 service count old=0 new=1

... and waits forever.
Does anybody know whats wrong with this sample??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风情万种。 2024-09-10 12:02:51

没关系,关闭蓝牙然后再次打开解决了这个问题:PI 喜欢依赖这种可靠性......

Nevermind, turning bluetooth off and on again fixed the issiue :P I love to be dependant on that kind of reliability...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文