Bluetooth

HI,

I had plugged in bluetooth dongle in beagleboard and am able to scan
my laptop. But, now I wish to send some raw data to my laptop.

root@beagleboard:~# uname -
a
Linux beagleboard 2.6.29-omap1 #1 Thu Jun 18 04:02:19 CEST 2009 armv7l
GNU/Linux
root@beagleboard:~#
hciconfig
hci0: Type:
USB
        BD Address: 00:15:83:07:C9:7A ACL MTU: 310:10 SCO MTU:
64:8
        UP RUNNING PSCAN
ISCAN
        RX bytes:6055 acl:40 sco:0 events:182 errors:
0
        TX bytes:1960 acl:36 sco:0 commands:59 errors:
0

root@beagleboard:~# hcitool
scan
Scanning ...
        00:1F:E2:DD:6E:AF abhilash-
laptop-0
root@beagleboard:~# rfcomm bind 0 00:1F:E2:DD:6E:AF
1
root@beagleboard:~# l2ping 00:1F:E2:DD:
6E:AF
Ping: 00:1F:E2:DD:6E:AF from 00:15:83:07:C9:7A (data size
44) ...
44 bytes from 00:1F:E2:DD:6E:AF id 0 time
8.76ms
44 bytes from 00:1F:E2:DD:6E:AF id 1 time
9.61ms
44 bytes from 00:1F:E2:DD:6E:AF id 2 time
9.46ms
44 bytes from 00:1F:E2:DD:6E:AF id 3 time
14.68ms
4 sent, 4 received, 0%
loss
root@beagleboard:~# echo "blah" > /dev/
rfcomm0
-sh: can't create /dev/rfcomm0: Connection refused

Any help on how to send and recieve data via bluetooth?

I think you can use raw socket programming to send data via a BT socket. Give a shot in google, while I search my archieve.

For a start (as given in wikipedia), the socket family (as opposed to regular PF_INET) to use would be PF_BLUETOOTH.
However, to use socket programming, you need to enable the LAP (Lan-Access-Profile) or PAN profile and establish an IP address for both the entities.

In case this is not feasible, you can just enable SPP (Serial Port Profile) that would create a serial port like /dev/comN and you can use it just as if a null modem cable is connected (and not to mention, read it the same way). Trust you get the idea. Let me know if you need specific help.

Regards,
Sri.

Oops, I failed to see you are already using SPP. Did you connect them using SPP? I trust you have to connect them after enabling the ports (maybe easier to do from Laptop).