十年匠心定制 · 商业建站与技术教学双线并行 咨询热线:400-886-1026 service@lmnt.cn
ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

蓝牙学习之蓝牙地址

蓝牙学习之蓝牙地址 参考文章➀ IEEE Organizationally unique identifier➁ what-is-bluetooth-address-BD_ADDR组成LAP(LSB)UAPNAP(MSB)24 Bits8 Bits16BitsNAPNon-significant Address Part (2 bytes). Contains first 16 bits of the OUI. The NAP value is used in Frequency Hopping Synchronization frames.UAPUpper Address Part (1 byte). Contains remaining 8 bits of the OUI. The UAP value is used for seeding in various Bluetooth specification algorithms.LAPLower Address Part (3 bytes). This portion of Bluetooth Address is allocated by the vendor of device. The LAP value uniquely identifies a Bluetooth device as part of the Access Code in every transmitted frame.地址类型BLE Core SpecVol 6, Part B, §1.3.2规定random 地址的最高字节48-bit 地址的 bit[47:46]必须落在这三个编码之一。最高字节 bit[7:6]字节范围含义0b000x00–0x3FRandom private, non-resolvable0b010x40–0x7FRandom private, resolvable (RPA)0b100x80–0xBFReserved规范不允许出现0b110xC0–0xFFRandom static例如B0:82:E2:67:46:DBB010110000↑ ↑ bit1 bit0 U/L I/G bit0(I/G)0→ Individual单播非组播 bit1(U/L)0→ Universally administered即由 IEEE 统一分配的全局唯一地址bit[7:6]为0b10命中随机地址的保留区说明是公开地址。获取ethanG5000:~$ bluetoothctl devices Connected Device B0:82:E2:67:46:DB XXXXXX ethanG5000:~$ bluetoothctl info B0:82:E2:67:46:DB Device B0:82:E2:67:46:DB(public)上述命令可以获取蓝牙地址。并判断蓝牙地址是public地址还是random地址。实例BD: 3058902E8DFA其中NAP为3058UAP为90LAP为2E8DFA。NAPUAP为组织ID。以此可以在参考文章➀查阅到如下信息。OUI/MA-L Organization company_id Organization Address......30-58-90(hex)Frontier Silicon Ltd305890(base16)Frontier Silicon Ltd137Euston Road London NW12AA GB......在线查找ethanG5000:~$curl-shttps://api.macvendors.com/30:58:90echoFrontier Silicon Ltd
返回列表