summaryrefslogtreecommitdiff
path: root/usr.sbin/btdevctl
diff options
context:
space:
mode:
authorplunky <plunky@NetBSD.org>2006-08-27 11:41:58 +0000
committerplunky <plunky@NetBSD.org>2006-08-27 11:41:58 +0000
commitc980b109dd2730a8c7ae33ade8a608e2c0116645 (patch)
tree38f898279bd03ee37e61329d25ae6d4b9a550687 /usr.sbin/btdevctl
parent5616d106f8703caa5d78f5daf2a32da7222b7447 (diff)
BluetootH SCO Audio update.
Provide an ioctl to set the SCO mtu value in the controller and place limits in the SCO code such that only packets of this size may be sent. Move the mtu option from btsco(4) and btdevctl(8), to the btconfig(8) program. Remove temporary BLUETOOTH_SCO kernel option, and enable SCO socket access. Fix incoming connection handling for btsco(4) and SCO sockets. Fix documentation to reflect the new world order.
Diffstat (limited to 'usr.sbin/btdevctl')
-rw-r--r--usr.sbin/btdevctl/btdevctl.813
-rw-r--r--usr.sbin/btdevctl/cfg.c26
2 files changed, 8 insertions, 31 deletions
diff --git a/usr.sbin/btdevctl/btdevctl.8 b/usr.sbin/btdevctl/btdevctl.8
index d63f3a40b12..96ebf556c93 100644
--- a/usr.sbin/btdevctl/btdevctl.8
+++ b/usr.sbin/btdevctl/btdevctl.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: btdevctl.8,v 1.1 2006/08/13 09:03:23 plunky Exp $
+.\" $NetBSD: btdevctl.8,v 1.2 2006/08/27 11:41:58 plunky Exp $
.\"
.\" Copyright (c) 2006 Itronix Inc.
.\" All rights reserved.
@@ -51,10 +51,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: btdevctl.8,v 1.1 2006/08/13 09:03:23 plunky Exp $
+.\" $Id: btdevctl.8,v 1.2 2006/08/27 11:41:58 plunky Exp $
.\" $FreeBSD: src/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8,v 1.3 2005/01/18 20:02:30 ru Exp $
.\"
-.Dd August 12, 2006
+.Dd August 27, 2006
.Dt BTDEVCTL 8
.Os
.Sh NAME
@@ -97,7 +97,7 @@ and print in legible format.
.It Cm Print
Print configuration entry for
.Ar btdev
-.It Cm Query Oo Fl d Ar device Oc Oo Fl m Ar mtu Oc Fl a Ar address Fl s Ar service
+.It Cm Query Oo Fl d Ar device Oc Fl a Ar address Fl s Ar service
Perform an SDP query to the remote Bluetooth
.Ar address
for the given
@@ -124,11 +124,6 @@ Hands Free Profile
Headset
.El
.Pp
-When configuring SCO Audio devices, the
-.Fl m
-option allows the MTU to be set, see
-.Xr btsco 4
-for details.
.It Cm Remove
Remove config entry for
.Ar btdev
diff --git a/usr.sbin/btdevctl/cfg.c b/usr.sbin/btdevctl/cfg.c
index 6e2141edf78..4040c5ede4b 100644
--- a/usr.sbin/btdevctl/cfg.c
+++ b/usr.sbin/btdevctl/cfg.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cfg.c,v 1.2 2006/08/17 20:16:54 plunky Exp $ */
+/* $NetBSD: cfg.c,v 1.3 2006/08/27 11:41:58 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -53,12 +53,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cfg.c,v 1.2 2006/08/17 20:16:54 plunky Exp $
+ * $Id: cfg.c,v 1.3 2006/08/27 11:41:58 plunky Exp $
* $FreeBSD: src/usr.sbin/bluetooth/bthidcontrol/sdp.c,v 1.2 2006/02/10 19:54:17 markus Exp $
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: cfg.c,v 1.2 2006/08/17 20:16:54 plunky Exp $");
+__RCSID("$NetBSD: cfg.c,v 1.3 2006/08/27 11:41:58 plunky Exp $");
#include <dev/bluetooth/btdev.h>
#include <dev/usb/usb.h>
@@ -151,7 +151,6 @@ static struct {
static sdp_attr_t values[8];
static uint8_t buffer[NUM(values)][512];
-static int mtu;
int
cfg_print(int ac, char **av)
@@ -194,9 +193,8 @@ cfg_query(int ac, char **av)
bdaddr_copy(&laddr, BDADDR_ANY);
bdaddr_copy(&raddr, BDADDR_ANY);
service = NULL;
- mtu = 0;
- while ((ch = getopt(ac, av, "a:d:m:s:")) != -1) {
+ while ((ch = getopt(ac, av, "a:d:s:")) != -1) {
switch (ch) {
case 'a': /* remote address */
if (!bt_aton(optarg, &raddr)) {
@@ -216,10 +214,6 @@ cfg_query(int ac, char **av)
break;
- case 'm': /* mtu for SCO Audio */
- mtu = atoi(optarg);
- break;
-
case 's': /* service */
service = optarg;
break;
@@ -444,12 +438,6 @@ config_hset(prop_dictionary_t dict)
if (obj == NULL || !prop_dictionary_set(dict, "rfcomm-channel", obj))
return errno;
- if (mtu != 0) {
- obj = prop_number_create_integer(mtu);
- if (obj == NULL || !prop_dictionary_set(dict, "mtu", obj))
- return errno;
- }
-
return 0;
}
@@ -491,12 +479,6 @@ config_hfp(prop_dictionary_t dict)
if (obj == NULL || !prop_dictionary_set(dict, "rfcomm-channel", obj))
return errno;
- if (mtu != 0) {
- obj = prop_number_create_integer(mtu);
- if (obj == NULL || !prop_dictionary_set(dict, "mtu", obj))
- return errno;
- }
-
return 0;
}