hi thom@s,
Here ( RFCOMM sockets ) you can find a very simple example of RFCOMM bluetooth server. It compiles perfectly with Intel Edison toolchain.
>SDK_ROOT/sysroots/i386-pokysdk-darwin/usr/bin/i586-poky-linux/i586-poky-linux-gcc -m32 -march=i586 --sysroot=SDK_ROOT/sysroots/core2-32-poky-linux rfcomm-server rfcomm-server.c -lbluetooth
Best,
DK