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
  • I don't really understand what do you mean by "custom HID over GATT". There is only one HID over GATT defined by BT SIG as far as I know and if you change UUIDs or protocol on top of GATT Characteristics then it's not HID any more and no "HID compliant" device will understand it on the other side. Am I missing something? However if you just use HID over GATT as example and you modify it to serve your own - completely proprietary - application/use case then I can understand the question. It's also nice that you've extracted two simple and understandable questions, unfortunately I cannot help you (from my perspective debugging is simply done by logging of GATT flow on both sides - nRF5x and the other peer if possible - plus looking to 2.4GHz RF analyzer/BLE sniffer for the rest). Hopefully someone else on this forum can.

Reply
  • I don't really understand what do you mean by "custom HID over GATT". There is only one HID over GATT defined by BT SIG as far as I know and if you change UUIDs or protocol on top of GATT Characteristics then it's not HID any more and no "HID compliant" device will understand it on the other side. Am I missing something? However if you just use HID over GATT as example and you modify it to serve your own - completely proprietary - application/use case then I can understand the question. It's also nice that you've extracted two simple and understandable questions, unfortunately I cannot help you (from my perspective debugging is simply done by logging of GATT flow on both sides - nRF5x and the other peer if possible - plus looking to 2.4GHz RF analyzer/BLE sniffer for the rest). Hopefully someone else on this forum can.

Children
No Data
Related