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

  • Let me take one step back. Can you please clarify what you mean by this:

    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.

    What is the difference between these two scenarios? The scenario that you already did, and the thing that you want to develop. What are the main difference between the two solutions?

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

    It will not work on Windows if you are using an nRF device, because it will only provide Bluetooth Low Energy, and not Bluetooth Classic. Therefore Windows will not recognize it as a Bluetooth Dongle. It can work on Linux, but you will not be able to connect to or communicate with Bluetooth Classic devices (most Bluetooth headsets now adays).

    BR,
    Edvin

  • What is the difference between these two scenarios? The scenario that you already did, and the thing that you want to develop. What are the main difference between the two solutions?

    I tried with a TP-link Bluetooth adapter and it receives the data from the peripheral device successfully, but when I used the nrf52840 dongle it was not working. we can only connect with nrf connect desktop app so rather than this the nrf52840 dongle will not act as a dongle to the PC. so I asked you if is there any possibility to make it work as a third-party dongle. 

    now i  merged ble_app_uart_c and usbd_ble_uart examples so at least when I connect the nrf52840 dongle it directly connects to my peripheral device and whatever the data send from the peripheral it should send to the Dongle and then the dongle should send to the serial port of PC over USB.

    this is possible right.??

  • So you are using this one:

    https://www.tp-link.com/us/home-networking/usb-adapter/ub400/

    And it works fine, but when you are using the nRF52840 dongle, it doesn't work. Correct?

    sagarnayakm said:
    so I asked you if is there any possibility to make it work as a third-party dongle. 

    No, it is not. This is because the nRF52840 doesn't have Bluetooth Classic, so the computer will not accept it as a Bluetooth adapter. It would be possible to use it with BLE only if you are using Linux. But then you will not have Bluetooth Classic.

    sagarnayakm said:

    now i  merged ble_app_uart_c and usbd_ble_uart examples so at least when I connect the nrf52840 dongle it directly connects to my peripheral device and whatever the data send from the peripheral it should send to the Dongle and then the dongle should send to the serial port of PC over USB.

    That is correct. As long as the nRFs are programmed to do so, it will work as a wireless terminal application. Whatever you type in on one side will come out on the other connected device, and vice versa.

    Best regards,

    Edvin

Reply
  • So you are using this one:

    https://www.tp-link.com/us/home-networking/usb-adapter/ub400/

    And it works fine, but when you are using the nRF52840 dongle, it doesn't work. Correct?

    sagarnayakm said:
    so I asked you if is there any possibility to make it work as a third-party dongle. 

    No, it is not. This is because the nRF52840 doesn't have Bluetooth Classic, so the computer will not accept it as a Bluetooth adapter. It would be possible to use it with BLE only if you are using Linux. But then you will not have Bluetooth Classic.

    sagarnayakm said:

    now i  merged ble_app_uart_c and usbd_ble_uart examples so at least when I connect the nrf52840 dongle it directly connects to my peripheral device and whatever the data send from the peripheral it should send to the Dongle and then the dongle should send to the serial port of PC over USB.

    That is correct. As long as the nRFs are programmed to do so, it will work as a wireless terminal application. Whatever you type in on one side will come out on the other connected device, and vice versa.

    Best regards,

    Edvin

Children
  • Hello,

    That is correct. As long as the nRFs are programmed to do so, it will work as a wireless terminal application. Whatever you type in on one side will come out on the other connected device, and vice versa.

    Ok. thanks for your reply, i have merged two examples and this is the main.c file and it's connected to my peripheral device but it's not receiving any data from the peripheral so I don't know what's wrong.

    Please have a look and let me know if any mistakes.

    Thank You.

  • Hello,

    We are very short staffed this week, due to public holidays. In addition we have had a lot of traffic on DevZone, so some longer reply time must be expected. Sorry for the inconvenience.

    sagarnayakm said:
    it's connected to my peripheral device but it's not receiving any data from the peripheral so I don't know what's wrong.

    What does the log on your peripheral say when you try to send a notification (a message)? And on your central, this device. Does the BLE_NUS_C_EVT_NUS_TX_EVT event in your ble_nus_c_evt_handler() ever occur?

    I will be out of office until Friday. Hopefully I will be able to answer all unanswered tickets, but unfortunately, I can't guarantee this.

    Best regards,

    Edvin

  • Hello,

    What does the log on your peripheral say when you try to send a notification (a message)?

    When I send the data from the peripheral i received it in the peripheral tera terminal but I didn't receive it in the dongle side terminal.

    Does the BLE_NUS_C_EVT_NUS_TX_EVT event in your ble_nus_c_evt_handler() ever occur?

    No, its not occur. actually, i am trying to print the data which is received from the dongle in this case,

    BLE_NUS_C_EVT_NUS_TX_EVT.

      case BLE_NUS_C_EVT_NUS_TX_EVT:
                printf("sagar_data:%s\r\n",p_ble_nus_evt->p_data);
                ble_nus_chars_received_uart_print(p_ble_nus_evt->p_data, p_ble_nus_evt->data_len);
                memset(p_ble_nus_evt->p_data,0,sizeof(p_ble_nus_evt->p_data));
                break;

    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

Related