SWRU580 April 2021 CC2564C , CC2564MODA , CC2564MODN
The demo application provides a description on how to use the demo application to connect two configured boards and communicate over bluetoothLE. The included application registers a custom service on a board when the stack is initialized.
Figure 7-2 HID Demo Register
Server Terminal
Figure 7-3 HID Demo Inquiry
Result Terminal
Figure 7-4 HID Demo SDP Record
Terminal
Figure 7-5 HID Demo Connect
Device Terminal
Figure 7-6 HID Demo Open
Indication TerminalInitiating a connection from the HID Device is the same as the procedure as the Host except that we run the inquiry(mentioned in Step 4) on the HID Device instead and issue a ConnectRemoteHIDHost <Inquiry Index> where the Inquiry Index is the number that corresponds to the BD-ADDR of the Host when we run the inquiry.
Figure 7-7 HID Demo Connect Device
Terminal 2
Figure 7-8 HID Demo Connect
Device TerminalOn the Deviced side, we get a hcVirtualCableUnplug indication.
Figure 7-9 HID Demo Control Indication TerminalThe Device controlRequest has no parameters. It does hcVirtualCableUnplug by defalt.
Figure 7-10 HID Demo Control Indication Terminal 2
Figure 7-11 HID Demo GetReportRequestOn the Device, we receive a get Report Indication with the Report Type, Id and size and Buffer size.
Figure 7-12 HID Demo Get Report Indication TerminalThe Device can respond to GetReportRequest using GetReportResponse. It needs the Result type (0 for rtSuccessful, 1 for rtNotReady, 2 for rtErrInvalidReportID, 3 for rtErrUnsupportedRequest, 4 for rtErrInvalidParameter, 5 for rtErrUnknown, 6 for rtErrFatal, 7 for rtData) and ReportType (0 for rtOther, 1 for rtInput, 2 for rtOutput, 3 for rtFeature) as parameters. For example we respond to the above rtInput request from the Host with rtData as Result type and rtInput as Report Type.
Figure 7-13 HID Demo Get Report Response TerminalThe Host gets a report Confirmation back.
Figure 7-14 HID Demo Get Report Confirmation Terminal
Figure 7-15 HID Demo SetReportRequest TerminalThe Device gets a Set Report Indication with the Report type.
Figure 7-16 HID Demo SetReport Indication TerminalThe Device can respond to SetReportRequest by issuing the SetReportResponse command. The only parameter it needs is Result type (0 for rtSuccessful, 1 for rtNotReady, 2 for rtErrInvalidReportID, 3 for rtErrUnsupportedRequest, 4 for rtErrInvalidParameter, 5 for rtErrUnknown, 6 for rtErrFatal, 7 for rtData). For example we respond to the above rtInput Report request using rtSuccesful.
Figure 7-17 HID Demo Set Report Response TerminalThe Host receives a Set Report confirmation indication with the Result type.
Figure 7-18 HID Demo Set Report Confirmation Terminal
Figure 7-19 HID Demo GetProtocolRequest TerminalThe Device gets a Protocol Indication.
Figure 7-20 HID Demo Get Protocol Indication TerminalThe Device can respond to the Protocol Request by issuing the GetProtocolResponse command. It requires two parameters, Result type (0 for rtSuccessful, 1 for rtNotReady, 2 for rtErrInvalidReportID, 3 for rtErrUnsupportedRequest, 4 for rtErrInvalidParameter, 5 for rtErrUnknown, 6 for rtErrFatal, and 7 for rtData) and Protocol (0 for ptBoot and 1 for ptReport). For example, we respond to the previous Request with rtData and ptBoot.
Figure 7-21 HID Demo Get Protocol Response Terminal 2The Host gets a protocol confirmation with the Result type and Protocol.
Figure 7-22 HID Demo Get Protocol Confirmation Terminal 2
Figure 7-23 HID Demo SetProtocolResponse Terminal 2The Host gets a Set Protocol Indication along with the protocol. It can respond to it by issuing the SetProtocolResponse command which requires Result type as the parameter (0 for rtSuccessful, 1 for rtNotReady, 2 for rtErrInvalidReportID, 3 for rtErrUnsupportedRequest, 4 for rtErrInvalidParameter, 5 for rtErrUnknown, 6 for rtErrFatal, and 7 for rtData).
Figure 7-24 HID Demo SetProtocolIndication Terminal 2We get a Protocol Confirmation with the Result type in the Host.
Figure 7-25 HID Demo Set Protocol Confirmation Terminal 2
Figure 7-26 HID Demo GetIdleRequest TerminalThe Device gets a GetIdleIndication.
Figure 7-27 HID Demo Get Idle Indication TerminalIt can respond to it with a GetIdleResponse which requires Result type (0 for rtSuccessful, 1 for rtNotReady, 2 for rtErrInvalidReportID, 3 for rtErrUnsupportedRequest, 4 for rtErrInvalidParameter, 5 for rtErrUnknown, 6 for rtErrFatal, and 7 for rtData) and Idle Rate as parameters. For example we respond with a Result type of rtData and Idle Rate of 50.
Figure 7-28 HID Demo Get Idle Response TerminalOn the Host we get a Idle Confirmation.
Figure 7-29 HID Demo Get Idle Confirmation Terminal 2
Figure 7-30 HID Demo Set Idle Request Terminal 2The Device receives a Set Idle Indication. It can respond to it using Set Idle Response which requires Result type (0 for rtSuccessful, 1 for rtNotReady, 2 for rtErrInvalidReportID, 3 for rtErrUnsupportedRequest, 4 for rtErrInvalidParameter, 5 for rtErrUnknown, 6 for rtErrFatal, and 7 for rtData) as its one parameter.
Figure 7-31 HID Demo Set Idle Indication 2We get a SetIdleConfirmation with the Result type on the Host
Figure 7-32 HID Demo Set Idle Confirmation Terminal 2
Figure 7-33 HID Demo DataWrite TerminalThe Host gets a Data indication.
Figure 7-34 HID Demo Data Indication Terminal