Hello, It is indeed a bug in the sample. In - (BOOL)publishServiceAndWaitForConnection incomgingChannelNotification = [IOBluetoothRFCOMMChannel registerForChannelOpenNotifications:self selector:@selector(newRFCOMMChannelOpened:) withChannelID:serverChannelID direction:kIOBluetoothUserNotificationChannelDirectionIncoming]; should be changed with: incomgingChannelNotification = [IOBluetoothRFCOMMChannel registerForChannelOpenNotifications:self selector:@selector(newRFCOMMChannelOpened:channel:) withChannelID:serverChannelID direction:kIOBluetoothUserNotificationChannelDirectionIncoming]; basically the change is on the selector that should be: @selector(newRFCOMMChannelOpened:channel:) Since it looks like you have an old sample I think you should also change - (void)stopProvidingChatServices: Where you see: [incomgingChannelNotification unregister]; change it into: if (incomgingChannelNotification != nil) [incomgingChannelNotification unregister]; incomgingChannelNotification = nil; This is because stopProvidingChatServices can be called more than once. And you are also correct about ' [rfcommChannel retain]; ' that one should be a release as the comment suggests. ... Marco On Thursday, February 6, 2003, at 03:44 PM, Hussain Bandukwala wrote: Attn: Mr. Marco Pontil Hi All, I have been having some problems while running the RFCOMMServerSample along with the RFCOMMClientSample from /Developer/Examples/Bluetooth on Jaguar. Occassionally, when I start the server, messages similar to the following show up: '2003-02-06 11:47:49.216 RFCOMMServerSample[443] *** -[ChatBluetoothServerInterface newRFCOMMChannelOpened:]: selector not recognized' Once the server starts up and waits for connection, the client sees the server but is unable to connect. The following message shows up on the server side: '2003-02-06 11:44:56.553 RFCOMMServerSample[443] *** -[ChatBluetoothServerInterface newRFCOMMChannelOpened:]: selector not recognized 2003-02-06 11:44:56.554 RFCOMMServerSample[443] Exception raised during posting of notification. *Ignored. *exception: *** -[ChatBluetoothServerInterface newRFCOMMChannelOpened:]: selector not recognized' I was wondering if someone could point to me where I might be going wrong. I had another question about a particular code piece. The code is from RFCOMMServerSample - ChatBluetoothServerInterface.m [lines 180-182]: ************ '// We failed to register a listener. This is cathastrofic for a server // Releases the channel: *[rfcommChannel retain]; ' Is there any reason why the rfcommChannel is being retained here? Thanking You Kindly, Hussain ======================================================================= = Hussain H. Bandukwala, C-1116, 1189 Beall Ave., The College of Wooster, Wooster, OH - 44691. (Home) -- (330)-287-3000 (x-7107) (Cell) -- (330)-412-1980 http://pages.wooster.edu/hbandukwala "It is not the strength, but the duration, of great sentiments that makes great men." -- Friedrich Nietzsche ======================================================================= = _______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored. _______________________________________________ bluetooth-dev mailing list | bluetooth-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/bluetooth-dev Do not post admin requests to the list. They will be ignored.
participants (1)
-
Marco Pontil