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

What is the difference between "uart_example" and "ble_app_uart"(under path S110/experimental) for PCA10001?

Hello all,

I little confused with these two examples as mentioned in my question. Both examples are different and their use case is also different. Can somebody please suggest which one to use when?

  • Hi, Simple uart app is just for uart communication (in ARM core) You can send/receive data through UART line. (9, 11 pin for EV board) The example is not using bluetooth at all, only ARM core.

    ble_app_uart is somthing like SPP (Serial Port Profile). it sends data through ble when it recevie data from UART. And also, it sends data to UART when data comes into ble. For that fucntion, it configures BLE stack, SoftDevice, etc.

  • Thanks a lot LKH! As you mentioned in [[https://devzone.nordicsemi.com/question/12238/how-to-send-data-from-pic-controller-to-nrf51822-using-uart/?answer=12246#post-id-12246]] that I should use experimental/ble_app_uart. OK! So do i need to have any physical pin connection between Pic and nrf-ble chip? Can I use nus custom service for both the communication between Pic & nrf and between nrf & phone app? Looking forward to your reply.

  • As you can see in the example source code, in function uart_init(), there is uart configuration code. simple_uart_config(.....); And there are some defined values, RTS_PIN_NUMBER, TX_PIN_NUMBER ... those are just integer, means you can assingn any pin of your nRF chip for UART communcation. In the source code, it is configured for PCA10001 board of Evaluation Kit.

    When there is UART interrupt event, NUS service get data from it and send it through bluetooth. Samely when data arrived from ble, it send data to UART tx line. It uses simple_uart.c for UART setting.

    It doesn't matter which chip you are communicating, it just transfers data. So, if you connect pic chip on the other side of uart lines, it receive/send data from/to pic and if you connect phone on the bluetooth side, it transfers data to the device (or any other devices that can be a central will be OK)

  • hi , can you say that what changes will i have to made in ble_app_uart example code in nrf52832DK with s132 softdevice in order to send the data from uart to ble..

Related