AOSP Framework & Internals
2 min read

WiFi, Bluetooth, GPS, NFC Drivers

A brief overview of how Android handles wireless connectivity radios at the kernel level.

A modern smartphone is essentially a massive radio array. It contains dedicated hardware chips for Wi-Fi, Bluetooth, GPS (GNSS), and NFC.

Unlike simple I2C sensors, these connectivity chips run their own complex firmware and require high-speed data buses (like PCIe or SDIO) to communicate with the main CPU.

Wi-Fi Drivers

Linux has a highly standardized networking stack. Android Wi-Fi drivers utilize the cfg80211 configuration API and the mac80211 framework.

  • The kernel driver represents the Wi-Fi chip as a standard network interface (usually wlan0).
  • The Android framework does not talk to the kernel driver directly. It talks to a native daemon called wpa_supplicant.
  • wpa_supplicant handles the complex WPA2/WPA3 cryptographic handshakes and tells the kernel driver to connect to the router.
# View the network interfaces and their IP addresses
adb shell ip addr show wlan0

Bluetooth Drivers

Bluetooth is divided into two layers: the Host (the software stack) and the Controller (the physical chip). They communicate using the standard HCI (Host Controller Interface) protocol.

  • The Linux kernel simply provides a transport layer (often a fast UART serial connection) to pass raw HCI packets between the CPU and the Bluetooth chip.
  • The actual "brains" of Bluetooth (handling audio streaming, pairing, and profiles) reside entirely in user-space, historically in the Fluoride stack, and more recently in the modern Gabeldorsche (Rust) stack.
# You can monitor live Bluetooth HCI packets for debugging using hcidump or btmon
adb shell dumpsys bluetooth_manager

GPS (GNSS) Drivers

Interestingly, GPS tracking requires very little data bandwidth. The GNSS (Global Navigation Satellite System) chip calculates your physical coordinates internally and spits out simple NMEA-formatted text strings over a standard serial port (UART).

The kernel driver is often just a simple serial UART driver. The heavy lifting is done by the user-space GNSS HAL, which parses the NMEA strings, applies assistance data (A-GPS) downloaded via cellular networks, and passes the final latitude/longitude to the LocationManagerService.

NFC Drivers

Near Field Communication (NFC) is used for Google Pay and reading tags. The NFC controller communicates over I2C or SPI.

The kernel driver provides a simple character device (e.g., /dev/pn544). The Android NFC service (a dedicated Java app) opens this device and sends raw NCI (NFC Controller Interface) commands to configure the chip for secure element transactions or tag reading.