Bluetooth is a wireless technology for creating personal networks operating in the 2.4 GHz unlicensed band, with a range of 10 meters. Networks are usually formed ad-hoc from portable devices such as cellular phones, handhelds, and laptops. Unlike Wi-Fi wireless technology, Bluetooth offers higher level service profiles, such as FTP-like file servers, file pushing, voice transport, serial line emulation, and more. RFCOMM(Radio Frequency Communication) protocol provides emulation of serial ports over the L2CAP protocol. RFCOMM is a simple transport protocol, with additional provisions for emulating the 9 circuits of RS-232 (EIATIA-232-E) serial ports. It supports up to 60 simultaneous connections (RFCOMM channels) between two Bluetooth devices. RFCOMM is intended to cover applications that make use of the serial ports of the devices in which they reside. The communication segment is a direct connect Bluetooth link from one device to another.
Bluetooth Low Energy(BLE) or Bluetooth LE, marketed as Bluetooth Smart, is a wireless personal area network technology designed and marketed by the Bluetooth Special Interest Group. Compared to Classic Bluetooth, Bluetooth Smart is intended to provide considerably reduced power consumption and cost while maintaining a similar communication range. Bluetooth Smart uses the same 2.4 GHz radio frequencies as Classic Bluetooth, which allows dual-mode devices to share a single radio antenna. LE does, however, use a simpler modulation system. Bluetooth v4.0 standard is the creation of dual-mode capabilities that allow for classic Bluetooth operation as well as Bluetooth low energy support – the best of both worlds. The latest Bluetooth specification uses a service-based architecture based on the attribute protocol (ATT). All communication in low energy takes place over the Generic Attribute Profile (GATT). An application or another profile uses the GATT profile so a client and server can interact in a structured way.The server contains a number of attributes, and the GATT Profile defines how to use the Attribute Protocol to discover, read, write and obtain indications. These features support a service-based architecture. The services are used as defined in the profile specifications. GATT enables you to expose service and characteristics defined in the profile specification.The GATT profile is also part of the core and defined in the core specification.
BlueZ: BlueZ is the Bluetooth stack for Linux kernel-based family of operating systems.
hci_le_set_scan_enable
hci_le_set_scan_parameters
hci_open_dev
BlueZ Bluetooth "C" API:
hci_inquiry
hci_open_dev
BLE "C" Programming Overview:
Call hci_le_set_scan_parameters to set options, setsockopt(SOL_HCI, HCI_FILTER, filter) to just get LE scan events and then callhci_le_set_scan_enable to turn on scanning(there's a function called hci_get_route to get an available device number). Each device connection was made with a socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP) which you then tell to connect to a particular device by calling connect on the socket with a struct sockaddr_l2 that has the particular device address in it.
ref:
Bluetooth specifications -
Bluetooth SIG(Special Interest Group) - https://www.bluetooth.org/en-us
Bluetooth developer portal - https://developer.bluetooth.org/TechnologyOverview/Pages/RFCOMM.aspx
BLE(Bluetooth Low Energy) - http://en.wikipedia.org/wiki/Bluetooth_low_energy
Bluetooth libraries - http://www.jenkinssoftware.com/raknet/manual/bluetooth.html
Linux Bluetooth library , BlueZ - http://www.bluez.org/
Introduction to Bluetooth programming - http://people.csail.mit.edu/albert/bluez-intro/
Best Practices for Bluetooth Development - http://commondatastorage.googleapis.com/io-2013/presentations/129%20-%20Bluetooth%20Best%20Practices.pdf
Bluetooth Specification RFCOMM with Application - http://hccc.ee.ccu.edu.tw/courses/bt/vg/rfcomm.pdf
Linux Bluetooth code -
Android Bluetooth overview - http://developer.android.com/guide/topics/connectivity/bluetooth.html
Android audio native programming using OpenSL ES - http://audioprograming.wordpress.com/2012/03/03/android-audio-streaming-with-opensl-es-and-the-ndk/
BlueNMEA is an Android application which sends location data over Bluetooth (RFCOMM) or TCP in the NMEA format - http://max.kellermann.name/projects/blue-nmea/
Android audio native programming using OpenSL ES - http://audioprograming.wordpress.com/2012/03/03/android-audio-streaming-with-opensl-es-and-the-ndk/
BlueNMEA is an Android application which sends location data over Bluetooth (RFCOMM) or TCP in the NMEA format - http://max.kellermann.name/projects/blue-nmea/
BlueZ Ble Server(Advertiser) - https://gist.github.com/AlexanderLea/8e4a7ff46dcfa42ce565
BlueZ Ble Client - https://github.com/carsonmcdonald/bluez-experiments/blob/master/experiments/scantest.c
BlueZ -
- BlueZ - http://www.bluez.org/, http://sourceforge.net/projects/bluez/
- How to setup Bluetooth - http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth
- BlueZ - https://wiki.archlinux.org/index.php/bluetooth
- Linux BlueZ programming introduction - http://people.csail.mit.edu/albert/bluez-intro/
- Linux BlueZ Howto - http://www.tik.ee.ethz.ch/~beutel/pub/bluezhowto.pdf
- Linux VHCI(Virtual Host Controller Interface) driver - https://sourceforge.net/projects/usb-vhci/