Baudrate serial with Dongle BLE nrf52840

Hi,


I use a dongle BLE nrf52840 with a software Bluetooth shell from NCS 2.0.
I use this dongle with this sample as a central device, i connect it to peripheral and receive 6 notifications at 10Hz and one more at 50Hz.
I use a socket to be connected to my dongle BLE with my PC.
To be able to save all my data i used to play with the serial baudrate.


1 ) Is it ok to configure baudrate with Uart_line_ctrl_set ?


2) Is it possible to configure Buadrate to 1M or even more (4M) for transmission ?

If it's possible, how to configure it ?

If it's not , is there another way to have all my datas ?

Regards,

Pierre-Yves

Parents Reply Children
  • Piwy said:
    Are you pointing zephyr,console and zephyr,shell to uart0 or cdc_acm_uart0? => Yes

    Which one is it? "uart0" or "cdc_acm_uart0"?

    Can you please share your build-folder/zephyr/zephyr.dts file?

     

    Piwy said:
    as i say before i have many data that i receive with notification on my shell interface, but when i want to retrieve all the datas, i loss some of them, is it possible to increase the speed  of transmission, diplay ?
    Maybe i don't explain verywell i'm sorry, told me if it's not clear

    Could you share an example of a working scenario and a non-working scenario?

     

    Kind regards,

    Håkon

     

  • To have the same confifuration as me you can take the bluettooth shell sample with the dongle BLE nrf52840 dts, i use the exactly same configuration.

      Using Bluetooth Shell

    With the sample you can scan device and connect to it as a central device in BLE. When youa re conencted you can discover services and subscribe to one caracteristic. I modify the sample to be able to subscribe to more notification. I subsribe to curstome services witch send accelerometer data, pressure...ect. these data are send at 10HZ for 6 of them and one is send at 50Hz.
    i try to receive all theses data. When i receive a data i print it with printf or with printk. But the speed of print is more lent than the n umber of data that i receive. I tried to increase the speed of uart0 to be able to print more data but i loss many data, is it possible to print more faster the data that i receive ?

    If i receive less data i succed to print them all (it's the working scenario) but i need to print more data.


    Is it more clear ?

    Kind regards,

    Pierre-Yves

  • Hi,

     

    As the zephyr/tests/bluetooth/shell sample can be configured in many ways, can you please answer these questions so that I'm able to fully understand how you've setup the sample?

    Håkon Alseth said:

    Which one is it? "uart0" or "cdc_acm_uart0"?

    Can you please share your build-folder/zephyr/zephyr.dts file?

     

    Kind regards,

    Håkon

  • Hi,

    Thanks you for your reply.

    Here is my zephyr.dts file

    7268.zephyr.dts

    Kind regards,

    Pierre-Yves

  • Hi,

     

    Thank you for sharing this.

    You are using usb cdc as the backend for your shell implementation, so the transport layer is effectively USB. 

    Piwy said:
    I subsribe to curstome services witch send accelerometer data, pressure...ect. these data are send at 10HZ for 6 of them and one is send at 50Hz.

    How many characters are you printing for each of these devices? If you're converting the data to human readable form, the overall throughput over the USB CDC interface will be quite alot more than the bytes you're receiving over BLE.

    You have to find where the bottleneck occurs. Receiving data from 7 sensors in total can be problematic wrt. overall BLE throughput.

    Q1: How much data (ie. amount of bytes per received payload?) is being sent over BLE for each device? 

    Q2: Printing the data, ie. converting it from binary to ASCII characters also gives overhead to the USB CDC interface. How much are you printing here?

     

    Kind regards,

    Håkon

     

Related