is that possible to send the peripheral device data to bluetooth less desktop over ble

Hello,

In my project, I want to send the data from the ble device nrf52832 dev kit to a connected in-built Bluetooth desktop/PC. Some desktop doesn't have inbuilt Bluetooth and for that, so I used a third-party dongle(TP link dongle) that provides Bluetooth capability to Bluetooth-less desktop. I scanned the peripheral devices with a third-party dongle same as the in-built desktop/PC Bluetooth. next, successfully send the data from the peripheral device to the desktop/PC. but i want to develop a custom dongle to send/receive the data from peripherals devices as well as it provides Bluetooth capability to Bluetooth less desktop/PC.

I have tried the nrf52840 dongle and most of them say that it's not recommended for development and even it didn't provide any Bluetooth capability to the desktop as in-built. using nrf connect desktop app we can scan and connect the device but i need the same as the in-built Bluetooth.

So please let me know how can i achieve this.

Thank You. 

  • Hello,

    nrf_drv_clock_init(); return this error.

    Thank You.

  • Hello hello..!!.

    That suggests that the clock is already initialized, wouldn't you agree? Try setting a breakpoint inside nrf_drv_clock_init() and see if it is reached before you reach line 862 in main.c. Is it reached? If so, you can just comment out nrf_drv_clock_init() on line 862 in main.c.

    Best regards,

    Edvin

  • Hello,

    Thanks for the reply,

    i added break point before nrf_drv_clock_init() and inside that also with some debugging prints,

    ret_code_t nrf_drv_clock_init(void)
    {
        ret_code_t err_code = NRF_SUCCESS;
        if (m_clock_cb.module_initialized)
        {
          
            printf("func\r\n");
            err_code = NRF_ERROR_MODULE_ALREADY_INITIALIZED;
            nrf_delay_ms(100);
        }
        else
        {
            m_clock_cb.p_hf_head      = NULL;
            m_clock_cb.hfclk_requests = 0;
            m_clock_cb.p_lf_head      = NULL;
            m_clock_cb.lfclk_requests = 0;
            err_code = nrfx_clock_init(clock_irq_handler);
    #ifdef SOFTDEVICE_PRESENT
            if (!nrf_sdh_is_enabled())
    #endif
            {
                nrfx_clock_enable();
            }
    
    #if CALIBRATION_SUPPORT
            m_clock_cb.cal_state = CAL_STATE_IDLE;
    #endif
    
            m_clock_cb.module_initialized = true;
        }
    
        if (nrf_wdt_started())
        {
            m_clock_cb.lfclk_on = true;
        }
    
        NRF_LOG_INFO("Function: %s, error code: %s.",
                     (uint32_t)__func__,
                     (uint32_t)NRF_LOG_ERROR_STRING_GET(err_code));
        printf("err_sagar:%d\r\n",err_code);
        nrf_delay_ms(100);
        return err_code;
    }

    so in main.c for ble_stack_init() it will enter to nrf_drv_clock_init()  and return err_code:0 then for nrf_drv_clock_init() in main.c again it will enter but return err_code:133.

    so this screenshot of serial port data,

    so I think commented out is the correct way, if not Please let me know, because if I am trying to send the counter val data continuously to print in Notepad on PC it's not working. 

    the same thing is working on usbd_hid_example,

     for (;;)
        {
            val+=1;       
            app_usbd_hid_kbd_key_control(&m_app_hid_kbd, val, 0);  // Release the key
    
            nrf_delay_ms(100);
    
            app_usbd_hid_kbd_key_control(&m_app_hid_kbd, val, 1);  // Press the key
    
            nrf_delay_ms(100);
                
            while (app_usbd_event_queue_process())
            {
                /* Nothing to do */
            }
            idle_state_handle();
    
        }
    
    }
    

    Thank You.

  • If it is not working, check the return values from the app_usbd_hid_kbd... calls.

Related