title: How does Bluetooth pairing work?
body: <p>How <strong>exactly</strong> does Bluetooth paring work? What is communicated between each device during the pairing process?</p>
  
  <hr>
  
  <p>I was told if you had <kbd>device-A</kbd> wanting to pair with <kbd>device-B</kbd>:</p>
  
  <ul>
  <li><kbd>A</kbd> sends a 'unique key' to device <kbd>B</kbd> on some wavelength/frequency</li>
  <li><p><kbd>B</kbd> returns an 'echo' back to <kbd>A</kbd>, and hence the devices pair.</p>
  
  <pre><code>+-----+     key    +-----+ 
  |     |  ----&gt;     |     |
  |  A  |            |  B  |
  |     |     &lt;----  |     |
  +-----+     echoed +-----+ 
  </code></pre></li>
  </ul>
  
  <p>This seems to be inaccurate, so would anyone be able to either expand further or actually explain how/what is communicated to result in a successful pairing of the devices?</p>
  
  <hr>
  
  <p>I was thinking of incorporating some of this research into a final year project (University), but would at least need to know the <em>something</em> of the Bluetooth programming pairing first. </p>
  
  <p>Any help would be much appreciated in <em>describing</em> how these initial communications work.</p>
  
  <hr>
  
  <p>I've heard of terms such as 'parked mode', and 'passive mode' within my research, but am yet to find any 'useful' information in the programming behind the design, (and hence I have asked this question). The likes of googling this type of topic is also quite difficult as it seems to bring up stuff like 'how to turn your bluetooth on' pages, and not the design of the programming behind it. </p>