where is "nRF UART App" nRF51822 code ?
Please see this question: http://devzone.nordicsemi.com/index.php/is-there-a-serial-port-profile-for-ble
Please see this question: http://devzone.nordicsemi.com/index.php/is-there-a-serial-port-profile-for-ble