<?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 transmit BULK via USB HID?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44442/how-to-transmit-bulk-via-usb-hid</link><description>How to realize the USB HID interface and PC data transmission? 
 I want to connect my computer via USB hid protocol for communication 
 This is my code, but can only send data, can not receive, send data will enter &amp;quot;APP_USBD_HID_USER_EVT_IN_REPORT_DONE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Mar 2019 01:39:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44442/how-to-transmit-bulk-via-usb-hid" /><item><title>RE: How to transmit BULK via USB HID?</title><link>https://devzone.nordicsemi.com/thread/175224?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 01:39:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f8d035-5d2e-4069-832f-4f50ca81eb81</guid><dc:creator>shenwrt</dc:creator><description>&lt;p&gt;I changed the code in app_usbd_hid_generic.c, and every time the PC sends a message, it goes into this function and gets the endpoint number, but the data is from the old data from the last time&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ret_code_t hid_generic_ep_transfer_out(app_usbd_class_inst_t const * p_inst)
{

    app_usbd_hid_generic_t const * p_generic = hid_generic_get(p_inst);
    nrf_drv_usbd_ep_t              ep_addr   = app_usbd_hid_epout_addr_get(p_inst);

    /*Request setup data*/
    app_usbd_hid_report_buffer_t const * p_rep_buff;

    p_rep_buff = app_usbd_hid_rep_buff_out_get(&amp;amp;p_generic-&amp;gt;specific.inst.hid_inst);
    NRF_DRV_USBD_TRANSFER_OUT(transfer, p_rep_buff-&amp;gt;p_buff, p_rep_buff-&amp;gt;size);

	NRF_LOG_INFO(&amp;quot;hid_generic_ep_transfer_out,ep_addr = %d&amp;quot;,ep_addr);
	NRF_LOG_INFO(&amp;quot;p_rep_buff-&amp;gt;p_buff[0] = %d,[1] = %d,[2] = %d,[3] = %d,[4] = %d,[5] = %d&amp;quot;,p_rep_buff-&amp;gt;p_buff[0], p_rep_buff-&amp;gt;p_buff[1], 
																					p_rep_buff-&amp;gt;p_buff[2], p_rep_buff-&amp;gt;p_buff[3], 
																					p_rep_buff-&amp;gt;p_buff[4], p_rep_buff-&amp;gt;p_buff[5]);
    return app_usbd_ep_transfer(ep_addr, &amp;amp;transfer);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to transmit BULK via USB HID?</title><link>https://devzone.nordicsemi.com/thread/175169?ContentTypeID=1</link><pubDate>Sat, 09 Mar 2019 06:40:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d570d61-d267-48f2-b1df-ebb70f2c36f5</guid><dc:creator>shenwrt</dc:creator><description>&lt;p&gt;Hi Kenneth&lt;/p&gt;
&lt;p&gt;I can catch data interrupts in &amp;quot;hid_generic_ep_transfer_out&amp;quot;, but there is never an &amp;quot;APP_USBD_HID_USER_EVT_OUT_REPORT_READY&amp;quot; interrupt.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know if I initialized it the wrong way.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much for your help.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to transmit BULK via USB HID?</title><link>https://devzone.nordicsemi.com/thread/174639?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 16:57:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92a4abb9-a8ad-4ea6-be38-390996cba410</guid><dc:creator>shenwrt</dc:creator><description>&lt;p&gt;Sorry, I can&amp;#39;t open your link, I want to ask if my code is correct, where is the problem, please help me correct, thank you!The following is my project document,SDK15.2&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/usbd_5F00_hid_5F00_generic.rar"&gt;devzone.nordicsemi.com/.../usbd_5F00_hid_5F00_generic.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to transmit BULK via USB HID?</title><link>https://devzone.nordicsemi.com/thread/174608?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 14:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8712458-e834-491f-bc2a-023cb7a71d61</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you had a look at the usbd_hid_composite example?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is an example there showing how to get report data for the keyboard.&amp;nbsp;Specifically, take a look at the&amp;nbsp;hid_kbd_on_set_report_data_cb(..) function, implemented on line 322 of app_usbd_hid_kbd.c&lt;/p&gt;
&lt;p&gt;There is also this case that I can see have used &lt;span&gt;APP_USBD_HID_USER_EVT_OUT_REPORT_READY&lt;/span&gt;:&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/40364/problems-with-out-reports-on-usb-hid"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/40364/problems-with-out-reports-on-usb-hid&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to transmit BULK via USB HID?</title><link>https://devzone.nordicsemi.com/thread/174352?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 16:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b80f9557-48db-4168-bcfc-db68948d823a</guid><dc:creator>shenwrt</dc:creator><description>&lt;ul&gt;
&lt;li&gt;
&lt;p class="src highlight"&gt;Google translation, may not be accurate&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>