Author Topic: The Connecting & Pairing challenge — part 1  (Read 1598 times)

0 Members and 1 Guest are viewing this topic.

OfflineSTeinar

  • Global Moderator
  • *****
  • Posts: 447
  • Country: no
  • Blue R1200RT lc (AKE_Intercom)
    • Homepage
Pairing, what is that? This is what "wikipedia (https://en.wikipedia.org/wiki/Bluetooth#Pairing)" has to say:

**
Many of the services offered over Bluetooth (https://en.wikipedia.org/wiki/Special:Search/Bluetooth) can expose private data  or allow the connecting party to control the Bluetooth device (https://en.wikipedia.org/wiki/Special:Search/device). For  security reasons it is therefore necessary to control which devices are  allowed to connect to a given Bluetooth device. At the same time, it is  useful for Bluetooth devices to automatically establish a connection  without user intervention as soon as they are in range.

To resolve this conflict, Bluetooth uses a process called pairing (https://en.wikipedia.org/wiki/Special:Search/pairing). Two devices need to be paired to communicate with each other. The pairing process is typically  triggered automatically the first time a device receives a connection  request from a device with which it is not yet paired (in some cases the  device user may need to make the device's Bluetooth link visible to  other devices first). Once a pairing has been established it is  remembered by the devices, which can then connect to each without user  intervention. When desired, the pairing relationship can later be  removed by the user.

**

I would like to say it this way Bluetooth is using a radio transmitter (https://en.wikipedia.org/wiki/Special:Search/transmitter) and a receiver (https://en.wikipedia.org/wiki/Special:Search/receiver) to transport the sound/voice.

If another bike was in range of your Bluetooth "transmitter"—he could potentially connect to your system and eavesdrop or in other ways abuse it. He might even connect to your cell phone and use it without your knowing it.

Bluetooth modules all have an id implemented—like the MAC address (https://en.wikipedia.org/wiki/Special:Search/MAC_address) for TCP/IP (https://en.wikipedia.org/wiki/Special:Search/TCP/IP)—which makes it uniquely identifiable, and prevents it from being mistaken for another device.
Many Bluetooth modules though have common "names"—like "Headset"—which are generic and easy to confuse with others.

This is the reason that one needs a system that makes sure that only those units which are intended to do so, get to connect and communicate with each other.

I'll describe this with the example of a cell phone that you would want to use a BLuetooth wireless headset with.

Step 1 is to enable Bluetooth on the cell phone and make it discoverable (usually the matter of clicking a menu button)

Step 2 is to fire up your headset—and wait until the cell phone finds the headset—by scanning all the available frequencies.

When the cell phone finds a unit it doesn't recognise, it asks you wether you would like to connect to that device.

The headset has a predefined 4-digit code (usually by default 0000, 1234 or something similar) that can be found in the documentation of the headset.

The cell phone will then ask you to key in this 4-digit code—whereupon the cell phone and the headset sends some secret codes to each other, makes the handshake and establishes the connection.

The cell phone and the headset are storing the unique ID from the other device and use that to identify and confirm the connection the next time they try to hook up. This means that you will not have to go through the process of pairing each time you try to connect the devices.

Some cell phones also gives you the option to permanently enable a device (like a headphone)

After this, the cell phone and the headset will automatically make contact whenever they are within range.

This is the same pairing process used for all Bluetooth modules involved motorbike intercom.

Which means that you have to repeat the process for all units that you want to directly communicate (that is to speak to each other) in your system.
« Last Edit: 2013-12-03 14:25:59 by STeinar »
** Wired and Bluetooth intercom from shop.ake-electronic.com **