This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sample code for configuring baud rate from nRF Connect tool.

Hi,

I want sample code for configuring baud rate of UART from mobile application (nRF Connect). So I don't need to hard-code the baud rate in my program.

Please share the code if anyone has or suggest me how to do that..

Parents
  • I assume you are talking about ble_app_uart you run on the peripheral ?

    It shouldn't be too hard. You just need to define your custom command via NUS. Please modify nus_data_handler, to check for you command in the data. For example, if you receive "UART_CONF" then you can parse the next 2 bytes as the baudrate, 1 next byte as priority or hardware flow control etc

Reply
  • I assume you are talking about ble_app_uart you run on the peripheral ?

    It shouldn't be too hard. You just need to define your custom command via NUS. Please modify nus_data_handler, to check for you command in the data. For example, if you receive "UART_CONF" then you can parse the next 2 bytes as the baudrate, 1 next byte as priority or hardware flow control etc

Children
Related