Connection manager bugs and misses

4 posts / 0 new
Last post
brian
Offline
Last seen:5年11个月前
Expert Master
加入:2014-10-16 18:10
Connection manager bugs and misses

For a central developer the Connection Manager is perhaps the only reliable source for using the SW. It shows exactly what structs are used, the order of procedures, and the src_id and dst_id values. However, I have noted a few bugs
1. The name of the task is incorrect in some cases. Look at this sequence at the very start:
====> [13:34:08.859] Tx <====
Src Task : 0x3f (TASK_APP)
Dst Task : 0xd (TASK_GAPM)
味精Id: 0 x3402(差距M_RESET_CMD)
Payload : 02 34 0d 00 3f 00 01 00 01

====> [13:34:08.865] Rx <====
Src Task : 0xd (TASK_GAP)
Dst Task : 0x3f (TASK_APP)
Msg Id : 0x3400 (GAPM_CMP_EVT(GAPM_RESET))
Status : 0x0
Payload : 00 34 3f 00 0d 00 02 00 01 00
Note that the Rx has the wrong task. It should be TASK_GAPM, TASK_GAP does not exist. It seems most of the RXs have that issue, but TASK_GATTC appears to be okay in the characteristic discovery responses

2. The struct name (message id) is sometimes incorrect. Look at the bonding/pairing request
====> [13:34:39.042] Tx <====
Src Task : 0x3f (TASK_APP)
Dst Task : 0xe (TASK_GAPC)
Msg Id : 0x3812 (GAPC_BOND_CMD)
The 0b is the operation of the GAPC_BOND_CMD I believe
Oob : 0x0
Io Cap : 0x3
Auth : 0x1
Key Size : 0x10
iKey Dist : 0x1
rKey Dist : 0x1
sec_req : 0x0
Payload : 12 38 0e 00 3f 00 08 00 0b 03 00 01 10 01 01 00

====> [13:34:40.656] Rx <====
Src Task : 0x000e (TASK_GAP)
Dst Task : 0x003f (TASK_APP)
Msg Id : 0x3815 (GAPC_BOND_IND)
info : 0x7
data.auth : 0x30
data.reason : 0x30

====> [13:34:40.676] Rx <====
Src Task : 0x000e (TASK_GAP)
Dst Task : 0x003f (TASK_APP)
Msg Id : 0x3813 (GAP_BOND_REQ_IND)
request : 0x7
auth_req : 0x10
key_size : 0x10
tk_type : 0x10
Payload : 13 38 3f 00 0e 00 02 00 07 10
The RX Msg Id in the second RX should be GAPC_BOND_REQ_IND. The one above does not exist
And yes, the RX Src Tasks should be TASK_GAPC

3. Not all elements of the struct are displayed and they may be displayed out of order compared with the payload. This is more of an enhancement request.
Look at the bonding request TX
====> [13:34:39.042] Tx <====
Src Task : 0x3f (TASK_APP)
Dst Task : 0xe (TASK_GAPC)
Msg Id : 0x3812 (GAPC_BOND_CMD)
Oob : 0x0
Io Cap : 0x3
Auth : 0x1
Key Size : 0x10
iKey Dist : 0x1
rKey Dist : 0x1
sec_req : 0x0
Payload : 12 38 0e 00 3f 00 08 00 0b 03 00 01 10 01 01 00
The 'operations' element of the GAPC_BOND_CMD is not displayed but it is in the payload (0x0b)
The order of the struct is not the displayed order. It should be
0b operation [would be nice to add the complete struct]
03 io cap
00 oob
01 auth
10 key size
01 iKey
01 rKey
00 sec_req

4. The connection handle and conidx are not displayed.
This additional information would be very helpful to see how these items are used when connecting to more than one device. The documentation is very sketchy here, and the profiles are inconsistent with the what is required and what is defined as 'instances'.

In some sense some of these are minor, but important when someone is trying to learn how the SW works. The documentation for centrals is sketchy at best and this tool gives the best example of working code. Its a lot easier to go from here to the documentation.

JE_Dialog
Offline
Last seen:19 min 44 sec ago
Staff
加入:2013-12-05 14:02
thankyou Brian.... i will

thankyou Brian.... i will submit these inputs to the tools development team. We are due a major new SDK release mid of January, so i will ask them to include your inputs. I'm unlikely to get a response right now as many of the team have just started their XMAS vacation...

BR JE_Dialog.

brian
Offline
Last seen:5年11个月前
Expert Master
加入:2014-10-16 18:10
That would be great. 'Finding

That would be great. 'Finding' this application has solved more problems for me about how to code a central using this API more than any of the documentation or examples. What took me so long is that AVG reports that it has a nasty virus and I dared not install it. I installed it on another system with no ill effects and then had to kill AVG to install it on my system.

JE_Dialog
Offline
Last seen:19 min 44 sec ago
Staff
加入:2013-12-05 14:02
Hello Brian.

Hello Brian.

SW team gave me feedback yesterday "We will add your change request to TODO list for the new SDK release" - that will be in mid-late January on SDK3.0.8.

thanks again,

BR JE_Dialog