GameKit bluetooth failing on iPad?
Hello, I'm trying to add a Bluetooth multiplayer mode to my game. Right now I'm testing it on an iPad trying to connect with a 2nd gen iPod Touch. The peer picker is able to see both the iPod and iPad, and it allows me to connect. The output in the consol for the iPod is very simple and shows no problems:
However the debug output on the iPad is a mess, and the GKSession is deallocated right after the peer connects
And you can see at the end there it displays my Peer Connected message that I print in session:didStateChange, but the session gets deallocated immediately. Both devices are using the same exact code.
Code:
2010-09-02 13:46:30.906 iPhone GameboardView
2010-09-02 13:46:33.229 Received memory warning. Level=1
2010-09-02 13:46:33.397 BTM: attaching to BTServer
2010-09-02 13:46:33.420 <<< Session >>> +[GKBluetoothSupport _determineBluetoothStatus]: BT not available - try again later.
2010-09-02 13:46:34.459 BTM: posting notification BluetoothAvailabilityChangedNotification
2010-09-02 13:46:43.840 Peer Connected 1967929208However the debug output on the iPad is a mess, and the GKSession is deallocated right after the peer connects
Code:
2010-09-02 13:44:42.434 BTM: attaching to BTServer
Listening on port 63476
2010-09-02 13:44:42.487 Error: 30509 -- Bluetooth not available..
2010-09-02 13:44:42.515 handleEvents started (2)
2010-09-02 13:44:42.947 BTM: posting notification BluetoothAvailabilityChangedNotification
2010-09-02 13:44:43.313 ~ DNSServiceRegister callback: Ref=144780, Flags=2, ErrorType=0 name=00-gja70A..iPad regtype=_ivcjebr20vuel0._udp. domain=local.
2010-09-02 13:44:43.521 ~ DNSServiceBrowse callback: Ref=144590, Flags=2, IFIndex=2 (name=[en0]), ErrorType=0 name=00-gja70A..iPad regtype=_ivcjebr20vuel0._udp. domain=local.
2010-09-02 13:44:57.821 ~ DNSServiceBrowse callback: Ref=144590, Flags=2, IFIndex=2 (name=[en0]), ErrorType=0 name=006kxxs0A..’s iPod Touch regtype=_ivcjebr20vuel0._udp. domain=local.
2010-09-02 13:45:00.741 ~ DNSServiceBrowse callback: Ref=144590, Flags=2, IFIndex=-3 (name=[]), ErrorType=0 name=006kxxs0A..’s iPod Touch regtype=_ivcjebr20vuel0._udp. domain=local.
2010-09-02 13:45:00.800 ~ DNSServiceQueryRecord callback: Ref=13d0b0, Flags=3, IFIndex=2 (name=[en0]), ErrorType=0 fullname=006kxxs0A\.\.’s\032iPod\032Touch._ivcjebr20vuel0._udp.local. rrtype=16 rrclass=1 rdlen=18 ttl=4500
2010-09-02 13:45:00.803 ~ DNSServiceQueryRecord callback: Ref=13d0b0, Flags=2, IFIndex=-3 (name=[]), ErrorType=0 fullname=006kxxs0a\.\.’s\032ipod\032touch._ivcjebr20vuel0._udp.local. rrtype=16 rrclass=1 rdlen=18 ttl=7200
2010-09-02 13:45:00.806 ** peer 921680774: oldbusy=0, newbusy=0
2010-09-02 13:45:03.740 ~ DNSServiceQueryRecord callback: Ref=13d0b0, Flags=1, IFIndex=2 (name=[en0]), ErrorType=0 fullname=006kxxs0A\.\.’s\032iPod\032Touch._ivcjebr20vuel0._udp.local. rrtype=16 rrclass=1 rdlen=18 ttl=0
2010-09-02 13:45:03.746 ~ DNSServiceQueryRecord callback: Ref=13d0b0, Flags=2, IFIndex=2 (name=[en0]), ErrorType=0 fullname=006kxxs0A\.\.’s\032iPod\032Touch._ivcjebr20vuel0._udp.local. rrtype=16 rrclass=1 rdlen=18 ttl=4500
2010-09-02 13:45:05.183 BTM: Adding new device 0x15ed10 Jill’s iPod Touch 00:22:41:83:A9:8F 0x8c470003
2010-09-02 13:45:05.211 BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2010-09-02 13:45:05.215 BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 0
2010-09-02 13:45:05.213 ~ DNSServiceQueryRecord callback: Ref=13d0b0, Flags=2, IFIndex=-3 (name=[]), ErrorType=0 fullname=006kxxs0a\.\.’s\032ipod\032touch._ivcjebr20vuel0._udp.local. rrtype=16 rrclass=1 rdlen=18 ttl=7200
2010-09-02 13:45:05.221 BTM: received BT_SERVICE_CONNECTION_RESULT event with 1 currently connected services
2010-09-02 13:45:05.238 BTM: posting notification BluetoothDeviceConnectSuccessNotification
2010-09-02 13:45:05.239 BTM: received BT_LOCAL_DEVICE_CONNECTION_STATUS_CHANGED event
2010-09-02 13:45:05.240 BTM: posting notification BluetoothConnectionStatusChangedNotification
2010-09-02 13:45:05.229 ** peer 921680774: oldbusy=0, newbusy=1
2010-09-02 13:45:10.100 ~ DNSServiceBrowse callback: Ref=144590, Flags=2, IFIndex=4 (name=[en2]), ErrorType=0 name=00-gja70A.. iPad regtype=_ivcjebr20vuel0._udp. domain=local.
2010-09-02 13:45:10.267 ~ DNSServiceBrowse callback: Ref=144590, Flags=3, IFIndex=4 (name=[en2]), ErrorType=0 name=006kxxs0A..’s iPod Touch regtype=_ivcjebr20vuel0._udp. domain=local.
2010-09-02 13:45:10.272 GKPeer[15da20] 921680774 service count old=1 new=2
2010-09-02 13:45:10.275 ~ DNSServiceQueryRecord callback: Ref=13d0b0, Flags=2, IFIndex=4 (name=[en2]), ErrorType=0 fullname=006kxxs0A\.\.’s\032iPod\032Touch._ivcjebr20vuel0._udp.local. rrtype=16 rrclass=1 rdlen=18 ttl=4500
2010-09-02 13:45:10.278 ** peer 921680774: oldbusy=1, newbusy=1
Connection request from ***.***.**.***:49688...
[36EFBB86] State Change with event 0: 0 -> 1
[36EFBB86] State Change with event 2: 1 -> 2
[36EFBB86] State Change with event 3: 2 -> 3
2010-09-02 13:45:10.719 setDisplayNameForPeer: 921680774 => iPod Touch (this is iPad)
acceptInvitation from [36EFBB86]: 1
====== 2 nodes =====
0: 0792DABE Next[0792DABE], dist[0], SN[1], New[0], From[0792DABE], #NEIGHBOR[1] "iPad"[11]
36EFBB86, RTT[1424]
1: 36EFBB86 Next[36EFBB86], dist[1424], SN[1], New[0], From[36EFBB86], #NEIGHBOR[1] "iPod Tou"[17]
0792DABE, RTT[1079]
2010-09-02 13:45:18.634 setDisplayNameForPeer: 921680774 => iPod Touch (this is iPad)
2010-09-02 13:45:18.641 ** Stop resolving: iPod Tou connected
2010-09-02 13:45:18.646 Peer Connected 921680774
2010-09-02 13:45:18.649 GKSession dealloc
2010-09-02 13:45:18.663 handleEvents ended (2)
====== 1 nodes =====
0: 0792DABE Next[0792DABE], dist[0], SN[2], New[0], From[0792DABE], #NEIGHBOR[0] "iPad"[11]
Closing connection to [36EFBB86]
Closing connection to [36EFBB86]
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Render to texture failing | headkaze | 7 | 5,735 |
Sep 1, 2010 09:47 PM Last Post: headkaze |
|
| Why bluetooth games do not work on iPhone 2G? | riruilo | 13 | 7,736 |
Mar 31, 2010 07:53 AM Last Post: alibaba123 |
|
| Multi-touch failing | Sumaleth | 1 | 2,227 |
Feb 24, 2010 08:49 PM Last Post: Sumaleth |
|
| Question re: GameKit and online connection types | Malarkey | 0 | 1,731 |
Jan 8, 2010 05:12 PM Last Post: Malarkey |
|
| MonoTouch and GameKit | savage | 1 | 3,686 |
Nov 23, 2009 03:59 AM Last Post: savage |
|

