An embryo for an Erlang bluetooth application.
sudo hciconfig hci0 up sudo hciconfig hci0 piscan
1> bluetooth_interface:get_local_name().
{ok,"Azure:Dec 3 2010,00:24:03"}
2> bluetooth_interface:set_local_name("pepparkakehus").
ok
3> bluetooth_interface:get_local_name().
{ok,"pepparkakehus"}
4> {ok, Addrs} = bluetooth_interface:discover().
{ok,["00:02:72:C0:63:F4"]}
5> bluetooth_interface:get_remote_name(hd(Addrs)).
{ok,"datorbebis"}
Install package bluez-hcidump and dump all traffic with
sudo hcidump hci0 -X