ESP_XuLZ wrote: ↑Fri Sep 16, 2022 5:08 am
可能是你周围广播设置只有 设备名称的ADV 结构数据, 你可以使用一个能自定义设置广播的设备(比如 手机 APP, ESP32设备)做下测试, 将其他广播数据和 设备名称广播数据放在一个 packet 包中(31 字节的 adv data 或者 scan_rsp data), 来看下是否会只扫描到 设备名称广播数据
一般来说,并不会出现你说的情况,如果将 其他广播数据和 设备名称广播数据 放在不同的packet 包中(31 字节的 adv data 或者 scan_rsp data)中,可能会出现不同时上来的情况
I (1619) name: PN771M Pen 0 12
I (1619) adv all: 0b 09 50 4e 37 37 31 4d 20 50 65 6e 00 00 00 00
I (1619) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1629) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (1629) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (3179) name: REM1-10010027 22 15
I (3179) adv: 50 46 31 56 31 2e 31
I (3179) adv all: 02 01 06 09 03 58 69 ff f1 09 02 70 de 08 ff 50
I (3179) adv all: 46 31 56 31 2e 31 0e 09 52 45 4d 31 2d 31 30 30
I (3189) adv all: 31 30 30 32 37 00 00 00 00 00 00 00 00 00 00 00
I (3189) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (4609) name: box-mybox 0 11
I (4609) adv all: 0a 09 62 6f 78 2d 6d 79 62 6f 78 00 00 00 00 00
I (4619) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (4619) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (4629) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (4969) name: DL_0047 0 9
I (4969) adv all: 08 09 44 4c 5f 30 30 34 37 00 00 00 00 00 00 00
I (4969) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (4969) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (4979) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (7489) name: Forerunner 235 0 24
I (7489) adv all: 10 09 46 6f 72 65 72 75 6e 6e 65 72 20 32 33 35
I (7489) adv all: 00 06 16 10 3e 00 12 00 00 00 00 00 00 00 00 00
I (7489) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (7499) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (7949) name: box-7ea 0 9
I (7949) adv all: 08 09 62 6f 78 2d 37 65 61 00 00 00 00 00 00 00
I (7949) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (7959) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (7959) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (8609) name: box-mybox 0 11
I (8609) adv all: 0a 09 62 6f 78 2d 6d 79 62 6f 78 00 00 00 00 00
I (8609) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (8619) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (8629) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (9389) name: DL_0042 0 9
I (9389) adv all: 08 09 44 4c 5f 30 30 34 32 00 00 00 00 00 00 00
I (9389) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (9399) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (9399) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (10209) name: REM1-10010027 0 15
I (10209) adv all: 0e 09 52 45 4d 31 2d 31 30 30 31 30 30 32 37 00
I (10209) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (10209) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (10219) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (11969) name: DL_0047 0 9
I (11969) adv all: 08 09 44 4c 5f 30 30 34 37 00 00 00 00 00 00 00
I (11969) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (11969) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (11979) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (14509) name: Forerunner 235 0 24
I (14509) adv all: 10 09 46 6f 72 65 72 75 6e 6e 65 72 20 32 33 35
I (14509) adv all: 00 06 16 10 3e 00 12 00 00 00 00 00 00 00 00 00
I (14519) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (14519) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (15609) name: box-mybox 0 11
I (15609) adv all: 0a 09 62 6f 78 2d 6d 79 62 6f 78 00 00 00 00 00
I (15609) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (15619) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (15629) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (18949) name: box-7ea 0 9
I (18949) adv all: 08 09 62 6f 78 2d 37 65 61 00 00 00 00 00 00 00
I (18949) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (18959) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (18959) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (21459) name: Forerunner 235 0 24
I (21459) adv all: 10 09 46 6f 72 65 72 75 6e 6e 65 72 20 32 33 35
I (21459) adv all: 00 06 16 10 3e 00 12 00 00 00 00 00 00 00 00 00
I (21469) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (21479) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (22259) name: REM1-10010027 0 15
I (22259) adv all: 0e 09 52 45 4d 31 2d 31 30 30 31 30 30 32 37 00
I (22259) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (22269) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I (22269) adv all: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
扫描的部分log ,REM1-10010027 这个是我自己的设备, 在从机端0xFF 广播字段加了一段数据50 46 31 56 31 2e 31, 第一次扫描的时候大概率可以扫到这个字段, 随后基本就再也扫不到了.
name: REM1-10010027 0 15 第二个数字是adv_data_len 第三个数据是scan_rsp_len