From b78d65bd68c06977893b4d54a7c930603962d38e Mon Sep 17 00:00:00 2001 From: thatlittlegit Date: Thu, 15 Apr 2021 22:39:00 -0400 Subject: [PATCH 1/2] Build documentation during the build This is a bit of a large commit: * Move the documentation into a dedicated doc/ folder. This is somewhat optional, but it does make it more of a first-class citizen instead of being buried in contrib/man. Plus, contrib/ doesn't have a Makefile.am, and I wanted the subdirectory in Makefile.am to be a direct child. * Remove the contrib/build-mans.sh, replacing it with the Autotools infrastructure. Autotools will use the POD2MAN variable to indicate where it is located, and it can be overridden by the user. * Remove the existing, prebuilt manpages, to clean up the src/ folder. * Add a --without-manpages option, if the user doesn't want manpages for some reason. I didn't remove the unused manpages (bt-input, bt-monitor, etc.) just in case they exist in future. They aren't built until they're put into doc/Makefile.am. --- .gitignore | 1 + Makefile.am | 2 +- configure.ac | 9 +- contrib/build-mans.sh | 14 -- doc/Makefile.am | 8 + {contrib/man => doc}/bt-adapter.pod | 0 {contrib/man => doc}/bt-agent.pod | 0 {contrib/man => doc}/bt-audio.pod | 0 {contrib/man => doc}/bt-device.pod | 0 {contrib/man => doc}/bt-input.pod | 0 {contrib/man => doc}/bt-monitor.pod | 0 {contrib/man => doc}/bt-network.pod | 0 {contrib/man => doc}/bt-obex.pod | 0 {contrib/man => doc}/bt-serial.pod | 0 src/Makefile.am | 2 - src/bt-adapter.1 | 243 -------------------------- src/bt-agent.1 | 187 -------------------- src/bt-device.1 | 253 ---------------------------- src/bt-network.1 | 179 -------------------- src/bt-obex.1 | 200 ---------------------- 20 files changed, 18 insertions(+), 1080 deletions(-) delete mode 100755 contrib/build-mans.sh create mode 100644 doc/Makefile.am rename {contrib/man => doc}/bt-adapter.pod (100%) rename {contrib/man => doc}/bt-agent.pod (100%) rename {contrib/man => doc}/bt-audio.pod (100%) rename {contrib/man => doc}/bt-device.pod (100%) rename {contrib/man => doc}/bt-input.pod (100%) rename {contrib/man => doc}/bt-monitor.pod (100%) rename {contrib/man => doc}/bt-network.pod (100%) rename {contrib/man => doc}/bt-obex.pod (100%) rename {contrib/man => doc}/bt-serial.pod (100%) delete mode 100644 src/bt-adapter.1 delete mode 100644 src/bt-agent.1 delete mode 100644 src/bt-device.1 delete mode 100644 src/bt-network.1 delete mode 100644 src/bt-obex.1 diff --git a/.gitignore b/.gitignore index 9c20b45..a822ecc 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ src/bt-serial stamp-h1 test_* tmp/ +*.1 diff --git a/Makefile.am b/Makefile.am index d207b4b..7c1f105 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,6 @@ dist-hook: CLEANFILES = $(top_srcdir)/.version -SUBDIRS = src +SUBDIRS = doc src EXTRA_DIST = git-version-gen diff --git a/configure.ac b/configure.ac index 789140f..3684dd3 100644 --- a/configure.ac +++ b/configure.ac @@ -58,5 +58,12 @@ LIBREADLINE="-lreadline" AC_SUBST(LIBREADLINE) -AC_CONFIG_FILES([Makefile src/Makefile]) +AC_ARG_WITH([manpages], + [AS_HELP_STRING([--without-manpages], [disable building the manual pages])], + [], + [AC_CHECK_PROG(POD2MAN, [pod2man], [pod2man]) + AS_IF([test -z "x$POD2MAN"], + [AC_MSG_WARN([Couldn't find $POD2MAN, won't build manpages])])]) + +AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile]) AC_OUTPUT diff --git a/contrib/build-mans.sh b/contrib/build-mans.sh deleted file mode 100755 index 5c85283..0000000 --- a/contrib/build-mans.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -pod2man -n bt-adapter -c "bluez-tools" -r "" man/bt-adapter.pod > ../src/bt-adapter.1 -pod2man -n bt-agent -c "bluez-tools" -r "" man/bt-agent.pod > ../src/bt-agent.1 -pod2man -n bt-device -c "bluez-tools" -r "" man/bt-device.pod > ../src/bt-device.1 - -# pod2man -n bt-monitor -c "bluez-tools" -r "" man/bt-monitor.pod > ../src/bt-monitor.1 - -# pod2man -n bt-audio -c "bluez-tools" -r "" man/bt-audio.pod > ../src/bt-audio.1 -# pod2man -n bt-input -c "bluez-tools" -r "" man/bt-input.pod > ../src/bt-input.1 -pod2man -n bt-network -c "bluez-tools" -r "" man/bt-network.pod > ../src/bt-network.1 -# pod2man -n bt-serial -c "bluez-tools" -r "" man/bt-serial.pod > ../src/bt-serial.1 - -pod2man -n bt-obex -c "bluez-tools" -r "" man/bt-obex.pod > ../src/bt-obex.1 diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..c17419e --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,8 @@ +dist_man_MANS = bt-adapter.1 \ + bt-agent.1 \ + bt-device.1 \ + bt-network.1 \ + bt-obex.1 + +.pod.1: + $(POD2MAN) -c "General Commands Manual" -r "$(PACKAGE_NAME) $(PACKAGE_VERSION)" $^ >$@ diff --git a/contrib/man/bt-adapter.pod b/doc/bt-adapter.pod similarity index 100% rename from contrib/man/bt-adapter.pod rename to doc/bt-adapter.pod diff --git a/contrib/man/bt-agent.pod b/doc/bt-agent.pod similarity index 100% rename from contrib/man/bt-agent.pod rename to doc/bt-agent.pod diff --git a/contrib/man/bt-audio.pod b/doc/bt-audio.pod similarity index 100% rename from contrib/man/bt-audio.pod rename to doc/bt-audio.pod diff --git a/contrib/man/bt-device.pod b/doc/bt-device.pod similarity index 100% rename from contrib/man/bt-device.pod rename to doc/bt-device.pod diff --git a/contrib/man/bt-input.pod b/doc/bt-input.pod similarity index 100% rename from contrib/man/bt-input.pod rename to doc/bt-input.pod diff --git a/contrib/man/bt-monitor.pod b/doc/bt-monitor.pod similarity index 100% rename from contrib/man/bt-monitor.pod rename to doc/bt-monitor.pod diff --git a/contrib/man/bt-network.pod b/doc/bt-network.pod similarity index 100% rename from contrib/man/bt-network.pod rename to doc/bt-network.pod diff --git a/contrib/man/bt-obex.pod b/doc/bt-obex.pod similarity index 100% rename from contrib/man/bt-obex.pod rename to doc/bt-obex.pod diff --git a/contrib/man/bt-serial.pod b/doc/bt-serial.pod similarity index 100% rename from contrib/man/bt-serial.pod rename to doc/bt-serial.pod diff --git a/src/Makefile.am b/src/Makefile.am index cd7d261..0ab0b0f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,5 +51,3 @@ bt_device_SOURCES = $(lib_sources) $(bluez_sources) bt-device.c bt_network_SOURCES = $(lib_sources) $(bluez_sources) bt-network.c bt_obex_SOURCES = $(lib_sources) $(bluez_sources) bt-obex.c bt_obex_LDADD = $(LDADD) $(LIBREADLINE) - -dist_man_MANS = bt-adapter.1 bt-agent.1 bt-device.1 bt-network.1 bt-obex.1 diff --git a/src/bt-adapter.1 b/src/bt-adapter.1 deleted file mode 100644 index f24eef6..0000000 --- a/src/bt-adapter.1 +++ /dev/null @@ -1,243 +0,0 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "bt-adapter 1" -.TH bt-adapter 1 "2014-08-01" "" "bluez-tools" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -bt\-adapter \- a bluetooth adapter manager -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -bt-adapter [\s-1OPTION...\s0] -.PP -Help Options: - \-h, \-\-help -.PP -Application Options: - \-l, \-\-list - \-a, \-\-adapter= - \-i, \-\-info - \-d, \-\-discover - \-\-set -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -This utility is used to manage Bluetooth adapters. You can list all available adapters, -show information about adapter, change adapter properties or discover remote devices. -.SH "OPTIONS" -.IX Header "OPTIONS" -\&\fB\-h, \-\-help\fR - Show help -.PP -\&\fB\-l, \-\-list\fR - List all available adapters -.PP -\&\fB\-a, \-\-adapter \fR - Specify adapter to use by his Name or \s-1MAC\s0 address - (if this option does not defined \- default adapter used) -.PP -\&\fB\-i, \-\-info\fR - Show information about adapter (returns all properties) -.PP -\&\fB\-d, \-\-discover\fR - Discover remote devices (with remote device name resolving) -.PP -\&\fB\-\-set \fR - Change adapter properties (see \s-1ADAPTER PROPERTIES\s0 section for list - of available properties) -.SH "ADAPTER PROPERTIES" -.IX Header "ADAPTER PROPERTIES" -string Address [ro] - The Bluetooth adapter address (\s-1MAC\s0). -.PP -string Alias [rw] - The Bluetooth adapter friendly name. -.PP -uint32 Class [ro] - The Bluetooth class of device. -.PP -boolean Powered [rw] - Switch an adapter on or off. This will also set the - appropiate connectable state. -.PP -boolean Discoverable [rw] - Switch an adapter to discoverable or non-discoverable - to either make it visible or hide it. -.PP -.Vb 3 -\& If the DiscoverableTimeout is set to a non\-zero -\& value then the system will set this value back to -\& false after the timer expired. -\& -\& In case the adapter is switched off, setting this -\& value will fail. -.Ve -.PP -boolean Pairable [rw] - Switch an adapter to pairable or non-pairable. -.PP -.Vb 2 -\& Note that this property only affects incoming pairing -\& requests. -.Ve -.PP -uint32 PaireableTimeout [rw] - The pairable timeout in seconds. A value of zero - means that the timeout is disabled and it will stay in - pareable mode forever. -.PP -uint32 DiscoverableTimeout [rw] - The discoverable timeout in seconds. A value of zero - means that the timeout is disabled and it will stay in - discoverable/limited mode forever. -.PP -.Vb 2 -\& The default value for the discoverable timeout should -\& be 180 seconds (3 minutes). -.Ve -.PP -boolean Discovering [ro] - Indicates that a device discovery procedure is active. -.PP -list UUIDs [ro] - List of 128\-bit UUIDs that represents the available local - services. -.SH "AUTHOR" -.IX Header "AUTHOR" -Alexander Orlenko . -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIbt\-agent\fR\|(1) \fIbt\-device\fR\|(1) \fIbt\-network\fR\|(1) diff --git a/src/bt-agent.1 b/src/bt-agent.1 deleted file mode 100644 index 98a5226..0000000 --- a/src/bt-agent.1 +++ /dev/null @@ -1,187 +0,0 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "bt-agent 1" -.TH bt-agent 1 "2014-08-03" "" "bluez-tools" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -bt\-adapter \- a bluetooth agent -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -bt-agent [\s-1OPTION...\s0] -.PP -Help Options: - \-h, \-\-help -.PP -Application Options: - \-c, \-\-capability= - \-p, \-\-pin - \-d, \-\-daemon -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -This interactive utility is used to manage incoming Bluetooth requests -(eg. request of pincode, request of authorize a connection/service request, etc). -.SH "OPTIONS" -.IX Header "OPTIONS" -\&\fB\-h, \-\-help\fR - Show help -.PP -\&\fB\-c, \-\-capability \fR - Specify the input and output capabilities of the agent. - `capability` can be one of: - DisplayOnly - DisplayYesNo (default) - KeyboardOnly - NoInputNoOutput - (if this option does not defined \- `DisplayYesNo' will be used) -.PP -\&\fB\-p, \-\-pin - Use a file that holds a list of authorization codes for each device by name or mac address. - The contents of the file should be in this format: - \s-1AA:BB:CC:DD:EE:FF 123456 - \s0 RemoteDeviceName * (accept any pin code) - If a pin file is included, it will check the passkey of the pairing device against the key included in the file. It will automatically authorize the device if the key matches, otherwise it will request the user for manual authorization. -.PP -\&\fB\-d, \-\-daemon\fR - Run the agent as a background process (as a daemon). - The agent will rely on a pin file and request no manual user authorization. Any devices that attempt to pair without a valid passkey defined in the pin file will be automatically rejected. -.SH "AUTHOR" -.IX Header "AUTHOR" -Alexander Orlenko . -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIbt\-adapter\fR\|(1) \fIbt\-device\fR\|(1) \fIbt\-network\fR\|(1) diff --git a/src/bt-device.1 b/src/bt-device.1 deleted file mode 100644 index 2bb2f94..0000000 --- a/src/bt-device.1 +++ /dev/null @@ -1,253 +0,0 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "bt-device 1" -.TH bt-device 1 "2014-08-01" "" "bluez-tools" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -bt\-device \- a bluetooth device manager -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -bt-device [\s-1OPTION...\s0] -.PP -Help Options: - \-h, \-\-help -.PP -Application Options: - \-a, \-\-adapter= - \-l, \-\-list - \-c, \-\-connect= - \-d, \-\-disconnect= - \-r, \-\-remove= - \-i, \-\-info= - \-s, \-\-services [] - \-\-set - \-v, \-\-verbose -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -This utility is used to manage Bluetooth devices. You can list added devices, -connect to a new device, disconnect device, remove added device, show info -about device, discover remote device services or change device properties. -.SH "OPTIONS" -.IX Header "OPTIONS" -\&\fB\-h, \-\-help\fR - Show help -.PP -\&\fB\-a, \-\-adapter \fR - Specify adapter to use by his Name or \s-1MAC\s0 address - (if this option does not defined \- default adapter used) -.PP -\&\fB\-l, \-\-list\fR - List added devices -.PP -\&\fB\-c, \-\-connect \fR - Connect to the remote device by his \s-1MAC,\s0 retrieve all \s-1SDP - \s0 records and then initiate the pairing -.PP -\&\fB\-d, \-\-disconnect \fR - Disconnects a specific remote device by terminating the - low-level \s-1ACL\s0 connection. -.PP -\&\fB\-r, \-\-remove\fR - Remove device (and also the pairing information) -.PP -\&\fB\-i, \-\-info\fR - Show information about device (returns all properties) -.PP -\&\fB\-s, \-\-services []\fR - Starts the service discovery to retrieve remote service records, - the `pattern` parameter can be used to specify specific UUIDs -.PP -\&\fB\-\-set \fR - Change device properties (see \s-1DEVICE PROPERTIES\s0 section for list - of available properties) -.PP -\&\fB\-v, \-\-verbose\fR - Verbosely display remote service records (affect to service - discovery mode) -.SH "DEVICE PROPERTIES" -.IX Header "DEVICE PROPERTIES" -string Address [ro] - The Bluetooth device address (\s-1MAC\s0) of the remote device. -.PP -string Name [ro] - The Bluetooth remote device name. -.PP -string Icon [ro] - Proposed icon name according to the freedesktop.org - icon naming specification. -.PP -uint32 Class [ro] - The Bluetooth class of device of the remote device. -.PP -list UUIDs [ro] - List of 128\-bit UUIDs that represents the available - remote services. -.PP -boolean Paired [ro] - Indicates if the remote device is paired. -.PP -boolean Connected [ro] - Indicates if the remote device is currently connected. -.PP -boolean Trusted [rw] - Indicates if the remote is seen as trusted. -.PP -boolean Blocked [rw] - If set to true any incoming connections from the - device will be immediately rejected. -.PP -string Alias [rw] - The name alias for the remote device. The alias can - be used to have a different friendly name for the - remote device. -.PP -.Vb 3 -\& In case no alias is set, it will return the remote -\& device name. Setting an empty string as alias will -\& convert it back to the remote device name. -.Ve -.PP -boolean LegacyPairing [ro] - Set to true if the device only supports the pre\-2.1 - pairing mechanism. -.SH "AUTHOR" -.IX Header "AUTHOR" -Alexander Orlenko . -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIbt\-adapter\fR\|(1) \fIbt\-agent\fR\|(1) \fIbt\-network\fR\|(1) diff --git a/src/bt-network.1 b/src/bt-network.1 deleted file mode 100644 index 0a6381c..0000000 --- a/src/bt-network.1 +++ /dev/null @@ -1,179 +0,0 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "bt-network 1" -.TH bt-network 1 "2014-08-01" "" "bluez-tools" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -bt\-network \- a bluetooth network manager -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -bt-network [\s-1OPTION...\s0] -.PP -Help Options: - \-h, \-\-help -.PP -Application Options: - \-a, \-\-adapter= - \-c, \-\-connect - \-s, \-\-server -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -This utility is used to manage network services (client/server). -All servers will be automatically unregistered when the application terminates. -.SH "OPTIONS" -.IX Header "OPTIONS" -\&\fB\-h, \-\-help\fR - Show help -.PP -\&\fB\-a, \-\-adapter \fR - Specify adapter to use by his Name or \s-1MAC\s0 address - (if this option does not defined \- default adapter used) -.PP -\&\fB\-c, \-\-connect \fR - Connect to the network device and return the network interface - name, uuid can be either one of \*(L"gn\*(R", \*(L"panu\*(R" or \*(L"nap\*(R" -.PP -\&\fB\-s, \-\-server \fR - Register server for the provided \s-1UUID,\s0 every new connection to - this server will be added the bridge interface -.SH "AUTHOR" -.IX Header "AUTHOR" -Alexander Orlenko . -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIbt\-adapter\fR\|(1) \fIbt\-agent\fR\|(1) \fIbt\-device\fR\|(1) diff --git a/src/bt-obex.1 b/src/bt-obex.1 deleted file mode 100644 index 3456354..0000000 --- a/src/bt-obex.1 +++ /dev/null @@ -1,200 +0,0 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. if !\nF==2 \{ -. nr % 0 -. nr F 2 -. \} -. \} -.\} -.rr rF -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "bt-obex 1" -.TH bt-obex 1 "2014-08-01" "" "bluez-tools" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -bt\-obex \- a bluetooth OBEX client/server -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -bt-obex [\s-1OPTION...\s0] -.PP -Help Options: - \-h, \-\-help -.PP -Application Options: - \-a, \-\-adapter= - \-s, \-\-server [] - \-p, \-\-opp - \-f, \-\-ftp= -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -This utility implemented support of Object Push Profile (\s-1OPP\s0) and File Transfer Profile (\s-1FTP\s0). -You can send and receive files to/from remote device using this tool. -.SH "OPTIONS" -.IX Header "OPTIONS" -\&\fB\-h, \-\-help\fR - Show help -.PP -\&\fB\-a, \-\-adapter \fR - Specify adapter to use by his Name or \s-1MAC\s0 address - (if this option does not defined \- default adapter used) -.PP -\&\fB\-s, \-\-server []\fR - Register agent at \s-1OBEX\s0 server and set incoming/root directory to - `path` or current folder will be used; Agent is used to - accept/reject incoming bluetooth object push requests -.PP -\&\fB\-p, \-\-opp \fR - Send local file to the specified remote device using object push - profile -.PP -\&\fB\-f, \-\-ftp \fR - Start \s-1FTP\s0 session with remote device; If session opened - successfuly, \s-1FTP\s0 shell will be opened -.PP -.Vb 1 -\& FTP commands: -\& -\& help Show help message -\& exit Close FTP session -\& cd Change the current folder of the remote device -\& mkdir Create a new folder in the remote device -\& ls List folder contents -\& get Copy the src file (from remote device) to the dst file (on local filesystem) -\& put Copy the src file (from local filesystem) to the dst file (on remote device) -\& cp Copy a file within the remote device from src file to dst file -\& mv Move a file within the remote device from src file to dst file -\& rm Deletes the specified file/folder -.Ve -.SH "AUTHOR" -.IX Header "AUTHOR" -Alexander Orlenko . -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fIbt\-adapter\fR\|(1) \fIbt\-agent\fR\|(1) \fIbt\-device\fR\|(1) \fIbt\-network\fR\|(1) From 7444af0762c66afc0c98fe1a9c49e650ec1270a1 Mon Sep 17 00:00:00 2001 From: thatlittlegit Date: Thu, 15 Apr 2021 23:14:45 -0400 Subject: [PATCH 2/2] Implement bt-audio --- README | 5 ++ doc/Makefile.am | 1 + src/Makefile.am | 3 +- src/bt-audio.c | 130 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 src/bt-audio.c diff --git a/README b/README index 8121e29..6e97db8 100644 --- a/README +++ b/README @@ -33,6 +33,11 @@ bt-agent authorize a connection/service request, etc) +bt-audio +======== + +- Connect to devices to play audio from them + bt-device ========= diff --git a/doc/Makefile.am b/doc/Makefile.am index c17419e..7ef9886 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,6 @@ dist_man_MANS = bt-adapter.1 \ bt-agent.1 \ + bt-audio.1 \ bt-device.1 \ bt-network.1 \ bt-obex.1 diff --git a/src/Makefile.am b/src/Makefile.am index 0ab0b0f..6ef48b0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,9 +44,10 @@ lib_sources = lib/agent-helper.c lib/agent-helper.h \ lib/sdp.c lib/sdp.h \ lib/bluez-api.h -bin_PROGRAMS = bt-adapter bt-agent bt-device bt-network bt-obex +bin_PROGRAMS = bt-adapter bt-agent bt-audio bt-device bt-network bt-obex bt_adapter_SOURCES = $(lib_sources) $(bluez_sources) bt-adapter.c bt_agent_SOURCES = $(lib_sources) $(bluez_sources) bt-agent.c +bt_audio_SOURCES = $(lib_sources) $(bluez_sources) bt-audio.c bt_device_SOURCES = $(lib_sources) $(bluez_sources) bt-device.c bt_network_SOURCES = $(lib_sources) $(bluez_sources) bt-network.c bt_obex_SOURCES = $(lib_sources) $(bluez_sources) bt-obex.c diff --git a/src/bt-audio.c b/src/bt-audio.c new file mode 100644 index 0000000..3316fdf --- /dev/null +++ b/src/bt-audio.c @@ -0,0 +1,130 @@ +/* + * + * bluez-tools - a set of tools to manage bluetooth devices for linux + * + * + * 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 +#endif + +#include +#include +#include + +#include "lib/dbus-common.h" +#include "lib/helpers.h" +#include "lib/bluez-api.h" + +int main(int argc, char** argv) +{ + GError *error = NULL; + + setlocale(LC_CTYPE, ""); + + dbus_init(); + + gchar *adapter_arg = NULL; + gchar *connect_arg = NULL; + gchar *disconnect_arg = NULL; + GOptionEntry options[] = { + {"adapter", 'a', 0, G_OPTION_ARG_STRING, &adapter_arg, "Adapter name or MAC", ""}, + {"connect", 'c', 0, G_OPTION_ARG_STRING, &connect_arg, "The device to connect to", ""}, + {"disconnect", 'd', 0, G_OPTION_ARG_STRING, &disconnect_arg, "The device to disconnect from", ""}, + {NULL} + }; + + GOptionContext *context = g_option_context_new(" - a Bluetooth generic audio manager"); + g_option_context_add_main_entries(context, options, NULL); + g_option_context_set_summary(context, "Version "PACKAGE_VERSION); + g_option_context_set_description(context, + "Report bugs to <"PACKAGE_BUGREPORT">.\n" + "Project home page <"PACKAGE_URL">."); + + if (!g_option_context_parse(context, &argc, &argv, &error)) { + g_print("%s: %s\n", g_get_prgname(), error->message); + g_print("Try `%s --help` for more information.\n", g_get_prgname()); + + g_option_context_free(context); + return EXIT_FAILURE; + } + + g_option_context_free(context); + + if (!dbus_system_connect(&error)) { + g_printerr("Couldn't connect to D-Bus system bus: %s\n", error->message); + + g_free(adapter_arg); + g_free(connect_arg); + g_free(disconnect_arg); + return EXIT_FAILURE; + } + + if (!intf_supported(BLUEZ_DBUS_SERVICE_NAME, MANAGER_DBUS_PATH, MANAGER_DBUS_INTERFACE)) { + g_printerr("%s: BlueZ service not found." + "Did you forget to run bluetoothd?\n", + g_get_prgname()); + + g_free(adapter_arg); + g_free(connect_arg); + g_free(disconnect_arg); + return EXIT_FAILURE; + } + + Adapter *adapter = find_adapter(adapter_arg, &error); + g_free(adapter_arg); + exit_if_error(error); + + Device *device; + if (connect_arg) { + device = find_device(adapter, connect_arg, &error); + } else if (disconnect_arg) { + device = find_device(adapter, disconnect_arg, &error); + } else { + g_printerr("%s: You need to provide either --connect or --disconnect.\n", g_get_prgname()); + + g_free(connect_arg); + g_free(disconnect_arg); + return EXIT_FAILURE; + } + + g_object_unref(adapter); + exit_if_error(error); + + if (device == NULL) { + g_printerr("%s: Invalid device '%s'.\n", g_get_prgname(), + connect_arg ? connect_arg : disconnect_arg); + + g_free(connect_arg); + g_free(disconnect_arg); + + return EXIT_FAILURE; + } + + g_free(connect_arg); + g_free(disconnect_arg); + + if (connect_arg) + device_connect(device, &error); + else + device_disconnect(device, &error); + + g_object_unref(device); + exit_if_error(error); + + return EXIT_SUCCESS; +}