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

  • Yes, I have changed the RAM for maximum and now it's advertising and connecting with nrf connect mobile app and I can send the data.

    but this device is not connecting with the central device nrf52840 dongle if I use the ble_app_uart example for the peripheral it will get connect with the dongle but my custom board has merged one(ble_app_uart and ble_app_hids_keyaboard) I changed the name "Nordic_UART" it's not connecting to the dongle.

  • What is your central application? ble_app_uart_c unmodified? If not unmodified, what did you change? What is the central looking for? look in the scan_init() if you can see what filters it is using.

    I am certain the lack of linefeed is not really a problem. It is just the way that your terminal is printing it. No data is actually lost, and I assume you will not be using this terminal in your final application?

    Br,

    Edvin

  • What is your central application? ble_app_uart_c unmodified? If not unmodified, what did you change? What is the central looking for? look in the scan_init() if you can see what filters it is using.

    Regarding this my periphral is (ble_uart_c + ble_app_hids_keyboard) and my central is (ble_app_uart_c + usbd_ble_uart).

    At first, i tried with two dev kits nrf52832 with (ble_app_uart) and nrf52840 with (ble_app_uart_c). and then I replace nrf52840 with my dongle. once the dongle is powered up nrf52832 peri gets connected to my dongle and whatever the data sending from peri to the dongle over ble is received.

    now i changed my peripheral device dev kit with my custom board with(ble_uart_c + ble_app_hids_keyboard)  with the same name "Nordic_UART of ble_app_uart but its not connecting to my dongle.

    i hope you can understand it now better.

    Thank you.

  • Attach a debugger to your dongle and check whether the application is running as intended, or if it is caught in the error handler. Check the logs from the application.

  • Sorry, the dongle doesn't support debugging right.?

    so I flashed it to the nrf52840 dev kit and while debugging,

    nrf_ble_scan_init() with no error and nrf_ble_scan_filter_set() also no error.

    at nrf_ble_scan_filters_enable() function I got the error "soft device invalid memory access".

Reply Children
  • sagarnayakm said:

    Sorry, the dongle doesn't support debugging right.?

    No, you would need an external debugger for that. 

    sagarnayakm said:
    at nrf_ble_scan_filters_enable() function I got the error "soft device invalid memory access".

    Try debugging this function then. Where in nrf_ble_scan_filters_enable() does it return an error?Try setting breakpoints to see how far it reaches. Note that you need to reset the application whenever you hit a breakpoint.

    Regarding your "set RAM to max" comment. Please don't do that. This might be what's causing that. Try looking in your log, and look for messages regarding ram. It should be triggered by these in nrf_sdh_ble.c:

    NRF_LOG_WARNING("Change the RAM start location from 0x%x to 0x%x.",
                            app_ram_start_link, *p_app_ram_start);
            NRF_LOG_WARNING("Maximum RAM size for application is 0x%x.",
                            ram_end_address_get() - (*p_app_ram_start));

  • Regarding your "set RAM to max" comment. Please don't do that. This might be what's causing that. Try looking in your log, and look for messages regarding ram. It should be triggered by these in nrf_sdh_ble.c:

    Yes,

    this is the log i got

    <info> app_timer: RTC: initialized.
    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20002250 to 0x20002260.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0xDDA0.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\NFC_NRF\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_hids_keyboard - Copy\main.c:1399
    PC at: 0x0002BBCD
    <error> app: End of error report

    and after this only i changed 0x200050-->0x20002260.

    Try debugging this function then. Where in nrf_ble_scan_filters_enable() does it return an error?Try setting breakpoints to see how far it reaches. Note that you need to reset the application whenever you hit a breakpoint.

    yes, when i enter to this function then only i got SOFTDEVICE: INVALID MEMORY ACCESS error

     

  • sagarnayakm said:

    and after this only i changed 0x200050-->0x20002260.

    Good. What did you set as your size?

    After you did this, what does the log say now?

  • Hello,

    After this, I tried to debug the nrf52840 dev kit which has the code of the dongle and i got SOFTDEVICE: INVALID MEMORY ACCESS.

    See my point is my dongle code doesn't have any problem because if I use the ble_app_uart example on my peripheral device it is get connected to my dongle.

    but when I use the ble_app_hids_keyboard example then only it is not connected. so now I am confused about which side have to debug. I just added ble_app_uart to the ble_app_hids_keyboard example to enable the NUS service to it. but now it is not connecting to my dongle. 

    my dongle is working fine with ble_app_uart. so tell how can I debug it.?

    Thank You. 

  • Hello,

    The ble_app_uart and the ble_app_hids_keyboard are two completely different applications. The fact that one works on the dongle doesn't mean that the other one does. And since you don't have any output, it is difficult for me to say whether it is at all running, or if it is just the central that you are using that doesn't try to connect to it, because the advertisements doesn't match the central's scanning filters.

    When you compile the ble_app_hids_keyboard. Did you set the dongle as the target board? Do you see it if you scan for it in nRF Connect for Mobile/Desktop -> Bluetooth Low Energy?

    Best regards,

    Edvin

Related