When wireless connection is used in communication the eavestroping is much easier. That's why security and encryption is very important with Bluetooth devices. Bluetooth specifies security on several levels from basepand to service level. Baseband uses SAFER+ algorithms for security procedures. Bluetooth's encryption engine requires Master nodes's Bluetooth address, it's slot clock and secred key that is shared by all the participat devices. All nodes in a piconet knows the masters device address. The secret code is called pin code.
The security level can be changed. You can choose from three level of security:
Open - nosecurity at all. All devices can connect.
Link - Link level security. All the services are secured.
Service - Securing on service level.
Security can be set to "auth" or "encrypt" depenfing on your need. Th manage security settings use command btctl.
The process when devices create the security connection is called pairing. After pairing the data transfer between these equipments is secure. From the end user's point of view pairing is quite simple. You just have to give the same pin code for both devices. Depending on your security settings pairing is needed before the connection can be established. Secure connection is recommended as then a third party cannot read the communication between devices. This is why Affix has pairing switched on as a default. Here is the instructions how to set pin codes.
Simpliest way is to run btsrv on your Bluetooth computers. This way you will be prompted when the pairing is requested. When the dialog pops up on the screen just type in the pin code and press 'ok' button.
If you are not running btsrv you can set pin codes manually with btctl command:
Use btctl to find out and list the Bluetooth devices around your computer.
Add pin code btctl addpin <address_of_the_remote_peer> <pin_code>
You can create a default pin code replacing the remote peer address above with keyword default. Give this default pin code for the remote device when the code is asked.