This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Custom HID over GATT device

Hi I've been testing HID example ("nRF51 SDK v9.0.0\examples\ble_peripheral\ble_app_hids_keyboard\pca10028\s110\arm5_no_packs") for a while.Now,I want to test Custom HID over GATT base on the keyboard example using the pca10028 DK.reference to this webpage " nRF51422 HID example modification.

I just do as follow: 1.replace the report_map_data

#define INPUT_REPORT_MAX_LEN             8             /**< Maximum length of the Input Report characteristic. */

static uint8_t report_map_data[] =
{
	0x06, 0x00, 0xFF,		// Usage Page = 0xFF00 (Vendor Defined Page 1)
	0x09, 0x01, 			// Usage (Vendor Usage 1)
	0xA1, 0x01, 			// Collection (Application)
	0x19, 0x01, 			//		Usage Minimum 
	0x29, INPUT_REPORT_MAX_LEN, 			//		Usage Maximum 
	0x15, 0x00, 			//		Logical Minimum (data bytes in the report may have minimum value = 0x00)
	0x26, 0xFF, 0x00,		//		Logical Maximum (data bytes in the report may have maximum value = 0x00FF = unsigned 255)
	0x75, 0x08, 			//		Report Size: 8-bit field size
	0x95, INPUT_REPORT_MAX_LEN, 			//		Report Count: Make sixty-four 8-bit fields (the next time the parser hits an "Input", "Output", or "Feature" item)
	0x81, 0x00, 			//		Input (Data, Array, Abs): Instantiates input packet fields based on the above report size, count, logical min/max, and usage.
	0x19, 0x01, 			//		Usage Minimum 
	0x29, OUTPUT_REPORT_MAX_LEN,			 // 	 Usage Maximum
	0x91, 0x00, 			//		Output (Data, Array, Abs): Instantiates output packet fields.  Uses same report size and count as "Input" fields, since nothing new/different was specified to the parser since the "Input" item.
	0xC0					// End Collection
};

2.Connect the PCA10028 DK to PC's BLE.then using Bus Hound to monitor. but when I push the button,there is not data received in Bus Hound(use the original example ,Bus Hound can received Hid data). image description

image description

Is there any code I need to modify?

Regards

Parents Reply Children
No Data
Related