|
From: Mattias A. <mat...@us...> - 2001-03-26 15:35:47
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bttest.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
added options to inquiry
added ping
The diff of the modified file(s):
--- bttest.c 2001/03/21 19:03:09 1.3
+++ bttest.c 2001/03/26 15:35:44 1.4
@@ -80,11 +80,12 @@
{
"\nMenu",
"------------------------",
- " inq (inquiry scan)",
+ " inq <max nbr resp> <inq time>",
" rf_conn <xx:xx:xx:xx:xx:xx> <srv ch> <line>",
" rf_send <nbr bytes> <nbr repeats> <line>",=20
" rf_disc <line>",
" rf_wait <line>", /* waits for a connection on that line */
+ " ping <xx:xx:xx:xx:xx:xx>",
" setbd <xx:xx:xx:xx:xx:xx>", /* only ericsson HW */
" readbd", /* read module bd address */
" reset", /* reset board */
@@ -107,7 +108,6 @@
" test_conn <xx:xx:xx:xx:xx:xx> <psm>", /* l2cap test using PSM psm */
" test_disc", /* disconnect all (both) test connections */
" test_case_reject <xx:xx:xx:xx:xx:xx>",=20
- " ping <xx:xx:xx:xx:xx:xx>",
" getinfo <xx:xx:xx:xx:xx:xx> <type>",
" ",
" bb_conn <xx:xx:xx:xx:xx:xx>", /* connect only baseband */
@@ -219,10 +219,9 @@
bt_waitconnection(bt_cfd, line);
printf("Connect on line %d\n", line);
}
- else if (strncmp(buf, "inq", 3) =3D=3D 0)
+ else if (sscanf(buf, "inq %d %d", &tmp[0], &tmp[1]) =3D=3D 2)
{
- /* fixme<2> use real params */
- bt_inquiry(bt_cfd, 10, 10);
+ bt_inquiry(bt_cfd, tmp[0], tmp[1]);
}
else if (sscanf(buf, "rf_send %d %d %d", &i, &repeat, &line) =3D=3D 3)
{
@@ -299,25 +298,29 @@
{
bt_showstatus();
}
-/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
-/* FIXME !!! -- make this work for both kernel / usermode stack */
-/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
-
-
-#ifdef BT_USERSTACK
else if (sscanf(buf, "ping %x:%x:%x:%x:%x:%x",
- &bd[0], &bd[1], &bd[2], &bd[3], &bd[4], &bd[5]) =3D=3D 6)
+ &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) =3D=3D 6)
{
+ unsigned char bd[6];
+=20=20=20=20
for (i =3D 0; i < 6; i++)
{
- tmp_bd[i] =3D (unsigned char)bd[i];
+ bd[i] =3D (unsigned char)tmp[i];
}
=20=20
printf("Pinging bd : %02X:%02X:%02X:%02X:%02X:%02X\n",
- tmp_bd[0], tmp_bd[1], tmp_bd[2],
- tmp_bd[3], tmp_bd[4], tmp_bd[5]);
- l2ca_ping(tmp_bd);
+ bd[0], bd[1], bd[2],
+ bd[3], bd[4], bd[5]);
+
+ bt_ping(bt_cfd, bd, NULL, 0);
}
+
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+/* FIXME !!! -- make this work for both kernel / usermode stack */
+/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */
+
+
+#ifdef BT_USERSTACK
else if (sscanf(buf, "getinfo %x:%x:%x:%x:%x:%x %x",
&bd[0], &bd[1], &bd[2], &bd[3], &bd[4], &bd[5],=20
&tmp[0]) =3D=3D 7)
|