23
Application Note Setting up the Bluetooth Interface by Dieter Fauth Last revision of this document: 2006-12-14

Honeywell Adaptus bluetooth

Embed Size (px)

DESCRIPTION

Adaptus bluetooth manual and set up

Citation preview

Application Note

Setting upthe

BluetoothInterface

by Dieter Fauth

Last revision of this document: 2006-12-14

Adaptus Bluetooth Imagers1 Overview

Last revision of this document: 2006-12-14

1 Overview

This document describes certain aspects of the Bluetooth interface in Adaptus Imagers that are not covered by the users guide.Models:

• 4820

• 3820

• 2020

1.1 Required knowledgeThe reader should have a generic knowledge about computers and technical devices. Some background about our barcode Imagers does help.

1.2 Revision History2005.07.19 First release2005.07.20 Added BlueSoleil stack and scattered changes.2005.07.21 Added Pocket PC devices2005.07.27 Scattered changes2005.08.08 Added chapter “Advanced”2006.12.14 Changed the devices names to fit the current devices.

Page 2 of 23

Adaptus Bluetooth Imagers1 Overview

Last revision of this document: 2006-12-14

Contents:1 Overview.................................................................................................................................................... 21.1 Required knowledge............................................................................................................................... 21.2 Revision History...................................................................................................................................... 2

2 Security...................................................................................................................................................... 42.1 Pairing..................................................................................................................................................... 42.2 Authentification....................................................................................................................................... 42.3 Security Discussion................................................................................................................................. 72.4 Discovery modes.................................................................................................................................... 72.5 Linking Scanner to Base......................................................................................................................... 7

3 Advanced Settings..................................................................................................................................... 83.1 Lock base for new Imagers..................................................................................................................... 8

4 Connecting to third party devices............................................................................................................... 94.1 Discovery modes.................................................................................................................................... 94.2 Pocket PC devices.................................................................................................................................. 94.2.1 Pocket PC 2003 with Widcomm stack................................................................................................. 94.2.2 Pocket PC 2003 with Drakar (Socket) stack (D9500 and D7900)...................................................... 124.3 USB dongles and regular PCs.............................................................................................................. 154.3.1 Win XP with the Microsoft BT stack................................................................................................... 154.3.2 Win XP with the WidComm stack...................................................................................................... 174.3.3 Win XP with the BlueSoleil stack....................................................................................................... 18

5 Troubleshooting....................................................................................................................................... 215.1 Linking with the base after experiments................................................................................................ 21

6 Adanced communication......................................................................................................................... 226.1 Access the Imager via the base............................................................................................................ 226.2 Access the Imager via any Bluetooth dongle........................................................................................ 22

7 FAQ......................................................................................................................................................... 23

Page 3 of 23

Adaptus Bluetooth Imagers2 Security

Last revision of this document: 2006-12-14

2 Security

For all devices that can be accessed via an air connection, security is a major issue. Especially Bluetooth has been in the news recently for security issues. Our driver stack is supplied by a major player in the Bluetooth scene, a lot of effort went into securing the low level procedures.You as a user need to understand the settings that influences the security.

2.1 PairingBluetooth devices can support a feature called pairing, that means, these two devices will know each other and connect without further questions. In the default setting the pairing is optional. For a better security it is recommended to set Pairing to “required” (perhaps with encryption).

Note: It is important that you change the base first. Doing it the other way around, you will loose connection between the base and the Imager. If this happens by accident, then go back to the setting before the change, that re-establishes the connection.

COMMAND FOR BASE SECURITY LEVEL COMMAND FOR IMAGER

0no security

1no security

2medium

3fair

2.2 AuthentificationEach device can also be equipped with a passkey. The default passkey is 1234, so it is highly recommended to change it to a more secret one.

Page 4 of 23

Adaptus Bluetooth Imagers2 Security

Last revision of this document: 2006-12-14

You must enter the same passkey for both the base and the Imager: Scan the BASPIN barcode, then the characters of your PIN followed by the Save barcode. Do the same for the Imager, but start with the BT_PIN barcode. A maximum of 16 characters can be used for the passkey.Please note that a 4 digit numeric only PIN can be cracked in less than a second under certain circumstances. Therefore use at least 8 alphanumeric characters.

COMMAND FOR BASE COMMAND FOR IMAGER

Programming Chart

Page 5 of 23

Adaptus Bluetooth Imagers2 Security

Last revision of this document: 2006-12-14

Programming Chart

Page 6 of 23

Adaptus Bluetooth Imagers2 Security

Last revision of this document: 2006-12-14

Note: Be careful when you change the the passkey. If the devices are already paired, they do not check their passkeys immediately. This check happens on the next pairing.

