Command to find bluetooth device from command line in UBUNTU

hcitool scan

Sending file to bluetooth device from command line

gnome-obex-send -d $device /path/to/file

NAME
obexpushd - receive files with OBEX protocol via Bluetooth, IrDA or
network connection

SYNOPSIS
obexpushd [-B [[[address]:]channel]] [-I[app]] [-N [[[address]:]port]]
[-p file] [-a file] [-r file] [-s file] [-n | -d] [-h | -v]

DESCRIPTION
obexpushd is a program that can be used to receive files using OBEX
(OBject EXchange) protocol over Bluetooth, IrDA or network connection.
It can be used to receive files from mobile phones and other devices.

When run without -d or -n options obexpushd puts itself to the
background and starts to listen for incoming connections via Bluetooth
(default) and/or IrDA and/or network connection(TCP). obexpushd saves
all received files to it´s current directory but can alternativly
forward all received data to a script for further processing.

OPTIONS
-B
Listen to Bluetooth connections. It is possible to specify an
address of a local adapter and a channel number to listen to.
Default is to use channel 9. The address can be either a bluetooth
adapter interface name (e.g. "hci0"), only the number of that
interface (e.g. "0") or the interface address enclosed in brackets
(e.g. "[11:22:33:44:55:66]").

-I
Listen to IrDA connections on the default inbox and, in addition
and optionally, to the inbox identified by app (example: IrXfer)

-N
Listen to network connections. If compiled with TcpOBEX support
(openobex > 1.3), it is possible to specify an address and a port
number to listen to (default: *:650). Note that to bind to the
default TCP OBEX port, you need root priviledges. The address can
either be an IPv4 address in quad-dot-notation (e.g. "127.0.0.1"),
an IPv6 address enclosed in brackets (e.g. "[::1]") or a "*" as
alias for "[::]".

-p
Write the process ID of the daemon to file

-a
Read user:password pairs from each line of file. Note that many
client cannot handle authentication and will stop working when
using this option. A realm of "obexpushd" will be sent to the
client. Note that no encoding is used, the plain byte sequence will
be matched. The user identifier must not be longer than 20 bytes
and the password must not be longer than 128 bytes. If file starts
with a pipe symbol, the file after the pipe symbol will be executed
with one argument, the user name. The output shall be the same as a
file line.

-r
Read realm:user:password triples from each line of file. This is
only needed if a client wants a server that authenticates itself.
The realm is a value sent by the client. User and password from the
first realm match are used. The value of realm can have zero
length, else it must be encoded in UTF-8. The values for user and
password to not have any encoding, the plain byte sequence will be
used. The user identifier must not be longer than 20 bytes and the
password must not be longer than 128 bytes. If file starts with a
pipe symbol, the file after the pipe symbol will be executed with
one argument, the realm. The output shall be the same as a file
line.

-s
Open pipes to the script or program specified by file. These pipes
are seen by the program as stdin and stdout. There is one
parameter, that can be either "put" or "get".

Further parameters are fed to the script via stdin. With the first
parameter being "put", data optionally follows on stdin. With
"get", parameters and data are read via stdout. Parameters that are
transmitted via stdin or stdout have the form "Parameter: value".
The first empty line seperates parameters and data. The empty line
can be the first line. In this case, no parameters are present.
Line delimiter is system specific. The possible parameters are:

· "From: type/client-identifier" which specifies the client
address. Currently, types can be "bluetooth", "irda" or "tcp".
The client identifier is an address (embraced in brackets) with
optionally a port (seperated by a colon).

· "Name: utf8-string" (required on "get" output) which specifies
the file name,

· "Length: uint32" (required on "get" output) which specifies the
amount of data in bytes in the data section that follows, and

· "Type: ascii-string" which specifies the mime type of the data.
Unknown parameters shall be ignored. With "put", obexpushd is
waiting for an ok after the list of parameters. The script must
either print a line with "OK" to stdout to accept the input or
a line with any other content to reject it.

-n
Do not detach from terminal.

-d
Enable debug messages (implies -n).

-h
Show summary of options.

-v
Show version of program.

AUTHORS
Hendrik Sattler
Author.

Eugeniy Meshcheryakov
texted the first version of the manpage

samba blocking in Karmi Koala

sudo ufw allow 445

solves this 
problem in Karmic Koala