This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BTool GATT_AddService GATT_Add_Attribute

 BTool GATT_AddService Add_Attribute 成功之后,attribute没有值,请问如何设置值?

GATT_DB_OFF_CHIP已经打开。

 

[1] : <Info> - 05:30:42.871

Port opened at 2018/2/12 17:30:42

--------------------------------------------------------------------

[2] : <Tx> - 05:30:43.043

-Type           : 0x01 (Command)

-OpCode         : 0xFE00 (GAP_DeviceInit)

-Data Length    : 0x26 (38) byte(s)

 ProfileRole    : 0x08 (8) (Central)

 MaxScanRsps    : 0x05 (5)

 IRK            : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

 CSRK           : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

 SignCounter    : 0x00000001 (1)

Dump(Tx):

0000:01 00 FE 26 08 05 00 00 00 00 00 00 00 00 00 00 ...&............

0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

0020:00 00 00 00 00 00 01 00 00 00                   ..........

--------------------------------------------------------------------

[3] : <Rx> - 05:30:43.074

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-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                      .........

--------------------------------------------------------------------

[4] : <Rx> - 05:30:43.090

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x2C (44) bytes(s)

 Event          : 0x0600 (1536) (GAP_DeviceInitDone)

 Status         : 0x00 (0) (Success)

 DevAddr        : 94:E3:6D:A9:A8:94

 DataPktLen     : 0x001B (27)

 NumDataPkts    : 0x0C (12)

 IRK            : CA:1B:0C:15:F0:45:C3:04:AC:90:72:BD:3B:A7:0F:12

 CSRK           : 81:F9:28:63:4A:1E:64:75:7E:AB:2B:62:AA:9E:22:7D

Dump(Rx):

0000:04 FF 2C 00 06 00 94 A8 A9 6D E3 94 1B 00 0C CA ..,......m......

0010:1B 0C 15 F0 45 C3 04 AC 90 72 BD 3B A7 0F 12 81 ....E....r.;....

