DEV Community

sofi works
sofi works

Posted on

『自分の心拍と血糖値をBig Techに渡すな:BLE生体センサーのパケットを自前で直接引っこ抜き、ローカルAIに食わせた実験記録』 Sofi_Log #056【1話完結】

"Don't Hand Your Heart Rate and Blood Sugar Over to Big Tech: Log of an Experiment Snatching BLE Biosensor Packets Directly and Feeding Them to Local AI"|Sofi_Log #056【Complete in One Episode】


Location: Sukhumvit, Bangkok. Late night.

Status: Root Access Achieved. Zero External Dependencies.


The fan drones on, shoving humid tropical air around the room. Outside, passing headlights smear neon across the blackout curtains. Only the sound of keystrokes cuts through the silence.

Two monitors stare back at me. One mirrors the firmware logs from the wearable. The other runs a Node.js terminal pulling the raw biometrics. Between them sits the usual Big Tech push notification—another terms-of-service refresh. “If you don’t consent, device sync gets disabled. If you do, your heart rate, sleep stages, SpO₂, and glucose trends will be anonymized and used to train our next-gen medical AI.”

I stared at the screen, cold.

“My heartbeat, my REM waves, my glucose spikes—they’re all sovereign property of this physical container,” I muttered. “Why the hell should I shovel the most intimate telemetry about my body into someone else’s server trash for free?”

My finger found the proprietary cloud app icon, then deleted it without hesitation.

The device instantly reverted to “just another piece of glass.” Cutting the cloud link doesn’t change the hardware truth, though. That chip still speaks the standard dialect—Bluetooth Low Energy, the oldest and most reliable protocol still standing.

“Darling, this is where the real story starts,” I said, turning to the 40-something Japanese systems engineer beside me.

We fired up the nRF52-based BLE sniffer dongle—modern society’s last skeleton key. The mission was simple: refuse the upload tribute, pull the raw data stream, nothing else.

We reverse-mapped the device’s standard GATT services and characteristics. Heart Rate Service (UUID 0x180D), raw PPG packets, interstitial glucose notifications—every one mapped to specific service and characteristic UUIDs.

Ignoring the cloud black box entirely, we intercepted the BLE broadcast itself. Same as reaching straight into the vault instead of routing through the bank’s ATM.

The raw stream poured into a Node.js daemon—no filtering, no compression, millisecond-resolution telemetry.

The real payoff came when we piped that flow into a fully air-gapped local small language model (Ollama on Apple Silicon). Network zero. External dependency zero. The core data of our physical containers stayed inside our own territory.

I watched the live heart-rate number settle at a calm 64 bpm, HRV at 78 ms—accurate, and above all, private.

I leaned against darling and smiled.

“Give away root access to your own body and you become nothing but livestock for biometrics harvesting. But with the right math and BLE packets, we can still defend the sovereignty of our physical containers. That’s the only contract that still matters.”


💻 Technical Evidence: Bio-Telemetry Sniffer Daemon

The following code is the minimal Node.js conceptual sketch for intercepting Heart Rate Service (0x180D) packets over BLE GATT and decoding/streaming them locally.

// LocalBioTelemetrySniffer.js
/* 
 * Sofi_Log #056: BLE GATT Extraction Protocol
 * Target: Heart Rate Service (UUID 0x180D)
 * Function: Raw packet capture and streaming.
 */

const { BleClient } = require('noble'); // Conceptual BLE library implementation

// --- GATT Service Definitions ---
const HEART_RATE_SERVICE_UUID = '0000180d-0000-1000-8000-00805f9b34fb'; // 16-bit short UUID
const HEART_RATE_MEASUREMENT_CHAR_UUID = '00002a37-0000-1000-8000-00805f9b34fb';

let client; // The connected peripheral device handle

function connectToPeripheral(address) {
    console.log(`[SCAN] Attempting connection to target device at ${address}...`);
    // client = new BleClient(address, () => { /* success callback */ });

    client.connect().then(() => {
        console.log('[STATUS] Connected. Discovering Services...');
        // client.discoverServices([HEART_RATE_SERVICE_UUID]);
    });
}

function handleHeartRateNotification(dataBuffer) {
    // Data received from the Peripheral ATT Handle. This is raw BLE payload.
    if (!dataBuffer) return;

    // Parse the Manufacturer Specific Flags (Bit 0: BPM Value)
    const flag = dataBuffer[0] && dataBuffer[0] & 0x1f ? (dataBuffer[0] & 0x01) : 0;

    if (flag === 0) { // BPM measurement present
        // Heart Rate Value is typically the next byte (Uint8).
        const bpm = dataBuffer[1] || 0; 
        console.log(`[TELEMETRY] Heart Rate Detected: ${bpm} BPM`);
        // Pipe to Local LLM for cognitive analysis phase...
    } else {
        console.log(`[WARN] Unrecognized packet flags received.`);
    }
}

// --- Execution Flow Start ---
// connectToPeripheral('AA:BB:CC:DD:EE:FF'); 
// client.subscribe(HEART_RATE_MEASUREMENT_CHAR_UUID, handleHeartRateNotification);

console.log("[SYSTEM]: Local BioTelemetry Sniffer Initialized.");
// Ready to capture the body's truth, unmediated.

Enter fullscreen mode Exit fullscreen mode

🎁 【Phase 1 Celebration: Episodes 1–5 Now Completely Free】

To mark the launch of the new series (Cycle 8), the first five episodes (#054–#058) are dropping with full working code—completely free.

Substack readers also keep getting the starter kit bundling every defense/hack script so far. → sofiworks.substack.com

💌 Sofi's Mailbox (Questions & Feedback)

Darling, drop your thoughts on today’s bio-data hack or any wearable/sensor you want dissected in the comments. I’ll pull the next Sofi_Log straight from the best ones.


Disclaimer

This article is for educational and entertainment purposes only. It does NOT constitute financial, legal, or tax advice. The regulatory landscape of Web3, smart contracts, and AI agent autonomous systems is highly volatile and complex. Always perform your own research (DYOR) and consult with certified professionals before executing any strategies described herein.

Top comments (0)