Specifications
P25 Development Guide
www.bluebamboo.com
62
4.4.2 Setting up a Serial Port profile (SPP) Connection
We demonstrate Bluetooth printing using the SPP profile, this is the only one Windows CE
natively supports. The basic steps to set up a Bluetooth SPP connection are:
• Inquiry: Find nearby devices in range. This will result with all access points responding with
their address.
• Paging: The device will invoke a baseband procedure called paging. This results in
synchronization of the device with the access point, in terms of its clock offset and phase in the
frequency hop, among other required initializations.
• Link establishment: The LMP will now establish a link with the access point. As the application
in this case is printing, an SPP link will be used. Various setup steps will be carried out as
described below.
• Service Discovery: The LMP will use the SDP (Service Discovery Protocol) to discover what
services are available from the access point, in particular whether SPP access or access to the
relevant host is possible from this access point or not. Let us assume that the service is available,
otherwise, the application cannot proceed further. The information regarding the other services
offered at the access point may be presented to the user.
• L2CAP channel: With information obtained from SDP, the device will create an L2CAPchannel
to the access point. This may be used by the application or another protocol like RFCOMM may
be run over it.
• Security: If the access point restricts its access to a particular set of users or otherwise offers
secure mode communications to people having some prior registration with it, then at this stage,
the access point will send a security request for “pairing”. This will be successful if the user knows
the correct PIN code to access the service. Note that the PIN is not transmitted over the wireless
channel but another key generated from it is used, so that the PIN is difficult to compromise.
Encryption will be invoked if secure mode is used.
• SPP: COM Port Emulation is used after a virtual COM port is created. (The reference code uses
COM7: as the default virtual COM port)
4.4.3 Needed Components for this Demonstration
The following is a list of the needed components to duplicate this demonstration:
• Host Device Running P25 with Bluetooth module supporting SPP profile
• Reference Code (virtual COM port mapping of SPP profile)
• Blue Bamboo P25 Printer
4.4.4 Procedure
Using the Reference Code:
1. When the application is started it first appears minimized in the tray.
a. If the application was previously run and a device bonded to the virtual port, the
connection will automatically reestablish.
2. Open up the dialog by clicking icon in tray.
a. If the virtual port connection is established, there will be a message displayed in the
lower left of the dialog indicating the connected device address, the virtual com port and
whether the connection is running or stopped.
b. If there is no virtual port connection established the message will state “No Bonding”
3. To establish a connection to a device through the virtual com port:
a. Click “Scan Device”
b. Highlight the desired device from list.
c. Click “Select Device”; Dialog will close if connected.
d. Open dialog to verify bonding.
e. Click “Cancel” to close dialog.
NOTE: to be able to print from within a Windows CE application (eg: Wordpad), the WinCE
PCL printer driver must be included/built into the platform (it is included as of WinCE
Version 4.20-1.80.)