<?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>Question about burning firmware to USB Dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60025/question-about-burning-firmware-to-usb-dongle</link><description>Hi, 
 I have a project based on the NUS (Nordic Uart Service) example. 
 I have bought a USB dongle MDBT50Q-RX manufactured by RAYTAC ( https://www.raytac.com/product/ins.php?index_id=89 ), but I am not sure how to deploy my application to it. I would</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Apr 2020 13:49:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60025/question-about-burning-firmware-to-usb-dongle" /><item><title>RE: Question about burning firmware to USB Dongle</title><link>https://devzone.nordicsemi.com/thread/247371?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2020 13:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75e3f769-8737-4301-ac68-ad9e0e9ef5da</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Joe&lt;/p&gt;
&lt;p&gt;Sorry for the slow response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s good to hear that you got some progress on your end.&amp;nbsp;&lt;/p&gt;
[quote user="sdtjoe"]1. Shall I send the data through the app_usbd_cdc_acm_write(&amp;amp;m_app_cdc_acm, &amp;amp;data_buffer, data_len)?[/quote]
&lt;p&gt;&amp;nbsp;Yes. This function can be used to send data to the USB host from the nRF device. The CDC example that you&amp;#39;re linking to can be used as a reference for this.&amp;nbsp;&lt;/p&gt;
[quote user="sdtjoe"]2. How should I initialize the pin setting?[/quote]
&lt;p&gt;&amp;nbsp;You don&amp;#39;t have to select the pin when using USBD, since the USBD interface has dedicated pins on the chip that can&amp;nbsp; not be used for any other purpose.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;span&gt;CDC_ACM_DATA_EPIN and&amp;nbsp;CDC_ACM_DATA_EPOUT defines sets the USB endpoints (EPIN means EndPoint IN), not the pins, and have to be values in the 0-5 range. I would recommend just using the same values as the CDC example, and not change these defines.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;br /&gt;Torbjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about burning firmware to USB Dongle</title><link>https://devzone.nordicsemi.com/thread/246949?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2020 01:50:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6fa4830-af2e-4b4c-89d5-1e3e44b3743e</guid><dc:creator>sdtjoe</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;After many tries, I finally can receive the data through BLE and COM port detected by the PC.&lt;/p&gt;
&lt;p&gt;So the next step I have to send out the buffer data.&lt;br /&gt;As the dongle doesn&amp;#39;t have UART, I think I have to send the data through the USB D+/D- pin to PC?&lt;/p&gt;
&lt;p&gt;So my question is:&lt;br /&gt;1. Shall I send the data through the app_usbd_cdc_acm_write(&amp;amp;m_app_cdc_acm, &amp;amp;data_buffer, data_len)?&lt;br /&gt;2. How should I initialize the pin setting?&lt;br /&gt;The pin for D+/D- are 35/34 repectively, so shall I set CDC_ACM_DATA_EPIN to 35 and CDC_ACM_DATA_EPOUT to 34?&lt;/p&gt;
&lt;p&gt;APP_USBD_CDC_ACM_GLOBAL_DEF(m_app_cdc_acm,&lt;br /&gt; cdc_acm_user_ev_handler,&lt;br /&gt; CDC_ACM_COMM_INTERFACE,&lt;br /&gt; CDC_ACM_DATA_INTERFACE,&lt;br /&gt; CDC_ACM_COMM_EPIN,&lt;br /&gt; CDC_ACM_DATA_EPIN,&lt;br /&gt; CDC_ACM_DATA_EPOUT,&lt;br /&gt; APP_USBD_CDC_COMM_PROTOCOL_AT_V250);&lt;br /&gt; &lt;br /&gt;Thank you&lt;br /&gt;Joe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about burning firmware to USB Dongle</title><link>https://devzone.nordicsemi.com/thread/245949?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 07:01:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bc907eb-322e-4b44-88a9-3dc90c868083</guid><dc:creator>sdtjoe</dc:creator><description>&lt;p&gt;Hi Torbj&amp;oslash;rn&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;I am using SDK 16.0.0.&lt;br /&gt;I have tried your suggested example &amp;quot;usbd_ble_uart&amp;quot; and my PC (windows) can detect the USB dongle as a COM port device (COM24).&lt;/p&gt;
&lt;p&gt;My goal is to use the dongle as a NUS (Central side) connect to the PC, so it can receive data from another BLE device which is NUS (Peripheral side).&lt;br /&gt;The data transfer flow is only one way from Peripheral --(BLE)--&amp;gt; Central --(USB)--&amp;gt; PC&lt;br /&gt;Before using the dongle, my original project &amp;quot;ble_app_uart_c&amp;quot; (under examples\ble_central) and &amp;quot;ble_app_uart&amp;quot; (under examples\ble_peripheral) works correctly on two Development board.&lt;/p&gt;
&lt;p&gt;So I tried to combine the sample project &amp;quot;usbd_ble_uart&amp;quot; to the central project &amp;quot;ble_app_uart_c&amp;quot;.&lt;br /&gt;With the combined code, the PC can detect the dongle, but the BLE no longer connect to the peripheral.&lt;/p&gt;
&lt;p&gt;Here is the main function of my combined code as sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void)
{
    ret_code_t ret;
    static const app_usbd_config_t usbd_config = {
        .ev_state_proc = usbd_user_ev_handler
    };
    // Initialize.
    log_init();
    timer_init();
    uart_init();
    //uarte_init();
    buttons_leds_init();

    app_usbd_serial_num_generate();

    ret = app_usbd_init(&amp;amp;usbd_config);
    APP_ERROR_CHECK(ret);

    app_usbd_class_inst_t const * class_cdc_acm = app_usbd_cdc_acm_class_inst_get(&amp;amp;m_app_cdc_acm);
    ret = app_usbd_class_append(class_cdc_acm);
    APP_ERROR_CHECK(ret);

    db_discovery_init();
    power_management_init();
    ble_stack_init();
    gatt_init();
    nus_c_init();
    scan_init();

    // Start execution.
    printf(&amp;quot;BLE UART central example started.\r\n&amp;quot;);
    NRF_LOG_INFO(&amp;quot;BLE UART central example started.&amp;quot;);
    scan_start();

    ret = app_usbd_power_events_enable();
    APP_ERROR_CHECK(ret);

    // Enter main loop.
    for (;;)
    {
        while (app_usbd_event_queue_process())
        {
            /* Nothing to do */
        }
        idle_state_handle();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I comment out the while (app_usbd_event_queue_process()) part, the PC cannot detect the USB dongle as a COM port device, but the it can connect to the BLE Peripheral.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    // Enter main loop.
    for (;;)
    {
//        while (app_usbd_event_queue_process())
//        {
//            /* Nothing to do */
//        }
        idle_state_handle();
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have spent for 2 days for this problem.&lt;br /&gt;Is there any hints for me to solve it?&lt;/p&gt;
&lt;p&gt;Best Regards&lt;br /&gt;Joe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about burning firmware to USB Dongle</title><link>https://devzone.nordicsemi.com/thread/244442?ContentTypeID=1</link><pubDate>Tue, 14 Apr 2020 13:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1abb6167-514d-4d2b-8771-447bb0608833</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Joe&lt;/p&gt;
&lt;p&gt;Can you confirm which SDK example you are basing your project on?&lt;/p&gt;
&lt;p&gt;The ble_app_uart example does not configure the USB interface, and if you flash this firmware into your dongle it will not enumerate as a USB device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The usbd_ble_uart example combines the USBD CDC example (virtual comport) with the ble_app_uart, and should work on the dongle: \nRF5_SDK_16.0.0\examples\peripheral\usbd_ble_uart example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>