I'm using a nRF51822 on a PCB to connect with a mobile phone. I would like to know whether there is an existing example or library available to work as a central device and peripheral using AT commands for nRF51822. The functionality required by the Bluetooth module is pairing/unpairing a mobile phone, detecting whether there is a connection and send/receive data via UART to an STM32 microcontroller from the mobile phone app. I had a look at the SDK and the soft device S130 but I'm not sure how to use this.
I also would like to know how I can flash the processor and which hardware and software I would require to do this in a production line?