Version 1.2.1
	* database schema will be created on startup if not already created
	* if CSV file with active bluetooth devices can not be found, only a debug message will be shown

Version 1.2 - CCC / 26c3 edition
	* global configuration variable $cwd available - will be replaced by current working directory
	* Bluvert is executed in threading mode - no more need for Cron execution
	* execution of Bluetooth neighbourhood discovery is done by - no more need for Cron execution, too
	* sending workers running in threded mode, too - improved performance of sending outstanding messages
	* time span between discovery and sending can be defined in config.ini
	* script for discovering the Bluetooth neighbourhood can be defined in config.ini
	* setting data.current_bluetooth_devices renamed to data.current_bluetooth_devices_csv
		* if argument -r is not given, "*" is used as default recipient
		* if is called with one argument the argument is taken as file name
Version 1.1
	* Bluvert now uses ussp-push as standard sending tool - requires no PIN authentication
	* and added
	* set-active-bluetooth-devices expects now as parameter a path to CSV file
	* documentation updated
	* directory structure updated

Version 1.0
	* Bluvert published on



Bluvert is a small collection of Python scripts which allows you to build up quickly a Bluetooth advertisement or welcome server.
Imagine one of the following situations:

Any of this situations can be realized with Bluvert.

Theory of working

Bluvert uses a more than simple message queuing concept. You can broadcast messages to anyone or an unique device which is identified through Bluetooth MAC address.

Internal working concept

Bluvert is based on two parts: the message queue utility and the daemon.
message queue utility: takes a defined input file and put this file into the queue.

daemon: is the core of Bluvert. It takes a defined CSV file which includes the current Bluetooth devices in your neighbourhood. After execution the daemon searches for outstanding messages of any of the Bluetooth devices which are defined in the CSV file.
If an outstanding message is found, the daemon triggers an external script. This script can be (uses ussp-push which is the default), (uses obexftp which requires a paired device) or any other tool you want ot use.
The daemon itself is working in threaded mode.

Used technologies


Bluvert is licensed under GPLv2.


Bluvert is developed by Christopher Klein <goldenhawk[at]gmx[dot]net>. The project is hosted on sourceforge (


	* Python 2.4 or Python 2.5
	* SQLite3 bindings for Python (python-pysqlite1.1):
		$ sudo apt-get install python-pysqlite1.1
	* A working bluetooth environment on your machine (hcitool and sdptool must be installed)
		$ sudo apt-get install bluez-utils
	* obexftp and/or ussp-push
		$ sudo apt-get install obexftp ussp-push

	* copy all files to a directory of your choice (e.g. /usr/bin/bluvert), this is your $INSTALL_DIR
		$ cp * $INSTALL_DIR
		$ chmod o+x script/ script/ script/
	* create a directory for storing your message files, this is your $STORAGE_DIR
		$ mkdir /var/local/bluvert-storage
	  Make sure, that $STORAGE_DIR can be written by and read by! 
	* edit your $INSTALL_DIR/config.ini:
		* change "storage_dir" to your $STORAGE_DIR

Testing (active Bluetooth devices):
	* power on Bluetooth on your mobile phone and check Bluetooth is working correctly on your machine.  Be sure your mobile phone is listed in bt-devices.csv
		$ $INSTALL_DIR/script/ $INSTALL_DIR/data/bt-devices.csv
		$ cat $INSTALL_DIR/data/bt-devices.csv

Testing (adding a new message to your queue):
	* do
		$ echo "Hello world" >> /tmp/bt.txt
		$ $INSTALL_DIR/ -r $YOUR_MOBILE_BT_MAC -f /tmp/bt.txt -m

	* Verify that /tmp/bt.txt does not longer exist. 
	* Verify that in $STORAGE_DIR a new file called has been created

Testing (executing the daemon):
	* execute $INSTALL_DIR/
	* check the output for failures
	* you should now receive the file on your mobile phone

More configuration options:
$INSTALL_DIR/config.ini includes the following options:
	* $cwd will be replaced in all configuration settings with the current working directory
	* [sql.file]: Path to your SQLite3 database. There is no reason why it should be changed
	* [data.current_bluetooth_devices_csv]: Path to comma seperated file with active BT devices. This is equal to the parameter of
	* [data.storage_dir]: Your storage directory
	* [exec.send_command]: This command is executed if an active BT device has outstanding messages. 
	  "$mac" will be internally replaced by target MAC address.
	  "$path_to_file" is the absolute path to the file which has to be sent
	* [exec.bt_search_command]: This command is executed for discovering the active Bluetooth devices in your neighbourhood.
	  "$current_bluetooth_devices_csv" will be internally replaced by [data.current_bluetooth_devices_csv]
	* [threading.sendworker_sleep]: Timespan in seconds between next execution of send worker thread
	* [threading.bt_search_sleep]: Timespan in seconds between next execution of Bluetooth discovery thread

	* There are no options. All options are taken from $INSTALL_DIR/config.ini
	* -r|--recipient (optional): MAC address of BT device. If you use "*" the message is sent to every device. If this argument is not given '*' is used as recipient
	* -f|--file  (required): File which has to be sent
	* -e|--expires (optional): This parameter sets a timelimit in seconds for sending files. After this timeout, the message is discarded. 
	  Default is "0" which means "no timeout".
	* -m|--move (optional): The file will be moved instead of being copied. Default is copying mode.

	* ./ -r * -f /tmp/welcome.wav
	  Will send the audio file welcome.wav (-f) to any BT device in your neighbourhood. 
	  There is no timeout so this file is send to any BT device exactly one time. 
	* ./ /tmp/welcome.wav
	  Same as before
	* ./ -r 00:11:22:33:44:55 -f /tmp/backup-finished.txt
	  Will send the text file backup-finished.txt exactly one time to Bluetooth adapter 00:11:22:33:44:55
	* ./ -r 00:11:22:33:44:55 -f /tmp/backup-finished.txt -m
	  Same as before but /tmp/backup-finished.txt will no longer exist.
	* ./ -r 00:11:22:33:44:55 -f /tmp/pic-of-the-day.jpg -e 86400
	  Will send the JPEG pic-of-the-day.jpg to Bluetooth adapter 00:11:22:33:44:55. After 86400 seconds (24 hours) the message is discarded.