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. 

Parents
  • Hello,

    If you want a Bluetooth dongle for a bluetooth-less desktop/PC, it needs to contain a certain firmware. This firmware is Bluetooth HCI (Host Controller Interface) over USB. If the dongle doesn't contain this, then the computer will not be able to use it as a Bluetooth dongle. 

    However, if you want to add more functionality into this dongle, thus changing the FW to no longer be pure HCI, the computer will no longer see it as a Bluetooth dongle, so I don't think what you describe is possible.

    It is however possible to use a Bluetooth HCI dongle for what you want to, but it requires some sort of application running on your PC. But if I understand you correctly, you have already accomplished this?

    Best regards,

    Edvin

  • Hello,

    so I don't think what you describe is possible.

    So it's not possible to scan the peripheral devices and send the data from the peripheral to a central device that is connected to a Bluetooth-less desktop.

    But how TP link Bluetooth adapter can achieve this.? in their website they give some drivers for pc. will it work for all,?

    I didn't try hci example so can I try that once to get an idea? or its not suitable for my application.

    Thank You

  • Neither of the functions you use in BLE_NUS_C_EVT_NUS_TX_EVT will use the UART. If you are under the impression that it is, then perhaps it is because the DK has a UART to USB translator in the programmer. This programmer is not present on the dongle, so if you want UART data, you need to solder a UART device to some of the GPIOs. 

    However, since you are trying to use the USB, you need to use the USB peripheral to send data. You can look at how this is done in the sample:

    SDK\examples\peripheral\usbd_ble_uart

    In fact, this sample is pretty close to what you are looking for. It is the ble_app_uart (Bluetooth Peripheral) example, only that it uses the USB_CDC instead of UART. If you want a Bluetooth Low Energy Central instead of peripheral, then you need to start with the SDK\examples\ble_central\ble_app_uart_c, but replace the UART with USB_CDC, like it is done in the usbd_ble_uart example.

    Best regards,

    Edvin

  • hello,

    Thanks for the reply,

    yes I have changed it and I can able to send the data from the dev kit to the dongle whatever data I have sent is received in the terminal but if I send the next data it replaces the old data in the terminal i didn't receive it in next line and one more thing if i use sizeof() for data transmission to dongle first character gets truncated if strlen() the full data get received for next data it replace old data.

    this is the updated code,

  • Did you try to just use:

    err_code=app_usbd_cdc_acm_write(&m_app_cdc_acm,p_ble_nus_evt->p_data,p_ble_nus_evt->data_len);

    Since the strlen() and sizeof() doesn't know how much of the data that is coming from this event, and what was left from the previous event.

  • Hello,

    If I used that yes it's received properly but the data not printing in the next line it just replaced the old data even I tried to memset() the data buffer but still happened the same.

    Thank You.

  • I don't understand what you mean. Can you perhaps share some screenshot of what you are seeing and what you expect to see?

    BR,

    Edvin

Reply Children
Related