Is there any possible way to sedn the data from peripheral device(nrf52832 dev kit) to nrf52840 dongle which is connected to Bluetooth-less desktop

Hello,

In my project, i want to send the data from the ble device nrf52832 dev kit to the nrf52840 dongle which is connected to a Bluetooth-less desktop. Some desktop doesn't have inbuilt Bluetooth and for that, i used an nrf52840 dongle with the help of nrf connect desktop app i flashed the dongle(here i don't have any example or source file, firmware flashed directly by the app), and when I connect it to desktop & scan the peripheral devices with Bluetooth low energy option in nrf connect app. even I can connect the peripheral devices.

Now the issue is how can I send the data from the nrf52832 dev kit to nrf dongle because there is no source file I couldn't add code to receive the data. i tried ble_app_blinky and ble_app_blinky_c examples to send the button state data from peripheral to central so can i use the same for nrf52832 and dongle.??

if so, using the dongle can we connect it to PC and send the data to pc.??

please let me know how can i implement this.

Thank You. 

Parents
  • Hi Sagarnayakm, 

    Are you using nRF 5 SDK or you are using nRF Connect SDK ? In your other case you were mentioning about Zephyr and nRF Connect SDK. 

    My understanding is that now you have a set-up that you can transmit data from a nRF52 peripheral to the nRF52840 dongle that connect to a PC running nRF Connect for Desktop. 

    Now you want to develop your own application on PC that can do something similar, to receive data from the nRF52 peripheral. 

    My suggestion is to try the ble_app_uart and ble_app_uart_c. You flash the ble_app_uart on one DK and ble_app_uart_c on another DK. Note that you need to use development kit for development. Don't use the dongle for development. 
    After you followed the documentation and can forward UART data from one PC to another PC (or from a phone to the PC), you can write your own application to read the UART data instead of using a UART terminal. 

    After that you can star the next step to either make your own PCB to make a dongle or use nordic dongle and use USB instead of UART. But that should be the next step. 

    This is the most simple way of getting data to PC. If you want to have full control from PC, the same as you have in nRF Connect for Desktop, you would need to use pc_ble_drive. Have a look here: https://github.com/NordicSemiconductor/pc-ble-driver And the python binding here: https://github.com/NordicSemiconductor/pc-ble-driver-py

    We have some examples in the repos that you can have a look. 

  • Hello,

    Thanks for the reply, 

    After you followed the documentation and can forward UART data from one PC to another PC (or from a phone to the PC), you can write your own application to read the UART data instead of using a UART terminal. 

    Regarding this point, I have experienced the ble_app_uart example and i can able to send the data from hw uart and receive it in the dev kit  and push the same data to the mobile app. This is what the example code would do. but i don't have any idea about ble_app_uart_c.

    After that you can star the next step to either make your own PCB to make a dongle or use nordic dongle and use USB instead of UART. But that should be the next step. 

    Already I have my custom dongle pcb board and i tried the usbd_cdc_acm example to send the data from the terminal to the dongle and it's working fine.

    still a lot of effort I don't know which example is suitable for a dongle board since the firmware is flashed via nrf connect app.

    Regarding pc_ble_driver I have seen this before only but it's really confusing and I don't know to kick-start this. please help me step by step then it will very easy to get into that. 

    Please help me.

    Thank You.

  • ok.

    here, i need to use ble_app_uart example or ble_app_uart_c because ble_app_uart is for peripheral but we are developing for central right.??

  • Hi, 
    I don't really understand your question. 
    ble_app_uart_c is the central. You can base your application (that connect to PC) on top of this example. 

  • Hello,

    Thanks for the reply,

    You said to use the be_app_uart and ble_app_uart_c examples for peripheral and central. So now my question is,

    You would need to combine USB CDC and ble_app_uart together. 

    already the data sent from the peripheral received in the serial port of the central device? so I just want to print it in notepad. but when I flashed the ble_app_uart_c to the dongle it was not working you said to use only the dev kit that's fine but what should I do to make the dongle work and receive the data from the peripheral?

    that's it.

  • Hi, 

    As I said the problem with the dongle is that it doesn't have UART interface that converted to USB like on the DK. It's the native USB interface it has that connect to PC. You need to modify the ble_app_uart_c to use USB CDC instead of UART. 
    You can take a look at the \examples\peripheral\usbd_ble_uart example. In that example they do almost what you needed, NUS service and USB CDC. But it's the peripheral example, not central. 

    In addition, on the dongle there is a bootloader and MBR, you need to update your application to cope with the MBR on the dongle. Please see here: nRF52840 Dongle Programming Tutorial 

    My suggestion is to try making a simple application works on the dongle before you want to test with the NUS example. 

  • OK, will try and let you know the status.

    Thank You

Reply Children
No Data
Related