Note: With the freeware program KeePass (http://keepass.sourceforge.net) you can create and maintain secure passkeys.

2.3 Security DiscussionThe discussion about Bluetooth security is still ongoing. These are two interesting web sites:http://www.eng.tau.ac.il/~yash/shaked-wool-mobisys05/.http://blogs.fullthrottle.com/EmbeddedBlue/In general the discussion is whether the passkey is save at all. The group that cracked the passkey used a 4 digits numeric only PIN for their experiments. They recorded the pairing process of two devices and used a brute force attack to crack the PIN. It clearly shows the a 4 digits PIN is not save at all. It will be cracked in 60 Milli Seconds on a regular PC. Even a 9 digits PIN can be cracked in less than 2 hours.With the 69 different characters that can be used in passkeys, we get a much better mileage. An 8 characters passkey needs 98 years to crack (if we need all the tries). If we assume the correct passkey will be found after 50% of the time, it is still 49 years. That is safe enough for most applications. Otherwise just add more characters.But keep in mind that dictionary lookups can crack simple word passkeys very fast as well. So choose a good passkey with scattered characters.Another security measure is to avoid pairing devices in public places. What they don't see, they cannot crack.The table below shows the calculation details.

2.4 Discovery modesBy default the Imager and the base are in a mode where they are not discoverable by other Bluetooth devices (The initial linking is not done via Bluetooth). See chapter 4.1 on page 9 for more details.

2.5 Linking Scanner to BasePlease see the details about the link modes in the System Manual.

Page 7 of 23

Characters in passkey 1 4 5 6 7 8 9Max tries with digits only 10 10000 100000 1,00E+06 1,00E+07 1,00E+08 1,00E+09Seconds to crack 0,06 0,6 6 60 600 6000Minutes to crack 0 0,01 0,1 1 10 100Hours to crack 0 0 0 0 0 1,7

Max tries with alphanumeric 69 2,27E+07 1,56E+09 1,08E+11 7,45E+12 5,14E+14 3,55E+16Times better than digits 6,9 2,27E+03 1,56E+04 1,08E+05 7,45E+05 5,14E+06 3,55E+07Seconds to crack 136 9384,19 6,48E+05 4,47E+07 3,08E+09 2,13E+11Minutes to crack 2,27 156,4 1,08E+04 7,45E+05 5,14E+07 3,55E+09Hours to crack 0 3 180 12.411 856.331 59.086.813Days to crack 0 0 7 517 35.680 2.461.951Years to crack 0 0 0 1,4 98 6.764

Adaptus Bluetooth Imagers3 Advanced Settings

Last revision of this document: 2006-12-14

3 Advanced Settings

3.1 Lock base for new ImagersAs soon as you place a new Imager into the base, it gets connected to the base. In general this is the best setting for most users. Sometimes it is a good idea to prevent new Imagers connecting to the base. This can be controlled by this setting.Note: In case you need to replace a Imager, you must enable the automatic linking for this action.

COMMAND COMMAND

Page 8 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

4 Connecting to third party devices

The Imagers can be connected to typical Bluetooth dongles and PDA type devices. In order to work that way, a few settings must be done.The passkey and pairing behavior is the same as with the base station, see chapters 2.1 and 2.2 for the configuration barcodes. All barcodes for the base station are not applicable here.

4.1 Discovery modesThe Imagers are not discoverable by default because the 2020 base does find them without a Bluetooth connection. In order to connect with third party devices, the Imager must be visible.

COMMAND FOR IMAGER COMMENTSThe Imager is not discoverable by other

Bluetooth devices.

This mode is used together with the 2020 base.

The Imager is discoverable by other Bluetooth devices.

Use this if you use a third party BT dongle.

The Imager is discoverable by other Bluetooth devices and it automatically

reconnects when it comes back from the out of range situation.

Requires a more complicated setup in the host! And with most stacks it won't work

properly with current firmware.

4.2 Pocket PC devicesFor the PAD type devices we concentrate to the Windows CE based devices. The setup depends on the Bluetooth driver stack used in a particular PDA.

4.2.1 Pocket PC 2003 with Widcomm stackThis stack was tested with an HP iPAQ 2210, Pocket PC 2003 (German Edition). The Bluetooth stack has Version 1.4.1 Build 60.This device stands for a lot of devices using the same driver stack . The screenshots are in German, but I bet you get the ideas anyway.Note: In my tests I did not get the PIN to work, the iPAQ never asked for a PIN.

Page 9 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

Before you start, you might want to make sure the Imager is not paired and connected with another device. Scan the three barcodes below and also ensure you have a good passkey. See chapter 2.2 on page 4 how to do this.

First we want to check the Bluetooth settings to avoid surprises.

In the settings you need to select the tab for the Serial ports. Click the right arrow until it appears.

Here we see which port is assigned, in my case is outgoing assigned to COM8. Ensure the service is

active and choose the security options to your needs.

Page 10 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

Now open the Bluetooth Manager. There might be already some devices. In the screen shot there are no devices yet. Click on New, then

Connect.

Select search for Bluetooth devices, then click next. You can click on either of the marked buttons.

Now the Imager appears in the list. Mark it and click next.

If the Imager was not found, did you made it discoverable? See chapter 4.1 on page 9 for more

details.

After a few seconds it shows the service “Serial Port Server Port 1”, select it and click next.

If it does not show the service, click back and try it again.

Page 11 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

For the tests I used the freeware tty.exe as a terminal program. Open COM8.

The Bluetooth Browser opens and let you select the device that shall be connected as COM8.

Select the Imager, then click OK.Sometimes while the tests, the WidComm stack

seamed to hang. This lasted for more than a Minute. Perhaps it searches for devices.

Sometimes even a warm boot was required.

The Imager chirps to show that its connected, then you can scan a barcode and it appears on the

screen.

4.2.2 Pocket PC 2003 with Drakar (Socket) stack (D9500 and D7900)

Before you start, you might want to make sure the Imager is not paired and connected with another device. Scan the three barcodes below and also ensure you have a good passkey. See chapter 2.2 on page 4 how to do this.

Page 12 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

First we want to check the Bluetooth settings to avoid surprises.

If the Bluetooth icon is missing, you need to enable Bluetooth in the device settings (Radio Manager).

Ensure your device has a name of your choice and setup the other setting according your needs.

Here you can see which Com-Port gets used.Click OK.

Now we start the search for devices.

This window shows the known devices, in my case it is empty. Click onto the Search icon (two eyes).

Click Next.

Page 13 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

Ensure that “Any Bluetooth device” is checked, then click next.

This takes some time...

It found the Imager, check it and click next.If the Imager was not found, did you made it

discoverable? See chapter 4.1 on page 9 for more details.

Enter the Passkey (PIN), click Reply.

This takes some time... Click Finish.

Page 14 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

4.3 USB dongles and regular PCsSince Bluetooth is a fairly new technology, there exist several options for the PC side. All have their specific issues. In general you have to be patient because some functions take more than a minute to complete.

4.3.1 Win XP with the Microsoft BT stackStarting with the service pack 2, there is a Bluetooth driver stack with Windows XP.

Before you start, you might want to make sure the Imager is not paired and connected with another device. Scan the three barcodes below and also ensure you have a good passkey. See chapter 2.2 on page 4 how to do this.

Page 15 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

Open the Bluetooth devices (can be found in the Taskbar). You might see some known devices.

To search for new devices, click the “Add...” button.

After some time you see the Imager. Mark it and click next.

If the Imager was not found, did you made it discoverable? See chapter 4.1 on page 9 for more

details.

Now enter the passkey (default is 1234).See chapter 2.2 on page 4 for more details about

the PIN.

Windows connects to the device... Here you can see the used COMxx ports.

Page 16 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

You can also find a list of ports in the Bluetooth devices.

4.3.2 Win XP with the WidComm stackThe screenshots below where taken with version 3.0.1.915 of the WidComm Stack. There are many different versions out, so your specific millage might vary.

Before you start, you might want to make sure the Imager is not paired and connected with another device. Scan the three barcodes below and also ensure you have a good passkey. See chapter 2.2 on page 4 how to do this.

Open “My Bluetooth places”.

Click on “View devices in range” in the left area. The Imager appears with a question mark. No

double click onto it.If the Imager was not found, did you made it

discoverable? See chapter 4.1 on page 9 for more details.

Page 17 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

It might take some time until the icon changes to this connector view.

Double click onto the connector icon or right click and select “Connect to Bluetooth Serial Port”.

This takes some time,No the Icon changes again to show that we are

connected.

Right click and select properties to see the dialog below.

4.3.3 Win XP with the BlueSoleil stackThe BlueSoleil stack claims to be the most user friendly Bluetooth stack. You can easily test that by downloading it from their web site (http://www.bluesoleil.com). The stack runs in demo mode (5MB max transfer).The resulting virtual ComPorts (SerialPorts) are not visible by all programs. It uses a deprecated method to register with the operating system1. With the exception of the outdated method, the stack works nice and reliable. The tested version is V1.6.1.4 Release 050606, Stack Version 05.04.05.20050408.

Before you start, you might want to make sure the Imager is not paired and connected with another device. Scan the three barcodes below and also ensure you have a good passkey. See chapter 2.2 on page 4 how to do this.

1Users of the terminal program YAT3 should update to V3.1.0.107.

Page 18 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

Open the BlueSoleil Window.Caution: In the task bar there might be two

Bluetooth icons, one for the BlueSoleil (dark blue) and one for the MS Stack (light blue).

If the Imager is not listed yet, then start a search.

Now the Imager appears in the “orbit”.If the Imager was not found, did you made it

discoverable? See chapter 4.1 on page 9 for more details.

Double click onto the Imagers Icon, then enter the passkey.

See chapter 2.2 on page 4 for more details about the passkey.

Now the icon of the SerialPorts changes to yellow.

Right click onto the Imagers Icon, select SerialPort A or B.

Page 19 of 23

Adaptus Bluetooth Imagers4 Connecting to third party devices

Last revision of this document: 2006-12-14

The icon of the SerialPorts changes to green.

Find the assigned port in the status. (right click)

Page 20 of 23

Adaptus Bluetooth Imagers5 Troubleshooting

Last revision of this document: 2006-12-14

5 Troubleshooting

Sometimes the Bluetooth stacks seam to hang. If it does not recover after a few minutes, try restarting your PC or PDA. Try a warm boot first on a PDA. In case of the Widcomm stack a hanger appeared after changing the passkey of the Imager. It seams there is a problem with the stack. This could be duplicated with other devices as well, so it is not the Imagers fault.

Below is a barcode that resets the Imager in case you want to do that.

To remove any traces of a connected device from the Imager, scan the barcode below.

Set the Imager to factory defaults.

5.1 Linking with the base after experimentsIf you experimented with third party devices, and then want to link with the base again, you will like this section. It contains all steps to achieve this.The following steps assume you did not change anything in the base meanwhile.

COMMAND COMMENTSSets the Imager to work with the base.

Ensure it is not linked to another device.

If the above does not help, did you lock the base? See page 8 for details.If the above does not help, try the factory defaults barcode.

Page 21 of 23

Adaptus Bluetooth Imagers6 Adanced communication

Last revision of this document: 2006-12-14

6 Adanced communication

This chapter explains some details about the serial communication and how to communicate with the Imager.

6.1 Access the Imager via the baseThe Bluetooth Imagers use the same command set as its wired brothers. However you need a way to address a specific Imager connected to the base. This is done with a prefix to the command.

Wired command Wireless command

[SYN]M[CR]COMMAND [SYN]M[CR]:NAME:COMMAND

The NAME can be an '*' if you want to talk to all linked images at once (nice if you only have one Imager).See more details in the system manual, chapter 10: Serial Programming Commands.

6.2 Access the Imager via any Bluetooth dongleThis is a simple case, the command sequences are exactly the same as for a wired Imager. See more details in the system manual, chapter 10: Serial Programming Commands.

Page 22 of 23

Adaptus Bluetooth Imagers7 FAQ

Last revision of this document: 2006-12-14

7 FAQ

What is Bluetooth pairing?Pairing is a special process used when two devices connect for the first time. The pairing process is used to generate a link key that is used for authentication purposes during subsequent Bluetooth connections between the two devices.

What is Bluetooth bonding?This is a synonym for pairing.

What is the difference between a passkey and a PIN?Well, actually they are synonyms to each other for most Bluetooth devices. A PIN usually means digits only, but good devices can use alphanumerics for a much better security.

Third party device: Every time when my device went out of the receive range, I have to reconnect manually.Bluetooth is not designed for automatic reconnection. This has to be handled on application level. Unfortunately that means involving the user for most driver stacks.

Third party device: What kind of connection do I get?The Imagers offer a serial port emulation.

The Imager and the base do not find each other when I place the Imager into the base.Did you link the Imager to a third party device? Then it is probably setup that way. Scan the barcode BT_DNG0. In chapter 4.1 on page 9.Did you change the passkey on any side? The passkey must be the same for both devices.

How can I create secure passkeys?With the freeware program KeePass (http://keepass.sourceforge.net) you can create and maintain secure passkeys.

What is the maximum data rate of Bluetooth technology?An asymmetric data rate (one way) of 721Kb/s (while permitting 57.6Kb/s in the return direction); and symmetric rate of 432.6Kb/s is possible according to Bluetooth spec.

Where can I find more information on Bluetooth?There are many website. Just to name a few:www.bluetooth.comwww.bluetoothcentral.comwww.pocketpcfaq.comwww.broadcom.comwww.bluejackq.combluesniff.shmoo.com

Page 23 of 23