I've uploaded a NetBeans project with exactly what you wanted here:
http://www.megaupload.com/?d=T89FR0MM
It's an application that can be both server and client. You can talk between 2 phones through bluetooth.
Although i didn't had the chance to
test it on phones, it works on the emulator.
Hope this helps. And don't ask me questions about the application, it was a long time ago