Home About us Questions Send money Contacts Terms


http://acme.systems

Please note:This article is obsolete or related to an obsolete product.

How to use an USB Bluetooth adapter

Bluetooth is a radio-frequency communication protocol. This article explains how to use an USB Bluetooth adapter on the FOX Board

"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 via a secure, globally unlicensed short-range radio frequency" from (Wikipedia Bluetooth definition).

This article explains how to use an USB Bluetooth adapter on the FOX Board and how to implements some services on it like device scanning and object pushing.

Quick start guide

To quickly try bluetooth on your FOX Board you need:

Download a ready to use flash image for your FOX Board model:

and flash it on your FOX Board (see How to reflash a FOX Board).

Login your FOX Board and type:

# cdBluez-start
Using /lib/modules/2.6.15/kernel/net/bluetooth/bluetooth.ko
Using /lib/modules/2.6.15/kernel/net/bluetooth/l2cap.ko
Using /lib/modules/2.6.15/kernel/net/bluetooth/rfcomm/rfcomm.ko
Using /lib/modules/2.6.15/kernel/drivers/bluetooth/hci_usb.ko

with this command you start the Bluetooth stack. Now turn on a Bluetooth device and scan the active devices typing:

# hcitool scan

If everything is OK you should obtain the Bluetooth devices address list.

Scanning ...
        00:16:20:8F:BA:60       Z520i
        00:12:56:C2:88:17       Sergio
        08:00:46:EA:CA:12       NOME-YOMKTFIKO9

To found the devices who gets available OPUSH services type:

# sdptool search OPUSH
Inquiring ...
Searching for OPUSH on 00:16:20:8F:BA:60 ...
Service Name: OBEX Object Push
Service RecHandle: 0x10005
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100

Now you can try to send and image to your mobile. For example let we send this TUX Case image:

If you have your FOX Board connected to internet you can get this image directly from the Acme site typing:

# cd /mnt/flash
# wget http://80.241.169.67/articles/00112/tuxcase.jpg
Connecting to 80.241.169.67[80.241.169.67]:80
tuxcase.jpg          100% |*****************************|  4710       00:00 ETA

Then to send it to your mobile type:

# ussp-push 00:16:20:8F:BA:60@5 tuxcase.jpg tuxcase.jpg
name=tuxcase.jpg, size=4710
Local device 00:02:72:81:4A:EC
Remote device 00:16:20:8F:BA:60 (5)
Connection established
If everything goes ok you will have the TUX Case on your mobile phone:

The format of ussp-push command is:

# ussp-push addressdevice@channel localfile remotefile

BlueZ libraries

The Bluetooth stack is implemented by different layers:
  1. Radio communication layer. In the lower hardware level layer.
  2. Link manager layer, used to connect physically the devices
  3. HCI layer (Host Controller Interface) This layer is used to link phisically the devices with the operative system.
  4. L2Cap layer. The Logical Link Control & Adaptation Protocol, to link logically the devices.
  5. Application layer. This layer is used to communicate with applications using different profiles.

Some implementations on the fifth layer are:

BlueZ is the official Bluetooth protocol stack for Linux (www.bluez.org).
It provides the libraries to interface the applications with the Bluetooth utilities and services.

OpenOBEX

"OpenOBEX is an open source implementation of the Object Exchange (OBEX) protocol. OBEX is a session protocol and can best be described as a binary HTTP protocol. OBEX is optimised for ad-hoc wireless links and can be used to exchange all kind of objects like files, pictures, calendar entries (vCal) and business cards (vCard)" (definition from http://openobex.triq.net)

ussp-push

Ussp-push is a OBEX object pusher for Linux, using the BlueZ Bluetooth stack. With this utility it is possible to send a file to a remote Bluetooth device.

How to enable the Bluetooth support inside the FOX Board SDK

Inside the SDK root directory tyoe:
# make menuconfig
Then enable the Bluetooth support from this voices:
Driver settings
  Bluetooth BlueZ libraries and tools
		[*] OpenObex
		[*] ussp-push
Then save, exit and type:
# ./configure
...
# make
Now reflash your board with the new fimage.

Related links

Credits

Thanks to Gabriele Giottoli co-founder of:


http://www.confinidigitali.it

a company involved in creating technological products with a high degree of innovation. Confinidigitali offers its experience in the hardware and software design based on the Acme Systems FOX Board following the customer in all the stages of product development.




Acme Systems srl
Via Aldo Moro 53 - 00055 Ladispoli (RM) - Italy
P.IVA/C.F. 08114831004
Tel +39.06.99.12.187 - Fax +39.06.622.765.31
http://www.acmesystems.it
Iscritta al Registro delle Imprese di Roma al n. 08114831004


Atmel© Certified Partner

Documentation Terms of Use
Acme Systems provides this documentation "as is" without warranty or guarantees of any kind. The maintainer of this site (Sergio Tanzilli), has gone to a great deal of effort into making this documentation as correct as possible. Acme Systems does not provide any direct support for the Open Source preinstalled software but does provide, through these pages and forum posts, all of the information required to obtain the sources, install, use and update the Open Source software that can be run on the Acme platforms. Please note that all of the preinstalled software, used on the Acme Systems products, are Open Source and you will need to check the license terms provided (usually the GPL) by each author before using it in any commercial or non-commercial product, by yourself. Before sending emails or calling the Acme staff please note that WE ARE MAINLY HARDWARE DESIGNERS and NOT LINUX GURUS and therefore ask that you post your questions directly to the forum listed below and ensure that all of the site contributors and large software community will read and reply to your questions.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Creative Commons License