Double CLick via Ble

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
dabo_4430311
Level 2
Level 2
10 replies posted 10 questions asked 10 sign-ins

How do I send a BLE packet communicating a double click from a CapSense Trackpad device? I'm using a CYBLE-214015-01 module to build a trackpad, up to now I can send Clicks (Code examples helped) but I don't understand how to send double clicks.

Is there a manual for setting specific bits? Should I send 2 clicks in a short time period?

Thank you

0 Likes
1 Solution

Hello,

Could you please refer to the below code example if you are developing a Trackpad remote with BLE.

https://www.cypress.com/documentation/development-kitsboards/cy5672-proctm-ble-remote-control-refere...

You can also refer to the 'CY5682 PRoC™ BLE Touch Mouse Reference Design Kit' from the below link for reference.

https://www.cypress.com/documentation/development-kitsboards/cy5682-proc-ble-touch-mouse-reference-d...

Thanks,

P Yugandhar.

View solution in original post

0 Likes
3 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi,

Are you using the BLE HID profile for your application? CAn you please let us know which code example have you used to develop your application?

Thanks and regards

Ganesh

Yes, I am using the HID over GATT profile  as GATT Serverand the Appearance is set as an HID Mouse.

I started mainly from the BLE_HID_Mouse code example and I integrated some small parts from the CapSense_CSD_P4_Trackpad_Gestures.

I am using the CapSense 7.0 version.

This is how I am sending the packets inside of the SimulateMouse() function:

.....

bXInc = (signed char)touchPos[0];
bYInc = -(signed char)touchPos[1];


abMouseData[1u] = bXInc; /* Load the packet array */
abMouseData[2u] = bYInc;

//abMouseData[0u] = (leftButtonPress ? MOUSE_LB : 0u); /* Set up Left Button state */

DBG_PRINTF("HID notification %x %x %x \r\n", abMouseData[0],abMouseData[1],abMouseData[2]);
if(protocol == CYBLE_HIDS_PROTOCOL_MODE_BOOT)
{
apiResult = CyBle_HidssSendNotification(cyBle_connHandle, CYBLE_HUMAN_INTERFACE_DEVICE_SERVICE_INDEX,
CYBLE_HIDS_BOOT_MOUSE_IN_REP, MOUSE_DATA_LEN, abMouseData);
if(apiResult != CYBLE_ERROR_OK)
{
DBG_PRINTF("HIDS_BOOT_MOUSE_IN_REP notification API Error: %x \r\n", apiResult);
mouseSimulation = DISABLED;
}
}
else
{
apiResult = CyBle_HidssSendNotification(cyBle_connHandle, CYBLE_HUMAN_INTERFACE_DEVICE_SERVICE_INDEX,
CYBLE_HUMAN_INTERFACE_DEVICE_REPORT_IN, MOUSE_DATA_LEN, abMouseData);
if(apiResult != CYBLE_ERROR_OK)
{
DBG_PRINTF("HIDS_REPORT notification API Error: %x \r\n", apiResult);
mouseSimulation = DISABLED;
}
}
Simulation_LED_Write(LED_OFF);
}
}

 

 

 

 

 

 

Thank you for your quick reply

0 Likes

Hello,

Could you please refer to the below code example if you are developing a Trackpad remote with BLE.

https://www.cypress.com/documentation/development-kitsboards/cy5672-proctm-ble-remote-control-refere...

You can also refer to the 'CY5682 PRoC™ BLE Touch Mouse Reference Design Kit' from the below link for reference.

https://www.cypress.com/documentation/development-kitsboards/cy5682-proc-ble-touch-mouse-reference-d...

Thanks,

P Yugandhar.

0 Likes