0020:F9 28 63 4A 1E 64 75 7E AB 2B 62 AA 9E 22 7D    .(cJ.du~.+b.."}

--------------------------------------------------------------------

[5] : <Tx> - 05:30:43.168

-Type           : 0x01 (Command)

-OpCode         : 0xFE31 (GAP_GetParam)

-Data Length    : 0x01 (1) byte(s)

 ParamID        : 0x15 (21) (Minimum Link Layer Connection Interval, 

                  When Using Connection Establishment 

                  Proc (mSec). TGAP_CONN_EST_INT_MIN)

Dump(Tx):

0000:01 31 FE 01 15                                  .1...

--------------------------------------------------------------------

[6] : <Tx> - 05:30:43.183

-Type           : 0x01 (Command)

-OpCode         : 0xFE31 (GAP_GetParam)

-Data Length    : 0x01 (1) byte(s)

 ParamID        : 0x16 (22) (Maximum Link Layer Connection Interval, 

                  When Using Connection Establishment 

                  Proc (mSec). TGAP_CONN_EST_INT_MAX)

Dump(Tx):

0000:01 31 FE 01 16                                  .1...

--------------------------------------------------------------------

[7] : <Tx> - 05:30:43.199

-Type           : 0x01 (Command)

-OpCode         : 0xFE31 (GAP_GetParam)

-Data Length    : 0x01 (1) byte(s)

 ParamID        : 0x1A (26) (Link Layer Connection Slave Latency, When Using 

                  Connection Establishment Proc (mSec) TGAP_CONN_EST_LATENCY)

Dump(Tx):

0000:01 31 FE 01 1A                                  .1...

--------------------------------------------------------------------

[8] : <Rx> - 05:30:43.199

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x08 (8) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFE31 (GAP_GetParam)

 DataLength     : 0x02 (2)

 ParamValue     : 0x0050 (80)

Dump(Rx):

0000:04 FF 08 7F 06 00 31 FE 02 50 00                ......1..P.

--------------------------------------------------------------------

[9] : <Tx> - 05:30:43.214

-Type           : 0x01 (Command)

-OpCode         : 0xFE31 (GAP_GetParam)

-Data Length    : 0x01 (1) byte(s)

 ParamID        : 0x19 (25) (Link Layer Connection Supervision Timeout, 

                  When Using Connection Establishment 

                  Proc (mSec). TGAP_CONN_EST_SUPERV_TIMEOUT)

Dump(Tx):

0000:01 31 FE 01 19                                  .1...

--------------------------------------------------------------------

[10] : <Rx> - 05:30:43.214

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x08 (8) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFE31 (GAP_GetParam)

 DataLength     : 0x02 (2)

 ParamValue     : 0x0050 (80)

Dump(Rx):

0000:04 FF 08 7F 06 00 31 FE 02 50 00                ......1..P.

--------------------------------------------------------------------

[11] : <Rx> - 05:30:43.230

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x08 (8) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFE31 (GAP_GetParam)

 DataLength     : 0x02 (2)

 ParamValue     : 0x0000 (0)

Dump(Rx):

0000:04 FF 08 7F 06 00 31 FE 02 00 00                ......1....

--------------------------------------------------------------------

[12] : <Rx> - 05:30:43.261

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x08 (8) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFE31 (GAP_GetParam)

 DataLength     : 0x02 (2)

 ParamValue     : 0x07D0 (2000)

Dump(Rx):

0000:04 FF 08 7F 06 00 31 FE 02 D0 07                ......1....

--------------------------------------------------------------------

[13] : <Tx> - 05:30:54.119

-Type           : 0x01 (Command)

-OpCode         : 0xFDFC (GATT_AddService)

-Data Length    : 0x05 (5) byte(s)

 UUID           : 0x2800 (10240)

 NumAttrs       : 0x0003 (3)

 EncKeySize     : 0x10 (16)

Dump(Tx):

0000:01 FC FD 05 00 28 03 00 10                      .....(...

--------------------------------------------------------------------

[14] : <Rx> - 05:30:54.150

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x06 (6) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFDFC (GATT_AddService)

 DataLength     : 0x00 (0)

Dump(Rx):

0000:04 FF 06 7F 06 00 FC FD 00                      .........

--------------------------------------------------------------------

[15] : <Tx> - 05:31:12.121

-Type           : 0x01 (Command)

-OpCode         : 0xFDFE (GATT_AddAttribute)

-Data Length    : 0x03 (3) byte(s)

 UUID           : 03:28

 Permissions    : 0x03 (3) (GATT_PERMIT_READ

                  GATT_PERMIT_WRITE)

Dump(Tx):

0000:01 FE FD 03 03 28 03                            .....(.

--------------------------------------------------------------------

[16] : <Rx> - 05:31:12.152

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x06 (6) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFDFE (GATT_AddAttribute)

 DataLength     : 0x00 (0)

Dump(Rx):

0000:04 FF 06 7F 06 00 FE FD 00                      .........

--------------------------------------------------------------------

[17] : <Tx> - 05:31:19.001

-Type           : 0x01 (Command)

-OpCode         : 0xFDFE (GATT_AddAttribute)

-Data Length    : 0x03 (3) byte(s)

 UUID           : 01:F0

 Permissions    : 0x03 (3) (GATT_PERMIT_READ

                  GATT_PERMIT_WRITE)

Dump(Tx):

0000:01 FE FD 03 01 F0 03                            .......

--------------------------------------------------------------------

[18] : <Warning> - 05:31:19.048

The Last 4 Bytes In The Following Message Were Not Decoded

(Message Has More Than The Expected Number Of Data Bytes)

--------------------------------------------------------------------

[19] : <Rx> - 05:31:19.048

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x0A (10) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFDFE (GATT_AddAttribute)

 DataLength     : 0x04 (4)

Dump(Rx):

0000:04 FF 0A 7F 06 00 FE FD 04 01 00 03 00          .............

--------------------------------------------------------------------

[20] : <Tx> - 05:31:26.520

-Type           : 0x01 (Command)

-OpCode         : 0xFD04 (ATT_FindInfoReq)

-Data Length    : 0x06 (6) byte(s)

 ConnHandle     : 0xFFFE (65534)

 StartHandle    : 0x0001 (1)

 EndHandle      : 0xFFFF (65535)

Dump(Tx):

0000:01 04 FD 06 FE FF 01 00 FF FF                   ..........

--------------------------------------------------------------------

[21] : <Rx> - 05:31:26.551

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x06 (6) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFD04 (ATT_FindInfoReq)

 DataLength     : 0x00 (0)

Dump(Rx):

0000:04 FF 06 7F 06 00 04 FD 00                      .........

--------------------------------------------------------------------

[22] : <Rx> - 05:31:26.567

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x13 (19) bytes(s)

 Event          : 0x0505 (1285) (ATT_FindInfoRsp)

 Status         : 0x00 (0) (Success)

 ConnHandle     : 0xFFFE (65534)

 PduLen         : 0x0D (13)

 Format         : 0x01 (1) (A List Of 1 Or More Handles With Their 16-bit Bluetooth UUIDs)

 Handle         : 0001

 Uuid           : 00:28

 Handle         : 0002

 Uuid           : 03:28

 Handle         : 0003

 Uuid           : 01:F0

Dump(Rx):

0000:04 FF 13 05 05 00 FE FF 0D 01 01 00 00 28 02 00 .............(..

0010:03 28 03 00 01 F0                               .(....

--------------------------------------------------------------------

[23] : <Rx> - 05:31:26.582

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x06 (6) bytes(s)

 Event          : 0x0505 (1285) (ATT_FindInfoRsp)

 Status         : 0x1A (26) (The Procedure Is Completed)

 ConnHandle     : 0xFFFE (65534)

 PduLen         : 0x00 (0)

Dump(Rx):

0000:04 FF 06 05 05 1A FE FF 00                      .........

--------------------------------------------------------------------

[24] : <Tx> - 05:31:39.640

-Type           : 0x01 (Command)

-OpCode         : 0xFD8A (GATT_ReadCharValue)

-Data Length    : 0x04 (4) byte(s)

 ConnHandle     : 0xFFFE (65534)

 Handle         : 0x0001 (1)

Dump(Tx):

0000:01 8A FD 04 FE FF 01 00                         ........

--------------------------------------------------------------------

[25] : <Rx> - 05:31:39.671

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x06 (6) bytes(s)

 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

 Status         : 0x00 (0) (Success)

 OpCode         : 0xFD8A (GATT_ReadCharValue)

 DataLength     : 0x00 (0)

Dump(Rx):

0000:04 FF 06 7F 06 00 8A FD 00                      .........

--------------------------------------------------------------------

[26] : <Rx> - 05:31:39.686

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x08 (8) bytes(s)

 Event          : 0x050A (1290) (ATT_ReadReq)

 Status         : 0x00 (0) (Success)

 ConnHandle     : 0xFFFE (65534)

 PduLen         : 0x02 (2)

 Handle         : 0x0001 (1)

Dump(Rx):

0000:04 FF 08 0A 05 00 FE FF 02 01 00                ...........

--------------------------------------------------------------------

[27] : <Error> - 05:32:09.670

Att Read Command Failed

Status = Timed Out Performing Function

--------------------------------------------------------------------

[28] : <Rx> - 05:32:09.670

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (Event)

-Data Length    : 0x06 (6) bytes(s)

 Event          : 0x050B (1291) (ATT_ReadRsp)

 Status         : 0x17 (23) (Timed Out Performing Function)

 ConnHandle     : 0xFFFE (65534)

 PduLen         : 0x00 (0)

Dump(Rx):

0000:04 FF 06 0B 05 17 FE FF 00                      .........

--------------------------------------------------------------------

下图为正常设备,value可以获取