This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf52840 interactive command uart flushing

sdk17.0.2

so i am trying to flush rx/tx while the command execute

cannot find 

app_fifo_flush()

or

app_uart_flush()

anyone know how to do it?
 
Parents
  • Hi 

    Are you using one of the standard SDK examples?

    There is an app_uart_flush() function for flushing the buffers when using the app_uart driver, but it will not do anything unless you make sure to use the app_uart_fifo.c implementation. 

    When you say you cannot find this function, do you mean that the build fails if you try to call it?

    The function is declared on line 244 of app_uart.h, and implemented on line 186 of app_uart_fifo.c

    Best regards
    Torbjørn

  • hello  I am using standard sdk but still cannot find both of those 

    app_uart.h,  app_uart_fifo.c in interactice command  

    sdk17.0.2

  • yep First I use "putty" then I use "mobaXterm" Same problem still happened

    now I use "sscom" still the same thing happened

    I have tried three different terminal already

    So I wonder if there is a way to clean up the RX/Tx or flow control at least

    btw also I found out that if I send the message too fast the entire app will crash

    For example:

    If I press "tab" it will show all the commands which I can use

    but as if I hold the tab and  not release the "tab" button

    the uart will keep printing the commands which I can use

    after n time printing the program will crash

    is this a bug??

    or if there is a way to clean up the RX/Tx or flow control at least

  • Hi 

    Can you give me a bit more details on what you want to use this example for?

    This example is not designed to be used in a product. 

    It is also in the experimental folder, which means we have only done limited testing on it. 
    Possibly there are other examples that are more suitable for what you are trying to accomplish. 

    Best regards
    Torbjørn

  • unfortunately I am using it as a product on a unix system base

    for this app Im trying to use this cli command to control N devices in ble 

    find out it might be a bug in it can you guys tell me how to fix it  

    actually we really need the cli command to control all of this

    I mean even I change the size of

    NRF_CLI_CMD_BUFF_SIZE

    the bug still happened 

  • Hi

    I would strongly recommend considering another example if you are going to use this for a product. 

    For instance, you can either run a standard Bluetooth HCI example on the nRF device, and run a standard Bluetooth host such as BlueZ on the Unix side. Then you will interface to the Bluetooth devices in a way that is common for other Unix applications. 

    Alternatively, you can develop a custom application for the nRF device that controls the N devices, and provides an application specific interface between the nRF and the Unix host. 
    The advantage of this method is that you can implement a more efficient, application specific command set between the nRF and the Unix host, but the drawback is that you need to do more application development on the nRF side. If you use the HCI example on the nRF you don't really have to do much development at all. 

    If you think that using the ble_app_interactive example is the only option I can register an internal ticket to get help from the software team to improve the example, but I can not guarantee that this will be prioritized. 

    Best regards
    Torbjørn

  • yea, after communicate with our project manager  they think that using the ble_app_interactive example is the only option" , so what should I do next

Reply Children
Related