Is there any possible way to sedn the data from peripheral device(nrf52832 dev kit) to nrf52840 dongle which is connected to Bluetooth-less desktop

Hello,

In my project, i want to send the data from the ble device nrf52832 dev kit to the nrf52840 dongle which is connected to a Bluetooth-less desktop. Some desktop doesn't have inbuilt Bluetooth and for that, i used an nrf52840 dongle with the help of nrf connect desktop app i flashed the dongle(here i don't have any example or source file, firmware flashed directly by the app), and when I connect it to desktop & scan the peripheral devices with Bluetooth low energy option in nrf connect app. even I can connect the peripheral devices.

Now the issue is how can I send the data from the nrf52832 dev kit to nrf dongle because there is no source file I couldn't add code to receive the data. i tried ble_app_blinky and ble_app_blinky_c examples to send the button state data from peripheral to central so can i use the same for nrf52832 and dongle.??

if so, using the dongle can we connect it to PC and send the data to pc.??

please let me know how can i implement this.

Thank You. 

  • No you don't connect a COM port. When you connect it to USB it acts as a keyboard. You need to connect to the nRF USB port . Then it will be a new keyboard

  • Yes, it's working but how can i bring this to my dongle that's my question.?

    and I tried to modify the example code a little bit like this, but i couldn't send more than six characters.

    static void bsp_event_callback(bsp_event_t ev)
    {
        switch ((unsigned int)ev)
        {
            case CONCAT_2(BSP_EVENT_KEY_, BTN_MOUSE_X_POS):
                UNUSED_RETURN_VALUE(app_usbd_hid_mouse_x_move(&m_app_hid_mouse, CONFIG_MOUSE_MOVE_STEP));
                UNUSED_RETURN_VALUE(app_timer_start(m_mouse_move_timer, APP_TIMER_TICKS(CONFIG_MOUSE_MOVE_TIME_MS), NULL));
                break;
            case CONCAT_2(BSP_USER_EVENT_RELEASE_, BTN_MOUSE_X_POS):
                UNUSED_RETURN_VALUE(app_timer_stop(m_mouse_move_timer));
                break;
    
            case CONCAT_2(BSP_EVENT_KEY_, BTN_MOUSE_LEFT):
                UNUSED_RETURN_VALUE(app_usbd_hid_mouse_button_state(&m_app_hid_mouse, 0, true));
                break;
            case CONCAT_2(BSP_USER_EVENT_RELEASE_, BTN_MOUSE_LEFT):
                UNUSED_RETURN_VALUE(app_usbd_hid_mouse_button_state(&m_app_hid_mouse, 0, false));
                break;
    
            case CONCAT_2(BSP_EVENT_KEY_, BTN_KBD_SHIFT):
                UNUSED_RETURN_VALUE(app_usbd_hid_kbd_modifier_state_set(&m_app_hid_kbd, APP_USBD_HID_KBD_MODIFIER_LEFT_SHIFT, true));
                break;
            case CONCAT_2(BSP_USER_EVENT_RELEASE_, BTN_KBD_SHIFT):
                UNUSED_RETURN_VALUE(app_usbd_hid_kbd_modifier_state_set(&m_app_hid_kbd, APP_USBD_HID_KBD_MODIFIER_LEFT_SHIFT, false));
                break;
    
            case CONCAT_2(BSP_EVENT_KEY_, BTN_KBD_LETTER):
                //UNUSED_RETURN_VALUE(app_usbd_hid_kbd_key_control(&m_app_hid_kbd, CONFIG_KBD_LETTER, true));
                for(int i=10;i<25;i++)
                {
                UNUSED_RETURN_VALUE(app_usbd_hid_kbd_key_control(&m_app_hid_kbd,i, true));
                }
                break;
            case CONCAT_2(BSP_USER_EVENT_RELEASE_, BTN_KBD_LETTER):
                //UNUSED_RETURN_VALUE(app_usbd_hid_kbd_key_control(&m_app_hid_kbd, CONFIG_KBD_LETTER, false));
                for(int j=10;j<25;j++)
                {
                UNUSED_RETURN_VALUE(app_usbd_hid_kbd_key_control(&m_app_hid_kbd,j, false));
                }
                break;
    
            default:
                return; // no implementation needed
        }
    }

    Thank You

  • If you already have a solution that works with devices that support Bluetooth, I think the best solution is to use a Bluetooth dongle to allow device that doesn't have native Bluetooth support to have Bluetooth. 
    This is generic Bluetooth dongle (not nRF52840 dongle) and would use the computer native Bluetooth driver to communicate via BLE. 

    My understanding is that you have already a project that works with phone/tablet and PC that have Bluetooth ? 

    If it's the case, getting a generic Bluetooth dongle (just search for "Bluetooth 5.0 adapter" ) would be a better option that what you are trying to do now. The nRF52840 doesn't have the software/firmware to do the same as the generic Bluetooth adapter. 


  • If it's the case, getting a generic Bluetooth dongle (just search for "Bluetooth 5.0 adapter" ) would be a better option that what you are trying to do now. The nRF52840 doesn't have the software/firmware to do the same as the generic Bluetooth adapter. 

    I have already tried this also with a tp-link Bluetooth adapter and its works fine but I want to make it with nr dongle custom board. 

    I tried to add the usbd_hid_composite example to the merged one (ble_app_uart_c +usbd_ble_uart) so we can achieve this right.?

    And also can't able to add nrf_nvic.c and nrf_soc.c files.

    Thank You

  • I'm afraid that we won't be able to provide more help on this as it's more of application development that you need to do. Please try to check and debug why you can't send more than 6 characters. 

Related