Re: choosing a RFCOMMChannel channelID ?
On 24 Jun 2004, at 15:02, Yann Bizeul wrote:
Here is what I use in BuddyPop :
IOBluetoothSDPServiceRecord *dialupServiceRecord;
BluetoothRFCOMMChannelID rfcommChannelID;
dialupServiceRecord = [device getServiceRecordForUUID: [
IOBluetoothSDPUUID uuid16:
kBluetoothSDPUUID16ServiceClassDialupNetworking] ];
[dialupServiceRecord getRFCOMMChannelID:&rfcommChannelID];
status = [ device openRFCOMMChannelAsync:&mRFCOMMChannel
withChannelID:rfcommChannelID delegate: self ];
Yes "kBluetoothSDPUUID16ServiceClassDialupNetworking" is what i wanted !
I use kBluetoothSDPUUID16ServiceClassDialupNetworking because I see
AddressBook use this channel (for the phones I tested). Since this is
the same channel as AB, I gracefully free the connection when AB is
launched, and re-establish it when it is quit.
how did you find this is the SDPUUID service used by AB ?
I think this is the better way for application providing the same
features as AB in a different way, like BuddyPop or your product.
There would be conflicts if people install both your product and
BuddyPop, but that's life !
i dont understand something : you mean that you detect the AB.app launch, close your connection to let AB connect itself ? then at quit, you reopen your connection ? i suppose you have done this via NSWorkspace notifications ?
Regards,
Le 24 juin 04, ` 14:45, Aurilien Hugeli a icrit :
hi !
i'm creating a simple BlueTooth phone number dialer/SMS manager. I've
succeeded creating a RFCOMMChannel to my T68i and i have avoided using
/dev/modem unix style device connection.
here is how i open the RFCOMMChannel :
[mainBTDevice openRFCOMMChannelSync:&modemConnectionChannel
withChannelID:1 delegate:self];
the problem is how to choose my channelID: i have tried to do like
Apple with their chat client/server example but it does not really
work
in my case because i do not need to publish a service...
i've tried random channel from 0 to 10, only the channel from 1 to 5
seems to work for me to connect to my T68i modem.
How am i supposed to choose the channelID ? is it a manufacturer
document ? can i be sure the channel is available and not already in
use ? am i supposed to scan channelID until connection succeed ?
Apple documentation is really poor an the subject, or i did not found
it !
thanks !
_______________________________________________
bluetooth-dev mailing list | bluetooth-dev@lists.apple.com
Help/Unsubscribe/Archives:
Do not post admin requests to the list. They will be ignored.
--
Yann Bizeul - yann at tynsoe.org
_______________________________________________ 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)
-
Aurélien Hugelé