BLE - The Standard for Wireless IoT
Bluetooth Low Energy (BLE), also known as Bluetooth Smart, is the dominant wireless technology for portable devices and IoT due to its extremely low power consumption.
BLE vs Bluetooth Classic
Bluetooth Classic
- Continuous audio streaming
- Large file transfers
- Consumption: 100+ mA active
- Use: Headphones, speakers
Bluetooth Low Energy
- Short, periodic transfers
- Consumption: <15mA TX, <1µA sleep
- Latency: 3-6ms
- Use: Wearables, beacons, sensors
BLE 5.x Specifications
BLE 5.0
- Range: 4x greater (LE Coded PHY)
- Throughput: 2x higher (2Mbps PHY)
- Advertising: 8x more data
BLE 5.1
- Direction Finding (AoA/AoD)
- Localization accuracy: <1m indoor
BLE 5.2
- LE Audio (LC3 codec)
- Isochronous channels
- Multi-stream audio
Protocol Structure
The BLE Stack
┌─────────────────────────┐
│ Application │
├─────────────────────────┤
│ GAP │ Generic Access Profile
├─────────────────────────┤
│ GATT │ Generic Attribute Profile
├─────────────────────────┤
│ ATT │ Attribute Protocol
├─────────────────────────┤
│ L2CAP │ Logical Link Control
├─────────────────────────┤
│ HCI │ Host Controller Interface
├─────────────────────────┤
│ Link Layer │
├─────────────────────────┤
│ Physical Layer │ 2.4 GHz Radio
└─────────────────────────┘
BLE Roles
Peripheral (Slave)
- Advertises presence
- Accepts connections
- Offers services (GATT Server)
- Example: Fitness band, beacon
Central (Master)
- Scans for peripherals
- Initiates connections
- Consumes services (GATT Client)
- Example: Smartphone, gateway
Advertising
Channels: 37, 38, 39 (avoids WiFi interference)
Types:
- Connectable: Allows connection
- Non-connectable: Broadcast only
- Scannable: Responds to scan request
BLE Data Model
GATT Structure
Profile - Collection of services for a use-case Service - Logical grouping of characteristics Characteristic - Data unit with properties Descriptor - Metadata for characteristic
Example: Heart Rate Profile
Heart Rate Service (UUID: 0x180D)
├── Heart Rate Measurement (0x2A37)
│ ├── Properties: Notify
│ └── CCCD Descriptor (enable notifications)
├── Body Sensor Location (0x2A38)
│ └── Properties: Read
└── Heart Rate Control Point (0x2A39)
└── Properties: Write
Standard Services (SIG)
Common:
- Battery Service (0x180F)
- Device Information (0x180A)
- Heart Rate (0x180D)
- Environmental Sensing (0x181A)
Custom Services:
- Own 128-bit UUID
- Custom characteristic definition
- Documentation for integration
Selecting the BLE Chip
Popular Options
Nordic nRF52 Series
- nRF52832: BLE 5.0, ARM Cortex-M4
- nRF52840: BLE 5.0, USB, Zigbee capable
- nRF52833: Direction finding
- Advantage: Excellent SDK, large community
Dialog DA1469x
- Ultra-low power
- Integrated audio codec
- Display controller
- Use: Premium wearables
Texas Instruments CC26xx
- Multi-protocol (BLE, Zigbee, Thread)
- Sensor controller for wake-up
- Use: Industrial, smart home
Silicon Labs EFR32
- BLE + Zigbee + Thread
- Gecko SDK
- Use: Multi-protocol IoT
Module vs Chip
Module (e.g., nRF52 Raytac MDBT42Q)
- Integrated antenna
- Certifications included (FCC, CE)
- Rapid time-to-market
- Premium cost
Chip (e.g., nRF52832 QFN)
- Design flexibility
- Optimized cost at volume
- Requires certification
- PCB with RF knowledge
Maximum Battery Autonomy
Low-Power Principles
Minimize Wake Time
- Process as fast as possible
- Sleep immediately after task
- Avoid polling, use interrupts
Reduce TX Power
- Adjust based on RSSI
- +4dBm vs 0dBm = 40% more current
- Short distance = reduced power
Optimize Advertising
- Larger interval = lower consumption
- 1000ms interval vs 100ms = 10x savings
- Balance: Discovery latency vs battery
Connection Parameters
Connection Interval
- Range: 7.5ms - 4s
- Trade-off: Latency vs consumption
- Negotiation with central
Slave Latency
- Skip connection events if nothing to send
- Major consumption reduction
Supervision Timeout
- Timeout for disconnect detection
- Too small = false reconnections
Typical nRF52 Consumption
- TX (+4dBm): 5.3mA
- RX: 5.4mA
- CPU active: 3mA
- System ON, RAM retention: 1.5µA
- System OFF: 0.3µA
Software Implementation
SDKs and Stacks
Nordic nRF Connect SDK (Zephyr based)
- Modern, cross-platform
- Bluetooth Host + Controller
- Thread, Zigbee support
- Open source
Nordic SoftDevice (legacy)
- Binary blob for controller
- Stable and tested API
- Still used in production
Zephyr RTOS
- Integrated Bluetooth stack
- Multi-vendor support
- Configurable and modular
Development Flow
1. GATT Definition
BT_GATT_SERVICE_DEFINE(my_service, BT_GATT_PRIMARY_SERVICE(&my_uuid), BT_GATT_CHARACTERISTIC(&char_uuid, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ, read_cb, NULL, &value), BT_GATT_CCC(ccc_cfg_changed, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), );
2. Advertising Setup
static const struct bt_data ad[] = { BT_DATA_BYTES(BT_DATA_FLAGS, BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR), BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, sizeof(DEVICE_NAME) - 1), }; bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0);
Communication Protection
Security Levels
Mode 1 (Encryption)
- Level 1: No security
- Level 2: Unauthenticated encryption (Just Works)
- Level 3: Authenticated encryption (PIN, OOB)
- Level 4: Authenticated LE Secure Connections
Mode 2 (Signing)
- Data signing without encryption
- Use: Authenticated broadcast
Pairing Methods
Just Works
- Zero user interaction
- Vulnerable to MITM
- Use: Devices without display/input
Passkey Entry
- 6-digit PIN
- MITM protection
- Requires display or input
Numeric Comparison
- Both devices display number
- User confirms match
- Most secure for devices with display
Out of Band (OOB)
- Key exchange through other channel (NFC, QR)
- Very secure
- Implementation complexity
Security Best Practices
- Enable bonding for trusted devices
- Use LE Secure Connections (BLE 4.2+)
- Implement app-level encryption for sensitive data
- Periodic key rotation
Implementation Validation
Development Tools
nRF Connect App (iOS/Android)
- Device scanning
- Connect and explore GATT
- Read/Write/Subscribe characteristics
- Log for debugging
Wireshark + nRF Sniffer
- Over-the-air packet capture
- Detailed protocol analysis
- Debug pairing issues
Nordic Power Profiler Kit
- Real-time consumption measurement
- Resolution: µA
- Correlation with software events
Testing Checklist
Functional:
- Advertising visible
- Stable connection
- All characteristics functional
- Notifications working
- Reconnect after disconnect
Interoperability:
- iOS (various versions)
- Android (various phones)
- Other centrals (gateways)
Power:
- Advertising consumption
- Idle connection consumption
- Active transfer consumption
- Sleep current
Range:
- Maximum distance in open field
- Performance through obstacles
Road to Market
Bluetooth SIG Certification
Required for:
- Bluetooth logo use
- Guaranteed interoperability
- Access to major markets
Process:
- Register as SIG member
- Qualification (QDID) for stack used
- Declaration (final product)
- Listing on bluetooth.com
Costs:
- Membership: $2,500 - $35,000/year (based on revenue)
- Declaration: $0-8,000 (based on membership level)
Radio Certifications
CE (Europe)
- RED (Radio Equipment Directive)
- EMC and radio testing
- Self-declaration (with test report)
FCC (USA)
- Part 15 for ISM band
- Unique FCC ID
- Testing at accredited lab
IC (Canada), MIC (Japan), etc.
- Similar requirements
- Required for export
Using Certified Module
Major Advantage:
- Radio certifications included
- Reduces time-to-market
- Lower cost than own certification
Conditions:
- Follow design guidelines (antenna, impedance)
- Don't modify RF parameters
- Include IDs in documentation
BLE for Your Product
Bluetooth Low Energy is the ideal choice for low-power wireless devices. With the right hardware and firmware, you can achieve years of autonomy on a coin cell battery.
Success Factors
- Right Hardware - Choose chip/module for your application
- Optimized Stack - Mature, production-tested SDK
- Power Design - Optimization from start, not at end
- Rigorous Testing - Interoperability and consumption
- Certification - Plan from design phase
Torcip BLE Services
Hardware Development:
- PCB design with RF
- Antenna selection and matching
- Production optimization
Firmware Development:
- Nordic nRF52/53 specialist
- Custom GATT profiles
- OTA updates
- Power optimization
Production:
- Assembly and testing
- Programming and provisioning
- Certification support
Completed Projects:
- Fitness wristbands
- Indoor positioning beacons
- Wireless industrial sensors
- Medical wearables
Contact us for a discussion about your BLE project and receive free technical consulting.