Tag Archive

Below you'll find a list of all posts that have been tagged as "bluetooth"
blogImage

How to Add Custom Profiles in Bluetooth - Part 1

OverviewThis article describes the procedure to add a custom Bluetooth profile for sharing the temperature and humidity data over Bluetooth. The article is split into two; the first part will brief on the Bluetooth technology and Bluetooth profiles while the second part gives details on the addition of custom Bluetooth GATT profile. We assume the reader has some knowledge on the Bluetooth technology, during writing of this article.[Brief overview of BluetoothAs we all know Bluetooth is a wireless communication technology, which is found in almost all the mobile phones. The range of these wireless communication medium is based on the Bluetooth device type. There are two types of Bluetooth devices, Single mode and Dual mode devices. Single mode Bluetooth devices are devices which either support BR/EDR or LE profiles. Dual mode devices support both BR/EDR and LE profiles. The range for BR/EDR devices is 10 meters and the range for LE devices is around 1-2 meters. The figure below shows the Bluetooth stack and the details of the stack are given as below.Software Layers in BluetoothAs we can see from the above figure, Bluetooth software stack is layered implementation. A brief overview of the layers of Bluetooth stack (seen in the above figure) are as below.Bluetooth RadioBluetooth Radio operates in the 2.4 GHz ISM band (same as the Wi-Fi, ZigBee etc.). It uses a frequency hopping mechanism with 79 channels to combat interference with other channels which operate in the same frequency spectrum. This layer is responsible for the following primary tasks:Transmission and Reception of packets over the airSupport appropriate power class of the device, for LE devices (power consumption is less)Baseband Controller (also referred to as the Link Controller)The Baseband controller performs the following major functions:Management of physical channels and linksManages frequency hopping for transmitting and receiving packetsManagement of formation of piconet and scatternetHandles packets formation for Bluetooth radio transmissionInquiry and Inquiry ScanConnection and Page ScanSecurity (including data encryption)Power management (including low power modes)Link ManagerThe Link Manager performs the functions of link setup and control. The LMP supports connection control (creation and removal of a connection), security (authentication, pairing, and encryption), informational requests (characteristics exchange), role switch, also handles logical transports, Quality of Service and link supervision.Host Controller Interface (HCI)The Host Controller Interface (HCI) provides uniform method for accessing the controller’s capabilities. The HCI layer provides an interface for the host to talk to the controller. The host sends HCI command packets to the controller and is asynchronously notified by the controller using HCI events. The LE controllers use a reduced set of HCI commands. There are four types of packets that can be sent on the HCI Interface.HCI Command Packet.HCI Asynchronous (ACL) Data Packet.HCI Synchronous Data Packet.HCI Event Packet.L2CAP layer (Logical Link Control and Adaptation Protocol)The L2CAP layer acts as an interface between the higher layer protocols and the lower layers. L2CAP provides the abstraction of channels to layers on top of it. Following are some of the features supported by the L2CAP layer:Fixed channel identifiersFragmentation and Defragmentation of dataMultiplexing and demultiplexing of various channels over a shared logical linkRFCOMMThe RFCOMM protocol layer is on top of the L2CAP layer. RFCOMM layer provides emulated RS-232 serial ports. The Bluetooth serial port profile is based on this protocol. It is used directly by many telephony related profiles to send AT commands, and used as transport layer for OBEX over Bluetooth. In the protocol stack, RFCOMM is bound to L2CAP.SDPSDP protocol layer is used to allow devices to discover what services are supported by each other, and what parameters to use to connect to them. SDP is used to determine which Bluetooth profiles are supported by the Bluetooth device (like headset profile, hands free profile, advanced audio distribution profile, etc.) and the protocol multiplexer settings needed to connect to each of them. Each service is identified by a Universally Unique Identifier (UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits rather than the full 128). In the protocol stack, SDP is bound to L2CAP.OBEXObject exchange is a communications protocol that facilitates the exchange of binary objects between devices. It is adopted by the Bluetooth Special Interest Group. In Bluetooth, OBEX is used for many profiles that require simple data exchange. In the protocol stack, OBEX is bound to RFCOMM.ATTATT protocol is like SDP protocol, but specially adapted and simplified for Low Energy Bluetooth. It allows a client to read and/or write certain attributes exposed by the server in a non-complex, low-power friendly manner. In the protocol stack, ATT is bound to L2CAP.Profiles in BluetoothBluetooth devices need to support appropriate profiles, to be able to work together for accomplishing a given task. A profile defines a usage case. Profiles are the “services” offered by a device. For two devices to interoperate to complete a user task, both devices must implement a common profile. Profiles are definitions of possible applications and specify general behaviours that Bluetooth enabled devices use to communicate with other Bluetooth devices. Profiles build on the Bluetooth standard to more clearly define what kind of data a Bluetooth module is transmitting. The device’s application determines which profiles it must support, from hands-free capabilities to heart rate sensors to alerts and more.For two Bluetooth devices to be compatible, they must support the same profiles. Profiles are different for Bluetooth BR/EDR and LE implementations. Compatibility between BR/EDR and LE implementations requires a dual-mode controller on at least one device for interoperability. For BR/EDR, a wide range of adopted Bluetooth profiles describe many different common types of applications or use cases for devices. For Bluetooth LE, developers have the option of using a comprehensive set of adopted profiles, or use the Generic Attribute Profile (GATT) to create new profiles.Below is a list of some commonly used Bluetooth Profiles:Advanced Audio Distribution Profile (A2DP)Audio/Video Remote Control Profile (AVRCP)Generic Object Exchange Profile (GOEP)Human Interface Device Profile (HID)Personal Area Networking Profile (PAN)Serial Port Profile (SPP)Service Discovery Profile (SDAP)SIM Access Profile (SAP, SIM)Basic Imaging Profile (BIP)Basic Printing Profile (BPP)Device ID Profile (DID)Dial-up Networking Profile (DUN)File Transfer Profile (FTP)Generic Access Profile (GAP)Hands-Free Profile (HFP)Headset Profile (HSP)Object Push Profile (OPP)GATT (Generic Attribute profile)Unlike GAP which broadcasts one-to-many, GATT uses a one-to-one connection between the board (server) and the phone (client). GATT establishes in detail how to exchange all profile and user data over a BLE connection. GATT uses the Attribute Protocol (ATT) as its transport protocol to exchange data between devices. This data is organized hierarchically in sections called services, which group conceptually related pieces of user data called characteristics.The second part of the article will discuss in more detail the fundamental aspects of GATT and addition of custom profiles.

Aziro Marketing

EXPLORE ALL TAGS
2019 dockercon
Advanced analytics
Agentic AI
agile
AI
AI ML
AIOps
Amazon Aws
Amazon EC2
Analytics
Analytics tools
AndroidThings
Anomaly Detection
Anomaly monitor
Ansible Test Automation
apache
apache8
Apache Spark RDD
app containerization
application containerization
applications
Application Security
application testing
artificial intelligence
asynchronous replication
automate
automation
automation testing
Autonomous Storage
AWS Lambda
Aziro
Aziro Technologies
big data
Big Data Analytics
big data pipeline
Big Data QA
Big Data Tester
Big Data Testing
bitcoin
blockchain
blog
bluetooth
buildroot
business intelligence
busybox
chef
ci/cd
CI/CD security
cloud
Cloud Analytics
cloud computing
Cloud Cost Optimization
cloud devops
Cloud Infrastructure
Cloud Interoperability
Cloud Native Solution
Cloud Security
cloudstack
cloud storage
Cloud Storage Data
Cloud Storage Security
Codeless Automation
Cognitive analytics
Configuration Management
connected homes
container
Containers
container world 2019
container world conference
continuous-delivery
continuous deployment
continuous integration
Coronavirus
Covid-19
cryptocurrency
cyber security
data-analytics
data backup and recovery
datacenter
data protection
data replication
data-security
data-storage
deep learning
demo
Descriptive analytics
Descriptive analytics tools
development
devops
devops agile
devops automation
DEVOPS CERTIFICATION
devops monitoring
DevOps QA
DevOps Security
DevOps testing
DevSecOps
Digital Transformation
disaster recovery
DMA
docker
dockercon
dockercon 2019
dockercon 2019 san francisco
dockercon usa 2019
docker swarm
DRaaS
edge computing
Embedded AI
embedded-systems
end-to-end-test-automation
FaaS
finance
fintech
FIrebase
flash memory
flash memory summit
FMS2017
GDPR faqs
Glass-Box AI
golang
GraphQL
graphql vs rest
gui testing
habitat
hadoop
hardware-providers
healthcare
Heartfullness
High Performance Computing
Holistic Life
HPC
Hybrid-Cloud
hyper-converged
hyper-v
IaaS
IaaS Security
icinga
icinga for monitoring
Image Recognition 2024
infographic
InSpec
internet-of-things
investing
iot
iot application
iot testing
java 8 streams
javascript
jenkins
KubeCon
kubernetes
kubernetesday
kubernetesday bangalore
libstorage
linux
litecoin
log analytics
Log mining
Low-Code
Low-Code No-Code Platforms
Loyalty
machine-learning
Meditation
Microservices
migration
Mindfulness
ML
mobile-application-testing
mobile-automation-testing
monitoring tools
Mutli-Cloud
network
network file storage
new features
NFS
NVMe
NVMEof
NVMes
Online Education
opensource
openstack
opscode-2
OSS
others
Paas
PDLC
Positivty
predictive analytics
Predictive analytics tools
prescriptive analysis
private-cloud
product sustenance
programming language
public cloud
qa
qa automation
quality-assurance
Rapid Application Development
raspberry pi
RDMA
real time analytics
realtime analytics platforms
Real-time data analytics
Recovery
Recovery as a service
recovery as service
rsa
rsa 2019
rsa 2019 san francisco
rsac 2018
rsa conference
rsa conference 2019
rsa usa 2019
SaaS Security
san francisco
SDC India 2019
SDDC
security
Security Monitoring
Selenium Test Automation
selenium testng
serverless
Serverless Computing
Site Reliability Engineering
smart homes
smart mirror
SNIA
snia india 2019
SNIA SDC 2019
SNIA SDC INDIA
SNIA SDC USA
software
software defined storage
software-testing
software testing trends
software testing trends 2019
SRE
STaaS
storage
storage events
storage replication
Storage Trends 2018
storage virtualization
support
Synchronous Replication
technology
tech support
test-automation
Testing
testing automation tools
thought leadership articles
trends
tutorials
ui automation testing
ui testing
ui testing automation
vCenter Operations Manager
vCOPS
virtualization
VMware
vmworld
VMworld 2019
vmworld 2019 san francisco
VMworld 2019 US
vROM
Web Automation Testing
web test automation
WFH

LET'S ENGINEER

Your Next Product Breakthrough

Book a Free 30-minute Meeting with our technology experts.

Aziro has been a true engineering partner in our digital transformation journey. Their AI-native approach and deep technical expertise helped us modernize our infrastructure and accelerate product delivery without compromising quality. The collaboration has been seamless, efficient, and outcome-driven.

Customer Placeholder
CTO

Fortune 500 company