You have to separate it into sections.
First setting up the microcontroller or PC internal registers for the UART/serial port. (though some bluetooth module require or can use I2C or SPI serial protocol, which is different from the regular serial TX/RX communication)
Second, the microcontroller communicating through the serial UART/I2C/SPI port with the local bluetooth module to send configuration settings, and later the data.
Third and fourth, the above happening on the other side as well.
Fifth, the bluetooth modules communicating among each other to establish the link, and later send each other the data from the microcontrollers (or PC)
Looking at the register names that you use, I gather that you speak of AVR micro controllers. Setting up PIC microcontrollers or other types might be different. They definitely have different register names. That is described in the micro controller manual or datasheet. This entails the first part (and third for the other end of the link).
Similarly for the bluetooth module, it should be mentioned in the manual or datasheet how to operate it. There is no generic set of step on how to do this. As there is no one-and-only bluetooth module. They are made by different manufacturers. This is the second part (and fourth for the other end of the link)
They all have to adhere to the bluetooth protocol though, which is the 5th part, how the module communicate over RF. But that is mostly abstracted by the hardware. What settings to send to the module, and how it is formatted, to make this happen can be very different for each manufacturer.
In short, read the fine manual(s). It depends.
[EDIT]There is also a 6th part. One microcontroller needs to know what the other means with the data sent to him. So your program must be able to seperate the ‘words’ inside the ‘sentences’, and make sense of them. That is totally up to you in how you do it. You have to invent the language in which they communicate.