Rejecting Bluetooth Connections Automatically

Login to reply to this topic.
Tue, 2006-02-21 04:51
Joined: 2005-03-06
Forum posts: 183
Hi,

I want to be able to reject any bluetooth connection attempts automatically. I have looked at the OBEX sample and played with the security settings but so far no luck.

I beleive if I used SetDenied(ETrue) it should not accept any connection attempts, the problem is when you write an application you specify the Unique ID for a given service (UID) and the security will only look for connections from this service, as in the sample code below.

The problem I'm having is I dont know the Service ID (UID) of the connections I want to reject. I want to reject all connection attempts from all potential Service IDs.

I need to have the phone visible, but do not want any connection attempts from other rouge services (so called bluetooth viruses) to annoy the user.


Is there any way to do this?



btServiceSecurity.SetUid(uid); // Set unique ID (UID) for service.
btServiceSecurity.SetChannelID(aChannel); // Set channel/port for service.
btServiceSecurity.SetProtocolID(KSolBtL2CAP); // Use L2CAP.
btServiceSecurity.SetAuthentication(EFalse); // No Authentication required.
btServiceSecurity.SetAuthorisation(EFalse); // No Autherization required.
btServiceSecurity.SetEncryption(EFalse); // No Encryption required.
btServiceSecurity.SetDenied(ETrue); //Refuse connections
  • Login to reply to this topic.