Other Parts Discussed in Thread: CC2650, CC2640, CC2541
Hello,
I'm using CC2650 Host_Test project in the Network Processor Mode by using UART to communicate with HCITester on the computer.
In order to test the max PDU for BLE Stack function "HCI_SendControllerToHostEvent", I've created a new function HCI_EXT_UTIL_TEST_FUNCTION (opcode: 0xFE87) encapsulated under "processExtMsgUTIL" to be called by HCITester.
Here is my code (red part) in ble_dispatch.c:
Then, I've called the correspondant function opCode 0xFE87 in HCITester:
| 14:47:39.581 *** Script Started: *** |
| 14:47:39.581 -- |
| 14:47:39.581 Packet "UTIL_TestFunction", Opcode 0xfe87 |
| 14:47:39.581 Parameters: |
| 14:47:39.581 | Antenna Selection : 0xEC |
| 14:47:39.581 -- |
| 14:47:39.581 Outgoing Dump: |
| 14:47:39.581 0000: 01 87 fe 01 ec ..... |
| 14:47:39.597 Incoming Dump: |
| 14:47:39.597 0000: 04 ff f3 80 07 00 00 00 00 ec 01 01 01 01 01 01 ................ |
| 14:47:39.597 0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0050: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0060: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0070: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0080: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 0090: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.597 00a0: 01 . |
| 14:47:39.613 Incoming Dump: |
| 14:47:39.613 0000: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.613 0010: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.613 0020: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.613 0030: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.613 0040: 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 ................ |
| 14:47:39.613 0050: 01 01 01 01 01 ..... |
| 14:47:39.624 -- |
| 14:47:39.624 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff |
| 14:47:39.636 Parameters: |
| 14:47:39.636 | Event Opcode : 0x0780 (UTIL_TestFunction) |
| 14:47:39.636 | Status : 0x00 (SUCCESS) |
| 14:47:39.636 | connectionHandle : 0x0000 |
| 14:47:39.636 | CharacId : 0x00 |
| 14:47:39.636 | CharactLen : 0xec |
| 14:47:39.636 | value : "01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01:01" |
| 14:47:39.636 -- |
| 14:47:39.636 Incoming Dump: |
| 14:47:39.636 0000: 04 ff 06 7f 06 00 87 fe 00 ......... |
| 14:47:39.658 -- |
| 14:47:39.658 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff |
| 14:47:39.675 Parameters: |
| 14:47:39.675 | Event Opcode : 0x067f (CommandStatus) |
| 14:47:39.675 | Status : 0x00 (SUCCESS) |
| 14:47:39.675 | opCode : 0xfe87 (UTIL_UTIL_TestFunction) |
| 14:47:39.675 | dataLen : 0x00 |
| 14:47:39.675 -- |
| 14:47:39.688 -- |
| 14:47:39.688 Packet "UTIL_TestFunction", Opcode 0xfe87 |
| 14:47:39.688 Parameters: |
| 14:47:39.688 | Antenna Selection : 0xED |
| 14:47:39.688 -- |
| 14:47:39.688 Outgoing Dump: |
| 14:47:39.688 0000: 01 87 fe 01 ed ..... |
| 14:47:39.694 Incoming Dump: |
| 14:47:39.694 0000: 04 ff f4 80 07 00 00 00 00 ed 02 02 02 02 02 02 ................ |
| 14:47:39.694 0010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ............... |
| 14:47:39.709 Incoming Dump: |
| 14:47:39.709 0000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0020: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0030: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0040: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0050: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0060: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0070: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0080: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 0090: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 00a0: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.709 00b0: 02 02 02 02 02 02 02 02 ........ |
| 14:47:39.725 Incoming Dump: |
| 14:47:39.725 0000: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.725 0010: 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 ................ |
| 14:47:39.737 -- |
| 14:47:39.737 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff |
| 14:47:39.749 Parameters: |
| 14:47:39.749 | Event Opcode : 0x0780 (UTIL_TestFunction) |
| 14:47:39.749 | Status : 0x00 (SUCCESS) |
| 14:47:39.749 | connectionHandle : 0x0000 |
| 14:47:39.749 | CharacId : 0x00 |
| 14:47:39.749 | CharactLen : 0xed |
| 14:47:39.749 | value : "02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02:02" |
| 14:47:39.749 -- |
| 14:47:39.749 Incoming Dump: |
| 14:47:39.749 0000: 04 ff 06 7f 06 00 87 fe 00 ......... |
| 14:47:39.763 -- |
| 14:47:39.763 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff |
| 14:47:39.776 Parameters: |
| 14:47:39.776 | Event Opcode : 0x067f (CommandStatus) |
| 14:47:39.776 | Status : 0x00 (SUCCESS) |
| 14:47:39.776 | opCode : 0xfe87 (UTIL_UTIL_TestFunction) |
| 14:47:39.776 | dataLen : 0x00 |
| 14:47:39.776 -- |
| 14:47:39.789 -- |
| 14:47:39.789 Packet "UTIL_TestFunction", Opcode 0xfe87 |
| 14:47:39.789 Parameters: |
| 14:47:39.789 | Antenna Selection : 0xEE |
| 14:47:39.789 -- |
| 14:47:39.789 Outgoing Dump: |
| 14:47:39.789 0000: 01 87 fe 01 ee ..... |
| 14:47:39.805 Incoming Dump: |
| 14:47:39.805 0000: 04 ff 06 7f 06 00 87 fe 00 ......... |
| 14:47:39.819 -- |
| 14:47:39.819 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff |
| 14:47:39.832 Parameters: |
| 14:47:39.832 | Event Opcode : 0x067f (CommandStatus) |
| 14:47:39.832 | Status : 0x00 (SUCCESS) |
| 14:47:39.832 | opCode : 0xfe87 (UTIL_UTIL_TestFunction) |
| 14:47:39.832 | dataLen : 0x00 |
| 14:47:39.832 -- |
| 14:47:39.845 -- |
| 14:47:39.845 Packet "UTIL_TestFunction", Opcode 0xfe87 |
| 14:47:39.845 Parameters: |
| 14:47:39.845 | Antenna Selection : 0xEF |
| 14:47:39.845 -- |
| 14:47:39.845 Outgoing Dump: |
| 14:47:39.845 0000: 01 87 fe 01 ef ..... |
So I want to know what is exactly the max PDU for HCI_SendControllerToHostEvent function? And if we can send more then 238 bytes, what I've bad written in my test code?
Best regards,
Yang
