Ignoring Bluetooth Connection requests to the Inbox
| Tue, 2006-01-03 12:32 | |
|
Hi,
Does anyone know how to ignore ALL incoming bluetooth connection requests or at least know how to detect them, not based on a particular service but ANY service i.e how to detect a bluetooth connection to the inbox before the "Accept Incoming Connection" message appears on the phone? Regards, Isseyp |
|






Forum posts: 226
Correct me if i'm wrong....
Forum posts: 183
Regards,
Isseyp
Forum posts: 226
Forum posts: 183
What is the service_ID for this service (ie the default bluetooth obex inbox)?
Maybe just set secSettings.SetAuthorisation(EFalse); for everything , but this I think will just allow it to accept all incoming requests rather than auto-deny all of them.
RBTSecuritySettings secDatabase;
RBTSecuritySettings secDatabase; //comments
TBTServiceSecurity secSettings;
// connect to security manager
User::LeaveIfError(secManager.Connect());
CleanupClosePushL(secManager);
User::LeaveIfError(secDatabase.Open(secManager)); //comments
CleanupClosePushL(secDatabase); //comments
// setup security
TUid settingsUID;
settingsUID.iUid = KBT_serviceID;
secSettings.SetUid(settingsUID);
secSettings.SetChannelID(aChannel); //comments
secSettings.SetProtocolID(KSolBtRFCOMM); //comments
secSettings.SetAuthentication(EFalse);
secSettings.SetAuthorisation(EFalse);
secSettings.SetEncryption(EFalse);
// register settings with security
secDatabase.RegisterService(secSettings, status);
Forum posts: 183
I beleive I can deny bluetooth requests by using SetDenied(ETrue) something like below.
However, I dont know what the Service ID for the default SMS service and Im not sure which protocol ID I should be setting - I beleive it should be OBEX File Transfer?
Is the ServiceID for the default SMS service - KMsvLocalServiceIndexEntryId ?? or is this something else?
Also, which Channel? Should it be Channel 0?? If not then what?
I have been playing around with various values, but no sucess yet.
settingsUID.iUid =
secSettings.SetUid(settingsUID);
secSettings.SetChannelID(aChannel); //comments
secSettings.SetProtocolID(KSolBtRFCOMM); //comments
secSettings.SetDenied(ETrue);
// register settings with security
secDatabase.RegisterService(secSettings, status);
Regards,
Isseyp