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,

    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