Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: How "thorough" is GAP_DeviceInit?

$
0
0

Now, this is getting even more strange; consider the following HCI Tester script, run against a CC2540 USB dongle running the factory firmware:

Send_GAP_DeviceInit 8, 3, 0, 0, 1
Send_GAP_EstablishLinkReq 0, 0, 0, "44:57:6E:E5:C5:78"
Send_GAP_TerminateLinkReq 0

It produces this output:

22:53:20.950 --
22:53:20.950 Packet "GAP_DeviceInit", Opcode 0xfe00
22:53:20.950 Parameters:
22:53:20.950 | profileRole      : 8 (GAP_PROFILE_CENTRAL)
22:53:20.950 | maxScanResponses : 3
22:53:20.950 | IRK              : "0"
22:53:20.950 | CSRK             : "0"
22:53:20.950 | signCounter      : 1
22:53:20.950 --
22:53:20.950 Outgoing Dump:
22:53:20.950     0000: 01 00 fe 26 08 03 00 00 00 00 00 00 00 00 00 00 ...&............
22:53:20.950     0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
22:53:20.950     0020: 00 00 00 00 00 00 01 00 00 00                   ..........
22:53:20.950 Incoming Dump:
22:53:20.950     0000: 04 ff 06 7f 06 00 00 fe 00                      .........
22:53:20.981 --
22:53:20.981 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
22:53:20.997 Parameters:
22:53:20.997 | Event Opcode : 0x067f (CommandStatus)
22:53:20.997 | Status       : 0x00 (SUCCESS)
22:53:20.997 | opCode       : 0xfe00 (GAP_DeviceInit)
22:53:20.997 | dataLen      : 0x00
22:53:20.997 --
22:53:20.997 Incoming Dump:
22:53:20.997     0000: 04 ff 2c 00 06 00 69 78 70 e5 c5 78 1b 00 04 e3 ..,...ixp..x....
22:53:20.997     0010: 84 e6 88 06 08 d0 c0 c9 1c 7c 55 db 21 19 da 8a .........|U.!...
22:53:20.997     0020: 1e 48 e5 14 36 c5 0f 3c 50 df d1 f9 59 f3 41    .H..6..<P...Y.A
22:53:21.028 --
22:53:21.028 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
22:53:21.044 Parameters:
22:53:21.044 | Event Opcode : 0x0600 (GAP_DeviceInitDone)
22:53:21.044 | Status       : 0x00 (SUCCESS)
22:53:21.044 | devAddr      : "78:C5:E5:70:78:69"
22:53:21.044 | dataPktLen   : 0x001b
22:53:21.044 | numDataPkts  : 0x04
22:53:21.044 | IRK          : "E3:84:E6:88:06:08:D0:C0:C9:1C:7C:55:DB:21:19:DA"
22:53:21.044 | CSRK         : "8A:1E:48:E5:14:36:C5:0F:3C:50:DF:D1:F9:59:F3:41"
22:53:21.044 --
22:53:21.870 --
22:53:21.870 Packet "GAP_DeviceInit", Opcode 0xfe00
22:53:21.870 Parameters:
22:53:21.870 | profileRole      : 8 (GAP_PROFILE_CENTRAL)
22:53:21.870 | maxScanResponses : 3
22:53:21.870 | IRK              : "0"
22:53:21.870 | CSRK             : "0"
22:53:21.870 | signCounter      : 1
22:53:21.870 --
22:53:21.870 Outgoing Dump:
22:53:21.870     0000: 01 00 fe 26 08 03 00 00 00 00 00 00 00 00 00 00 ...&............
22:53:21.870     0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
22:53:21.870     0020: 00 00 00 00 00 00 01 00 00 00                   ..........
22:53:21.870 Incoming Dump:
22:53:21.870     0000: 04 ff 06 7f 06 00 00 fe 00                      .........
22:53:21.902 --
22:53:21.902 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
22:53:21.917 Parameters:
22:53:21.917 | Event Opcode : 0x067f (CommandStatus)
22:53:21.917 | Status       : 0x00 (SUCCESS)
22:53:21.917 | opCode       : 0xfe00 (GAP_DeviceInit)
22:53:21.917 | dataLen      : 0x00
22:53:21.917 --
22:53:21.917 Incoming Dump:
22:53:21.917     0000: 04 ff 2c 00 06 00 69 78 70 e5 c5 78 1b 00 04 e3 ..,...ixp..x....
22:53:21.917     0010: 84 e6 88 06 08 d0 c0 c9 1c 7c 55 db 21 19 da 8a .........|U.!...
22:53:21.917     0020: 1e 48 e5 14 36 c5 0f 3c 50 df d1 f9 59 f3 41    .H..6..<P...Y.A
22:53:21.948 --
22:53:21.948 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
22:53:21.964 Parameters:
22:53:21.964 | Event Opcode : 0x0600 (GAP_DeviceInitDone)
22:53:21.964 | Status       : 0x00 (SUCCESS)
22:53:21.964 | devAddr      : "78:C5:E5:70:78:69"
22:53:21.964 | dataPktLen   : 0x001b
22:53:21.964 | numDataPkts  : 0x04
22:53:21.964 | IRK          : "E3:84:E6:88:06:08:D0:C0:C9:1C:7C:55:DB:21:19:DA"
22:53:21.964 | CSRK         : "8A:1E:48:E5:14:36:C5:0F:3C:50:DF:D1:F9:59:F3:41"
22:53:21.964 --
22:53:25.272 --
22:53:25.272 Packet "GAP_EstablishLinkReq", Opcode 0xfe09
22:53:25.272 Parameters:
22:53:25.272 | highDutyCycle : 0 (Disabled)
22:53:25.272 | whiteList     : 0 (Disabled)
22:53:25.272 | addrTypePeer  : 0 (ADDRTYPE_PUBLIC)
22:53:25.272 | peerAddr      : "44:57:6E:E5:C5:78"
22:53:25.272 --
22:53:25.272 Outgoing Dump:
22:53:25.272     0000: 01 09 fe 09 00 00 00 78 c5 e5 6e 57 44          .......x..nWD
22:53:25.427 Incoming Dump:
22:53:25.427     0000: 04 ff 06 7f 06 11 09 fe 00                      .........
22:53:25.458 --
22:53:25.458 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
22:53:25.489 Parameters:
22:53:25.489 | Event Opcode : 0x067f (CommandStatus)
22:53:25.489 | Status       : 0x11 (bleAlreadyInRequestedMode)
22:53:25.489 | opCode       : 0xfe09 (GAP_EstablishLinkReq)
22:53:25.489 | dataLen      : 0x00
22:53:25.489 --
22:55:03.100 --
22:55:03.115 Packet "GAP_TerminateLinkReq", Opcode 0xfe0a
22:55:03.115 Parameters:
22:55:03.115 | connectionHandle : 0
22:55:03.115 --
22:55:03.115 Outgoing Dump:
22:55:03.115     0000: 01 0a fe 02 00 00                               ......
22:55:03.214 Incoming Dump:
22:55:03.214     0000: 04 ff 06 7f 06 12 0a fe 00                      .........
22:55:03.261 --
22:55:03.261 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff
22:55:03.276 Parameters:
22:55:03.276 | Event Opcode : 0x067f (CommandStatus)
22:55:03.276 | Status       : 0x12 (bleIncorrectMode)
22:55:03.276 | opCode       : 0xfe0a (GAP_TerminateLinkReq)
22:55:03.276 | dataLen      : 0x00
22:55:03.276 --

So, "EstablishLinkReq" returns bleAlreadyInRequestedMode, even when called immediately after a GAP_DeviceInit !

How do I reset the CC254X using the software commands?


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>