summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-10-25 05:44:23 +0000
committerMarcel Holtmann <marcel@holtmann.org>2004-10-25 05:44:23 +0000
commite0a9a33079d4ae64c6553e02f5da4f5a039c372f (patch)
tree124e068da886f01fd5cdfd1cb76efef851b644b3 /tools
parentb3f9653837d74d6866c90114e52d9d4c024d6423 (diff)
Display revision information for Digianswer devices
Diffstat (limited to 'tools')
-rw-r--r--tools/hciconfig.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 862deeb9..9405de08 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -959,7 +959,7 @@ static void print_rev_ericsson(int dd)
unsigned char buf[102];
memset(&rq, 0, sizeof(rq));
- rq.ogf = 0x3f;
+ rq.ogf = OGF_VENDOR_CMD;
rq.ocf = 0x000f;
rq.cparam = NULL;
rq.clen = 0;
@@ -967,7 +967,7 @@ static void print_rev_ericsson(int dd)
rq.rlen = sizeof(buf);
if (hci_send_req(dd, &rq, 1000) < 0) {
- printf("\n Can't read revision info. %s(%d)\n", strerror(errno), errno);
+ printf("\nCan't read revision info. %s(%d)\n", strerror(errno), errno);
return;
}
@@ -998,6 +998,28 @@ static void print_rev_csr(int dd, uint16_t rev)
printf("\tSCO mapping: %s\n", mapsco ? "PCM" : "HCI");
}
+static void print_rev_digianswer(int dd)
+{
+ struct hci_request rq;
+ unsigned char req[] = { 0x07 };
+ unsigned char buf[102];
+
+ memset(&rq, 0, sizeof(rq));
+ rq.ogf = OGF_VENDOR_CMD;
+ rq.ocf = 0x000e;
+ rq.cparam = req;
+ rq.clen = sizeof(req);
+ rq.rparam = &buf;
+ rq.rlen = sizeof(buf);
+
+ if (hci_send_req(dd, &rq, 1000) < 0) {
+ printf("\nCan't read revision info. %s(%d)\n", strerror(errno), errno);
+ return;
+ }
+
+ printf("\t%s\n", buf + 1);
+}
+
static void print_rev_broadcom(uint16_t hci_rev, uint16_t lmp_subver)
{
printf("\tFirmware %d.%d.%03d\n", hci_rev, lmp_subver >> 8, lmp_subver & 0xff);
@@ -1037,6 +1059,9 @@ static void cmd_revision(int ctl, int hdev, char *opt)
case 10:
print_rev_csr(dd, ver.hci_rev);
break;
+ case 12:
+ print_rev_digianswer(dd);
+ break;
case 15:
print_rev_broadcom(ver.hci_rev, ver.lmp_subver);
break;