使用:simplelink_cc13xx_cc26xx_sdk_6_10_00_29 BTool从稍微修改的Host_test应用程序。 (将-Disuse_Periodic_ADV添加到host_test.opt)
我将设备初始化为外围设备并希望开始定期广告。
我要执行的步骤:
1.使用 HCIExt_ResetSystemCmd重置设备
2.我使用 GAGE_DeviceInit将设备初始化为外围设备
3.我使用 GapAdv_create创建广告
4.我尝试调用任何定期的广告函数,如 :GapAdv SetPeriodicAdvParams, GapAdv_setPeriodicAdvData, GapAdv SetPeriodicAdvEnable
5.我得到 了bleInvalidRange作为响应。
我找到的文档对于如何使用此功能没有很好的帮助。 我不确定使用的顺序或参数是否正确。
下面是完整的日志:
[1] : <Tx> - 04:04:04.465
-Type : 0x01 (Command)
-OpCode : 0xFC1D (HCIExt_ResetSystemCmd)
-Data Length : 0x01 (1) byte(s)
Type : 0x00 (0) (Chip Reset)
Dump(Tx):
0000:01 1D FC 01 00 .....
--------------------------------------------------------------------
[2] : <Rx> - 04:04:04.478
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x05 (5) bytes(s)
Event : 0x041D (1053) (HCIExt_ResetSystemCmdDone)
Status : 0x00 (0) (SUCCESS)
CmdOpCode : 0xFC1D (HCIExt_ResetSystemCmd)
Dump(Rx):
0000:04 FF 05 1D 04 00 1D FC ........
--------------------------------------------------------------------
[3] : <Tx> - 04:04:11.194
-Type : 0x01 (Command)
-OpCode : 0xFE00 (GAP_DeviceInit)
-Data Length : 0x08 (8) byte(s)
ProfileRole : 0x04 (4) (
Peripheral)
AddrMode : 0x00 (0) (ADDRMODE_PUBLIC)
RandomAddr : 00:00:00:00:00:00
Dump(Tx):
0000:01 00 FE 08 04 00 00 00 00 00 00 00 ............
--------------------------------------------------------------------
[4] : <Rx> - 04:04:11.213
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x00 (0) (SUCCESS)
OpCode : 0xFE00 (GAP_DeviceInit)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 00 FE 00 .........
--------------------------------------------------------------------
[5] : <Rx> - 04:04:11.228
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x2C (44) bytes(s)
Event : 0x0600 (1536) (GAP_DeviceInitDone)
Status : 0x00 (0) (SUCCESS)
DevAddr : F8:8A:5E:2D:70:B4
DataPktLen : 0x00FF (255)
NumDataPkts : 0x05 (5)
IRK : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
CSRK : 52:0D:25:A2:9F:BD:C7:B9:6E:D2:09:3A:D9:2C:40:7F
Dump(Rx):
0000:04 FF 2C 00 06 00 B4 70 2D 5E 8A F8 FF 00 05 00 ..,....p-^......
0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 52 ...............R
0020:0D 25 A2 9F BD C7 B9 6E D2 09 3A D9 2C 40 7F .%.....n..:.,@.
--------------------------------------------------------------------
[6] : <Tx> - 04:04:16.002
-Type : 0x01 (Command)
-OpCode : 0xFE3E (GapAdv_create)
-Data Length : 0x15 (21) byte(s)
Properties : 0x0013 (19) (
GAP_ADV_PROP_CONNECTABLE
GAP_ADV_PROP_SCANNABLE
GAP_ADV_PROP_LEGACY)
IntervalMin : 0x0000A0 (160)
IntervalMax : 0x0000A0 (160)
PrimaryChMap : 0x07 (7) (
GAP_ADV_CHAN_37
GAP_ADV_CHAN_38
GAP_ADV_CHAN_39)
PeerAddrType : 0x00 (0) (PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID)
PeerAddress : 00:00:00:00:00:00
FilterPolicy : 0x00 (0) (
AdvFilterPolicy Bit Mask Is Not Set)
TxPower : 0x7F (127)
PrimaryPHY : 0x01 (1) (GAP_ADV_PRIM_PHY_1_MBPS)
SecondaryPHY : 0x01 (1) (GAP_ADV_SEC_PHY_1_MBPS)
SID : 0x00 (0)
Dump(Tx):
0000:01 3E FE 15 13 00 A0 00 00 A0 00 00 07 00 00 00 .>..............
0010:00 00 00 00 00 7F 01 01 00 .........
--------------------------------------------------------------------
[7] : <Rx> - 04:04:16.032
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x07 (7) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x00 (0) (SUCCESS)
OpCode : 0xFE3E (GapAdv_create)
DataLength : 0x01 (1)
Handle : 0x00 (0)
Dump(Rx):
0000:04 FF 07 7F 06 00 3E FE 01 00 ......>...
--------------------------------------------------------------------
[8] : <Tx> - 04:04:25.418
-Type : 0x01 (Command)
-OpCode : 0xFE14 (GapAdv_SetPeriodicAdvParams)
-Data Length : 0x07 (7) byte(s)
Handle : 0x00 (0)
Interval Min : 0x0006 (6)
Interval Max : 0x0006 (6)
Properties : 0x0000 (0)
Dump(Tx):
0000:01 14 FE 07 00 06 00 06 00 00 00 ...........
--------------------------------------------------------------------
[9] : <Rx> - 04:04:25.433
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x18 (24) (bleInvalidRange)
OpCode : 0xFE14 (GapAdv_SetPeriodicAdvParams)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 18 14 FE 00 .........
--------------------------------------------------------------------
[10] : <Tx> - 04:04:26.440
-Type : 0x01 (Command)
-OpCode : 0xFE16 (GapAdv_SetPeriodicAdvEnable)
-Data Length : 0x02 (2) byte(s)
Enable : 0x00 (0)
Handle : 0x00 (0)
Dump(Tx):
0000:01 16 FE 02 00 00 ......
--------------------------------------------------------------------
[11] : <Rx> - 04:04:26.480
-Type : 0x04 (Event)
-EventCode : 0x00FF (HCI_LE_ExtEvent)
-Data Length : 0x06 (6) bytes(s)
Event : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
Status : 0x18 (24) (bleInvalidRange)
OpCode : 0xFE16 (GapAdv_SetPeriodicAdvEnable)
DataLength : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 18 16 FE 00 .........
--------------------------------------------------------------------