当前位置: 首页 > news >正文

蓝牙设备中的Device UUID 与 Service UUID

Device UUID也可以被称作为DeviceID。

Android 设备上扫描获取到的 deviceId 为外围设备的 MAC 地址,相对固定。
iOS 设备上扫描获取到的 deviceId 是系统根据外围设备 MAC 地址及发现设备的时间生成的 UUID,是设备上的Core Bluetooth为该设备分配的标识符。对于已连接过的设备,UUID 会在一段时间内保持不变(正常是15-20分钟变化一次)。
此外,UUID 也会在某些条件下可能会发生变化(如系统蓝牙模块重启、配对设备被忽略等),在不同的设备上获取到的 UUID 也是不同的。不同手机连接同一设备的uuid不是同一个。

问题:

这样无法确认对应的的设备是哪一台,要是断连后就不知道上一台设备是哪一台,由此提出一个方案就是可以在蓝牙的扫描响应包中去添加上本设备的MAC地址,这样不管是IOS还是安卓设备这样都可以识别到唯一设备。

SerivceId就是Service UUID。

蓝牙设备的ID,通过此ID可以进行连接蓝牙设备,连接成功之后可以获取serviceId,serviceId可以有多个,每个serviceId可以看作是服务,每个serviceId中可以定义多个uuid(特征值)。

Service UUID已经有了很多特定的,也可以自己定义。
特定的:{0000xxxx-0000-1000-8000-00805F9B34FB}

xxxx = 0x0000 ~ 0xFFFE
GATT Service 0x1800 Generic Access
GATT Service 0x1801 Generic Attribute
GATT Service 0x1802 Immediate Alert
GATT Service 0x1803 Link Loss
GATT Service 0x1804 Tx Power
GATT Service 0x1805 Current Time
GATT Service 0x1806 Reference Time Update 
GATT Service 0x1807 Next DST Change 
GATT Service 0x1808 Glucose
GATT Service 0x1809 Health Thermometer
GATT Service 0x180A Device Information
GATT Service 0x180D Heart Rate
GATT Service 0x180E Phone Alert Status 
GATT Service 0x180F Battery
GATT Service 0x1810 Blood Pressure
GATT Service 0x1811 Alert Notification
GATT Service 0x1812 Human Interface Device
GATT Service 0x1813 Scan Parameters
GATT Service 0x1814 Running Speed and Cadence
GATT Service 0x1815 Automation IO
GATT Service 0x1816 Cycling Speed and Cadence
GATT Service 0x1818 Cycling Power
GATT Service 0x1819 Location and Navigation
GATT Service 0x181A Environmental Sensing
GATT Service 0x181B Body Composition
GATT Service 0x181C User Data
GATT Service 0x181D Weight Scale
GATT Service 0x181E Bond Management 
GATT Service 0x181F Continuous Glucose Monitoring 
GATT Service 0x1820 Internet Protocol Support
GATT Service 0x1821 Indoor Positioning 
GATT Service 0x1822 Pulse Oximeter
GATT Service 0x1823 HTTP Proxy
GATT Service 0x1824 Transport Discovery 
GATT Service 0x1825 Object Transfer 
GATT Service 0x1826 Fitness Machine
GATT Service 0x1827 Mesh Provisioning 
GATT Service 0x1828 Mesh Proxy
GATT Service 0x1829 Reconnection Configuration 
GATT Service 0x183A Insulin Delivery 
GATT Service 0x183B Binary Sensor
GATT Service 0x183C Emergency Configuration
GATT Service 0x183E Physical Activity Monitor 
GATT Service 0x1843 Audio Input Control 
GATT Service 0x1844 Volume Control

http://www.lryc.cn/news/2685.html

相关文章:

  • 【学习记录】PCA主成分分析 SVD奇异值分解
  • 用 Python 调用 GPT-3 API
  • 类和对象实操之【日期类】
  • 微搭中如何实现弹性布局
  • 九龙证券|外资强势出手!这只科创板百元股,被疯狂加仓
  • 51单片机最强模块化封装(4)
  • 五、Git本地仓库基本操作——分支管理
  • vscode搭建python Django网站开发环境
  • 【mybatis】实现分页查询
  • CF1560D Make a Power of Two 题解
  • C#开发的OpenRA的读取文件的函数
  • SpringBoot结合XXL-JOB实现定时任务
  • 【Node.js】 创建web服务器
  • 基于go语言实现RestFul交互
  • 情感溢出:读《浣溪沙》
  • 深入解读.NET MAUI音乐播放器项目(一):概述与架构
  • 【Python小游戏】某程序员将套圈游戏玩儿到了巅峰,好嗨哟~Pygame代码版《牛牛套圈》已上线,大人的套圈游戏太嗨了,小孩勿进。
  • php的declare命令如何使用?
  • 嵌软工程师要掌握的硬件知识2:一文看懂什么开漏和推挽电路(open-drain / push-pull)
  • 1.2.6存储结构-磁盘管理:单缓冲区与双缓冲区读取、流水线周期、计算流水线执行时间
  • 【pytest接口自动化测试】结合单元测试框架pytest+数据驱动模型+allure
  • 展锐平台WIFI吞吐问题解决方案
  • 全局向量的词嵌入(GloVe)
  • 华为OD机试 - 特异性双端队列(Python),真题含思路
  • 【Linux】操作系统进程概念
  • C语言const的用法详解
  • Day886.MySQL的“饮鸩止渴”提高性能的方法 -MySQL实战
  • 08- 数据升维 (PolynomialFeatures) (机器学习)
  • 2023备战金三银四,Python自动化软件测试面试宝典合集(二)
  • 笔试题-2023-紫光展锐-数字芯片设计【纯净题目版】