diff --git a/.gitignore b/.gitignore
index dd71f95..7fb8a54 100644
--- a/.gitignore
+++ b/.gitignore
attrib/gatttool
tools/avinfo
tools/bccmd
+tools/hwdb
tools/ciptool
tools/hciattach
tools/hciconfig
diff --git a/Makefile.tools b/Makefile.tools
index f53760d..333c16e 100644
--- a/Makefile.tools
+++ b/Makefile.tools
if EXPERIMENTAL
noinst_PROGRAMS += tools/bdaddr tools/avinfo tools/avtest tools/scotest \
- tools/hcieventmask tools/hcisecfilter \
+ tools/hcieventmask tools/hcisecfilter tools/hwdb \
tools/btmgmt tools/btattach tools/btsnoop \
tools/btiotest tools/mpris-player
tools_hcieventmask_LDADD = lib/libbluetooth-private.la
+tools_hwdb_LDADD = lib/libbluetooth-private.la
+
tools_btmgmt_SOURCES = tools/btmgmt.c src/glib-helper.c src/eir.c
tools_btmgmt_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@
diff --git a/tools/hwdb.c b/tools/hwdb.c
new file mode 100644
index 0000000..3e591f7
--- /dev/null
+++ b/tools/hwdb.c
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <bluetooth/bluetooth.h>
+
+int main(int argc, char *argv[])
+{
+ uint16_t id;
+
+ printf("# This file is part of systemd.\n");
+ printf("#\n");
+ printf("# Data imported from:\n");
+ printf("# http://www.bluetooth.org/Technical/AssignedNumbers/identifiers.htm\n");
+ printf("\n");
+
+ for (id = 0;; id++) {
+ char *str;
+
+ str = bt_compidtostr(id);
+ if (!str)
+ break;
+
+ if (!strcmp(str, "internal use"))
+ break;
+
+ if (!strcmp(str, "not assigned"))
+ continue;
+
+ printf("bluetooth:v%04X*\n", id);
+ printf(" ID_VENDOR_FROM_DATABASE=%s\n", str);
+ printf("\n");
+ }
+
+ return 0;
+}