<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39316/how-to-send-arbitrary-data-using-on_hid_rep_char_write</link><description>Hi, 
 I&amp;#39;m able to send arbitrary information to the host using generic HID descriptor (uses vendor defined page). There is no driver issue. I&amp;#39;m also able to connect to the bluetooth of host. But I&amp;#39;m not able to receive data from host. How do I change</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Oct 2018 22:56:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39316/how-to-send-arbitrary-data-using-on_hid_rep_char_write" /><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/153538?ContentTypeID=1</link><pubDate>Thu, 18 Oct 2018 22:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c454b0e6-244c-4e4d-a9aa-8214d3d406db</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Thank you Edvin!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/153407?ContentTypeID=1</link><pubDate>Thu, 18 Oct 2018 08:46:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98bf2d1c-b58d-4924-a2ec-cc68cb5893a2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;No. All these values are the HID protocol way of saying that a button is pressed. I found this fairly easy readable Bluetooth HID profile description:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/RN-HID-User-Guide-v1.0r.pdf"&gt;https://cdn.sparkfun.com/datasheets/Wireless/Bluetooth/RN-HID-User-Guide-v1.0r.pdf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/153300?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 14:56:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d4879c8-3c68-431c-bf62-a4aea9c6fe38</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;So cant I send 64 bits at a time to the host machine? Is it just 8 bits? Or is it dependent on the descriptor where report count &amp;amp; size are used?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/153277?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 14:26:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f279261e-e637-4ffd-88e3-db15eae34c9f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;This is the HID protocol. I don&amp;#39;t know what all of the different fields are used for, but you don&amp;#39;t need to know that if you use the SDK. See how the example is set up, and how to send different key-presses.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/153110?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 20:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4c4a9b8-0e7b-4ce8-8c62-0fe5e10d33be</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;It works!! Thank you so much. Can you help me with 64-bit data? The highlighted values are being sent by me. They are just numbers. What are the other values being appended in input report?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1539722752525v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Below is the log for output report for hid keyboard example. So here values are getting left shifted.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1539723022450v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152991?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 08:42:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7779bad-29f5-4414-88cb-9679ea0cf072</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What SDK version do you use? I don&amp;#39;t think it should matter, but I haven&amp;#39;t tested this example on all versions.&lt;/p&gt;
&lt;p&gt;I know that some of the characteristics require pairing (Note that &amp;quot;pairing&amp;quot; is not the same as &amp;quot;connecting&amp;quot;)&lt;/p&gt;
&lt;p&gt;If you get insufficient authentication, you are trying to write to the wrong characteristic. It should be the third one from the top under &amp;quot;Human Interface Device&amp;quot;.&lt;/p&gt;
&lt;p&gt;However, to see most of the characteristics, you need to pair. Just press the small settings&amp;nbsp;icon&amp;nbsp;in the top right corner of &amp;quot;Nordic_Keyboard&amp;quot;, and press &amp;quot;Pair...&amp;quot;, and click &amp;quot;Pair&amp;quot;(blue button), then you should be able to use the rest of the characteristics. If you also tick of for &amp;quot;Perform bonding&amp;quot;, it will store the&amp;nbsp;pairing&amp;nbsp;information, so that you don&amp;#39;t need to do the pairing every time.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152933?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 18:26:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:674a61c5-f25e-404e-932d-85b502826dfa</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Hey Edvin,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How did you do this?I have 2 nrf52832 DKs. I connect one to nrfconnect. I flash keyboard example on another board. Then I pair to &amp;#39;Nordic_Keyboard&amp;#39; BLE device using nrfConnect. The reports are showing the error &amp;quot;&lt;span&gt;Write operation failed: BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION (0x0105)&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152877?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 12:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fc497fc-6c1e-4178-82e5-316172002a9b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Not sure whether I actually understand the question, but the characteristics that receive the caps lock information is the one marked in yellow here:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-256ff6f58c334fbc8916191f12d76475/pastedimage1539606243918v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152801?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 07:35:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed144c5-1f16-4836-8e02-1d744667d4d9</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Yes the computer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152788?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 07:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e462fde-c1c5-4e4c-a286-0c21f1134a20</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;By host, do you mean the computer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152737?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 17:42:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:926f675e-ca73-4c42-ab4f-dfd8b5f63537</guid><dc:creator>bscdb</dc:creator><description>&lt;p&gt;Thanks I will check that and get back to you. But can you tell me how does the host get handle of output report? Does it get through the&lt;span&gt;&amp;nbsp;interrupt transfer or control transfer?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send arbitrary data using on_hid_rep_char_write()?</title><link>https://devzone.nordicsemi.com/thread/152462?ContentTypeID=1</link><pubDate>Thu, 11 Oct 2018 10:35:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2cd0c7ae-223c-47ad-a1fa-f773a6027df3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I know you say you don&amp;#39;t want to be diverted to the HID keyboard example, but I will either way, unfortunately.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I understand you correctly, and please correct me if I don&amp;#39;t, you want to be able to receive other inputs than caps lock on or off, right?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Well, if you send a command from the device you are connected to, they to should end up as an event in&amp;nbsp;on_hid_rep_char_write(ble_hids_evt_t * p_evt)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You just need to check your report__val, to check if there is any other data than 0x02 (caps lock on).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What sort of message are you sending to the nRF, and do you get this event when you send it?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>