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.

  • Hi Sagarnayakm, 

    Please follow the documentation and test ble_app_uart_c.
    Please prepare 2 DK , one running ble_app_uart and the other run ble_app_uart_c. 
    They do what exactly you need. 

  • Hello,

    Thanks for the reply, ok will go through that and update you.

  • Hello,

    Thanks for the reply, i tried ble_pp_uart and ble_app_uart_c examples and i can able to send the data from pc to pc and mobile to pc also but after this what i need to do??

    please tel me the next step.

    thank you.

  • Hi Sgarnayakm, 

    Could you give us the requirement of your application ? Can you build your application based on the UART -> BLE ---- BLE -> UART communication ?

  • hello,

    actually, I have an nrf52810 custom device that reads the character's data via hw uart and writes to Notepad to connected devices like mobile/laptops. Some laptops don't have in-built Bluetooth we can use the nrf52840 dongle as a Bluetooth dongle to pc to connect my nrf52810 device. after that whatever the data coming from uart to nrf52810, it sends to the dongle over a ble and the dongle writes data to notepad via USB.

    this is the application, and as of now I can read the data from uart and writes to the connected devices like mobile/laptops. so now the desktops/laptops which don't have Bluetooth should use the dongle to receive the data over ble. 

    if with nrf5 sdk is not possible, i ok to use nrf connect sdk also. please let me know your suggestions.

    Can you build your application based on the UART -> BLE ---- BLE -> UART communication ?

    Regarding this once the dongle is connected to pc how it will act as a dongle if I use ble_app_uart_c because i couldn't scan any peripheral devices and it connected only if the name Nordic_UART. Ok after connecting like this the data received over uart is that need to use ble_nus_send() API to send the data from nrf52810 to dongle.?? 

    still i am confused.

Reply
  • hello,

    actually, I have an nrf52810 custom device that reads the character's data via hw uart and writes to Notepad to connected devices like mobile/laptops. Some laptops don't have in-built Bluetooth we can use the nrf52840 dongle as a Bluetooth dongle to pc to connect my nrf52810 device. after that whatever the data coming from uart to nrf52810, it sends to the dongle over a ble and the dongle writes data to notepad via USB.

    this is the application, and as of now I can read the data from uart and writes to the connected devices like mobile/laptops. so now the desktops/laptops which don't have Bluetooth should use the dongle to receive the data over ble. 

    if with nrf5 sdk is not possible, i ok to use nrf connect sdk also. please let me know your suggestions.

    Can you build your application based on the UART -> BLE ---- BLE -> UART communication ?

    Regarding this once the dongle is connected to pc how it will act as a dongle if I use ble_app_uart_c because i couldn't scan any peripheral devices and it connected only if the name Nordic_UART. Ok after connecting like this the data received over uart is that need to use ble_nus_send() API to send the data from nrf52810 to dongle.?? 

    still i am confused.

Children
  • Hi again, 

    You don't have to only connect to Nordic_UART. You can just modify the ble_app_uart_c to change it so that it connect to your device instead. And in the code you can modify the ble_app_uart_c to read your characteristic on the nRF51810 instead of reading the NUS service. 

  • Hello,

    Thanks for the reply,

    You don't have to only connect to Nordic_UART. You can just modify the ble_app_uart_c to change it so that it connect to your device instead.

    You mean, if we require we can change the peripheral device name and we can change it in central.

    so it will connect automatically.

    And in the code you can modify the ble_app_uart_c to read your characteristic on the nRF51810 instead of reading the NUS service. 

    Regarding this, i dumped the ble_app_uart_c code to the dongle and the ble_app_uart code to the nrf52832 dev kit and i tried to send the data from the dev kit to the dongle it's not receiving from the dongle.

    Please let me know why??

    Thank You.



  • sagarnayakm said:

    You mean, if we require we can change the peripheral device name and we can change it in central.

    so it will connect automatically.


    -> Yes this correct. You can modify the example to do that. 

    I don't think the firmware works out of the box on the dongle. You would need to modify it so that it work on the dongle, for example check the start address of the application, you may need to change to USB instead of UART etc. 
    For development it's strongly suggested to use the Dev Kit instead of the dongle. You only change to the dongle after you study the difference between the dongle and the devkit. The dongle is not made to be a development kit. 

  • Yes this correct. You can modify the example to do that. 

    Understood.

    you may need to change to USB instead of UART etc. 

    Already with the dev kit I can receive the data, then using the dev kit, why should I change the UART to USB.??

    Even to change the UART to USB I don't have any idea.

    For development it's strongly suggested to use the Dev Kit instead of the dongle.

    If the dongle is not for development means then it doesn't make sense that use of dongle in my application. so i need to choose other ways then. 

  • Hi,

    It's possible to send data via USB with the dongle. But you need to get familiar with how you can use the USB communication on the dongle first. 
    My suggestion is to use the nRF52 DK for testing first before you move to the dongle. 

Related