$ sudo hidd --search
$ sudo rfcomm connect 0 00:0B:CE:01:67:CD
do the trick of establishing the connection between my device (robot) and PC. Even if I try $ cat rfcomm0 I get correct messages from my robot. The question is how can I write to rfcomm0. If I try the standard procedure like with tty, I get input/output error message even after $ sudo chmod 777 rfcomm0. Can anybody provide a simple C++ example on writing to rfcomm? The example i found and tried is attached bellow, it works with tty...
Main Topics
Browse All Topics





by: nociPosted on 2009-03-04 at 00:48:38ID: 23792801
Data transfer comes in several ways (serial might be the only one you have, but there might be better methods...?)
jects/open obex/ # LIB g/openobex /wiki/Obex Ftp # Client uetooth/so bexsrv.php # Server
et/
Many devices implement OBEX (object exchange) over Irda & Bluetooth
OBEX is for transfering known chucks of data, with handling after transfer (think vcards, ringtones etc.) in stead of just file transfers.
http://sourceforge.net/pro
http://dev.zuckschwerdt.or
http://www.mulliner.org/bl
And there is the Personal Area Network (PAN) and off course the serial (RFCOMM)
transfers part of the BT stack. PAN behaves like an ethernet, rfcomm like a serial line.
http://bluez.sourceforge.n
RFCOMm is your choice in this case(until now), so you need to configure an rfcomm device (config method is dependant on your version of Bluez).
man rfcomm
After the device is created you can use it like any other device.
You might need to set permisions/ownership right for the user that accesses the device so you don't need root to open it.