Personal tools
You are here: Home Embedded gumstix Device servers Bluetooth
Log in


Forgot your password?
 

Bluetooth

Bluetooth_logo.gif

Contents

Introduction

Bluetooth is an industrial specification for wireless personal area networks (PANs). Bluetooth provides a way to connect and exchange information between devices such as mobile phones, laptops, PCs, printers, digital cameras, and video game consoles over a secure, globally unlicensed short-range radio frequency.

Protocols

  • L2CAP - Logical Link Control and Adaptation Protocol is used within the Bluetooth protocol stack. It passes packets to either the Host Controller Interface (HCI) or on a hostless system, directly to the Link Manager. L2CAP is used to communicate over the host ACL (Asynchronous Connectionless) link. Its connection is established after the ACL link has been setup.
  • RFCOMM is the abbreviation for Radio Frequency Communication. The Bluetooth protocol RFCOMM is a simple set of transport protocols, made on top of the L2CAP protocol, providing emulated RS-232 serial ports (up to sixty simultaneous connections of a bluetooth device at a time).

Tango Device Server settings

#---------------------------------------------------------
# SERVER Bluetooth/gumstix, Bluetooth device declaration
#---------------------------------------------------------
Bluetooth/gumstix/DEVICE/Bluetooth: "gumstix/bluetooth/1"

Device Server

Attributes

  • Protocol (RFCOMM / L2CAP)

Commands

  • GetAdapters
  • Receive
  • Send

Implementation

  • BlueZ development libraries were used.
  • add headers:
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#include <bluetooth/rfcomm.h>

#include <bluetooth/l2cap.h>
  • to build the device server, it has to be link against libbluetooth

Document Actions