Re: RFCOMMClient and Server Examples
Re: RFCOMMClient and Server Examples
- Subject: Re: RFCOMMClient and Server Examples
- From: Björn Davidsson <email@hidden>
- Date: Wed, 18 Sep 2002 13:11:21 +0200
What version of MacOS are you using?
I built a working server based on the RFCOMMServer sample, modified to
talk to our device, on the Jaguar seed release. I have not had time to
update it to the changed API in Jaguar. When running it on 10.1, I
think I had exactly the problem you describe.
Best regards,
Bjvrn Davidsson
C Technologies AB
On Wednesday, September 18, 2002, at 12:34 PM, Keith Phu wrote:
Has anyone gotten the RFCOMMServer and RFCOMMClient example code to
work?
I can start the server, and the 'chat server' service is visible on
the client side. But when I try to select the 'chat server' service,
no connection is made. After a day of debugging I think I've narrowed
down my problem. I think the server software isn't detecting the
incoming RFCOMM Channel being set up by the client.
Stepping through the client code, the client is stalling on the
following line.
if ((result == kIOReturnSuccess) &&
(IOBluetoothDeviceOpenRFCOMMChannel(connectToDevice ,rfcommChannelID,
&rfcommChannel) == kIOReturnSuccess))
{
which led me to believe that the server is not registering an incoming
data listener.
Now looking through the server code, it appears that it registers an
incoming data listener in the newRFCOMMChannelOpened function. This
function is supposed to be called automatically when an incoming
channel is detected. It's setup in the following line
incomgingChannelNotification =
[IOBluetoothRFCOMMChannel registerForChannelOpenNotifications:self
selector:@selector(newRFCOMMChannelOpened:)
withChannelID:serverChannelID
direction:kIOBluetoothUserNotificationChannelDirectionIncoming];
Using BluetoothMonitor, I can see that an RFCOMM channel does in fact
exist. So I think that the handler (newRFCOMMChannelOpened:) is not
being called when an incoming channel event occurs.
But, I don't know what to do about it. Does anyone have any ideas?
Even if the example code worked perfectly for you without
modifications, I'd like to know.
Thanks
Keith
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
_______________________________________________
bluetooth-dev mailing list | email@hidden
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 | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/bluetooth-dev
Do not post admin requests to the list. They will be ignored.