cybersecurity · beginner · ~15 min · safe pentest lab

BLE AD type

Read the AD type byte.

Challenge

The AD type is byte 1 (e.g. 0x01 = flags, 0x09 = complete local name). Implement int ad_type(const unsigned char *ad) returning ad[1].

Starter code

int ad_type(const unsigned char *ad) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.