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.

  • Awesome..!!,

    it's printing to the next line but I have one more doubt can we add the hid example to this code to print it in Notepad on PC as well??

  • Hi Sagarnayakm, 

    I'm not so sure about what you plan to do. My understanding is that you want to create a "virtual" keyboard, that can type what arrives at the USB port ? 

    But how do you connect that virtual keyboard to PC ? Is it via USB ? 
    I would suggest to take a look at the \examples\peripheral\usbd_hid_composite . Pressing button 4 when running the demo will send letter 'g' 

    Note that to create a HID keyboard it's a bit complex and you will need to do some study to be able to integrate it to your application. 

    If you are planning to connect the HIDs device via BLE to a tablet/phone (not USB) then it's a different story . And you will need to study the \examples\ble_peripheral\ble_app_hids_keyboard example. 

  • If you are planning to connect the HIDs device via BLE to a tablet/phone (not USB) then it's a different story

    I have implemented this thing already like when I connect my peripheral device to a tablet/phone/laptop whatever data I am sending is printed in Notepad on the tablet/phone/laptop.

    but now this thing should happen via dongle -->USB--> to a desktop/PC(Notepad). So first tell me is this possible or not.?

    because already I have my custom board and I don't want to make it useless. 

    please let me know as soon as possible and best way to do that.

    Thank You.

  • Hi Sagarnayakm, 

    You need to clarify to me are you planning to make the dongle works as a "virtual" keyboard that can type the data you receive from the peer device ? 


    If you are, it's possible. As I mentioned if you look at usbd_hid_composite example, pressing button 4 on the Devkit will type letter 'g' on PC . You would need to base from that and develop your application. 

  • Hello,

    I didn't get what a virtual keyboard means,

    If you are planning to connect the HIDs device via BLE to a tablet/phone (not USB) then it's a different story

     but the thing is I have implemented this on my peer device and it writes the data to Notepad directly when I connect to PC.

     So my point is if the PC doesn't have in-built Bluetooth, providing Bluetooth capability to that using a dongle. so instead of sending the data to the serial port, I want to write it the same as above.

    so now I hope you understand it properly and tell me how can i proceed with this.

    and one more thing I used Putty software to store the logging data to a .txt file also and it's working but I don't want to connect any com port here. Whenever I send the data from a peer device it should directly to Notepad. so is a need to build any driver on the PC side? if so, how can I proceed with that.? any support.?

Reply
  • Hello,

    I didn't get what a virtual keyboard means,

    If you are planning to connect the HIDs device via BLE to a tablet/phone (not USB) then it's a different story

     but the thing is I have implemented this on my peer device and it writes the data to Notepad directly when I connect to PC.

     So my point is if the PC doesn't have in-built Bluetooth, providing Bluetooth capability to that using a dongle. so instead of sending the data to the serial port, I want to write it the same as above.

    so now I hope you understand it properly and tell me how can i proceed with this.

    and one more thing I used Putty software to store the logging data to a .txt file also and it's working but I don't want to connect any com port here. Whenever I send the data from a peer device it should directly to Notepad. so is a need to build any driver on the PC side? if so, how can I proceed with that.? any support.?

Children
Related