# Sends message as OBEX note to compatible devices (tested with several Nokia models)
# requires 'obexftp' package to be installed

if [ $# -lt 1 ] ; then
  echo "usage: $0 btaddr [ file ... ]"
  exit 255
fi
btaddr="$1"
shift
tmpfile="/tmp/$(hostname) $(date +'%d.%m').txt"
cat "$@" > "$tmpfile"
obexftp -b "$btaddr" -B9 -U none -p "$tmpfile" >/dev/null
rm "$tmpfile"
