The link previously posted appears to me to be woefully inadequate. Basically, what you want to do is
1. Enable the Serial Port Profile on both Pi's.
2. Set up rfcomm to listen on one Pi, and to connect on the other.
3. Program both Pis to read and write data over the virtual serial communications port /dev/rfcomm0.
Lots of tips on this forum for the above. If you have questions, ask here and I'll dig up some links.