You can subscribe to this list here.
| 2001 |
Jan
|
Feb
(44) |
Mar
(202) |
Apr
(134) |
May
(89) |
Jun
(94) |
Jul
(58) |
Aug
(58) |
Sep
(56) |
Oct
(75) |
Nov
(26) |
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(24) |
Feb
(30) |
Mar
(15) |
Apr
(49) |
May
(12) |
Jun
(6) |
Jul
(11) |
Aug
(20) |
Sep
(19) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
| 2003 |
Jan
(7) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(51) |
Dec
(1) |
| 2004 |
Jan
(11) |
Feb
(5) |
Mar
|
Apr
(5) |
May
(2) |
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Paul A. <kwi...@if...> - 2002-06-28 12:29:59
|
Hi! I would like to find some documentation about the openBt stack such as "what file does what", the classes, etc... Anyway, i am trying to install the stack but i get this mesage : cc btd.o bt_ipa.o bt_vendor.o bt_if.o bt_misc.o -lreadline -ltermcap -o btdm /usr/bin/ld: cannot find -lreadline My linux distribution is a Mandrake 8.2, and the readline library is installed. I am doing an internship and it's the first time I work exclusively on a Linux OS so forgive the stupid things i'll probably say.... and the mistakes in my lousy english. Best Regards |
|
From: Peter K. <pk...@us...> - 2002-06-17 13:48:02
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.48 1.49=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected set_local_hostname() so it does not hang if unprintable
characters are passed in local_name.
The diff of the modified file(s):
--- bt_if.c 3 Jun 2002 15:31:22 -0000 1.48
+++ bt_if.c 17 Jun 2002 13:47:58 -0000 1.49
@@ -51,6 +51,7 @@
#include <termios.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include <syslog.h>
#include <errno.h>
#include <stdarg.h>
@@ -1342,14 +1343,15 @@
=20
*buf =3D '\0';
=20
- if (*local_name)
+ if (local_name && *local_name)
{
while (*local_name && len < LOCAL_NAME_LENGTH)
{
- if (*local_name >=3D ' ' && *local_name <=3D 'z')
+ if (isprint(*local_name))
{
- buf[len++] =3D *local_name++;
+ buf[len++] =3D *local_name;
}
+ local_name++;
}
=20=20
if (len && add_host)
@@ -1375,13 +1377,13 @@
}
}
}
+
if (len && add_host)
{
strcat(buf, ")");
}
=20
bt_set_local_name(bt_cfd, buf);
-
}
=20
void bt_set_local_name(int bt_cfd, const unsigned char *name)
|
|
From: Alain P. <apa...@us...> - 2002-06-03 15:31:25
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.47 1.48=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Juste correct an error making that with a custom name, the hostname was
added at the end.
The diff of the modified file(s):
--- bt_if.c 3 Jun 2002 10:07:28 -0000 1.47
+++ bt_if.c 3 Jun 2002 15:31:22 -0000 1.48
@@ -1360,6 +1360,8 @@
}
}
=20
+ if (add_host)
+ {
gethostname(&buf[len], HOST_NAME_LENGTH);
=20
if (!strchr(&buf[len], '.'))
@@ -1372,7 +1374,7 @@
strncat(buf, domain_name, DOMAIN_NAME_LENGTH);
}
}
-
+ }
if (len && add_host)
{
strcat(buf, ")");
|
|
From: Alain P. <apa...@us...> - 2002-06-03 10:07:31
|
The following files were modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_if.c 1.46 1.47=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.34 1.35=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_vendor.c 1.34 1.35=20=20=20=20=20=20=20=20=20=20=20=20=20=20
btd.c 1.37 1.38=20=20=20=20=20=20=20=20=20=20=20=20=20=20
btinit.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Correct the option -n (for the custom local name). It was not completely
implemented and it crashed the bti.
The diff of the modified file(s):
--- bt_if.c 22 Apr 2002 15:22:03 -0000 1.46
+++ bt_if.c 3 Jun 2002 10:07:28 -0000 1.47
@@ -70,7 +70,7 @@
/* Functions common for kernel and 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 */
=20
-int init_stack(int bt_cfd)
+int init_stack(int bt_cfd, char * local_name)
{
syslog(LOG_INFO, "Init stack");
=20
@@ -89,7 +89,10 @@
bt_set_classofdevice(bt_cfd, 0x10, 0x3, 0x0, 0x0);
=20
#ifndef __CRIS__
- set_local_hostname(bt_cfd, "AXIS");
+ if (! local_name)
+ set_local_hostname(bt_cfd, "AXIS", 1);
+ else
+ set_local_hostname(bt_cfd, local_name, 0);
#endif
}
=20=20=20
@@ -1331,7 +1334,7 @@
}
=20
=20
-void set_local_hostname(int bt_cfd, const char *local_name)
+void set_local_hostname(int bt_cfd, const char *local_name, int add_host)
{
unsigned char buf[LOCAL_NAME_LENGTH + HOST_NAME_LENGTH +=20
DOMAIN_NAME_LENGTH + 5];
@@ -1349,7 +1352,7 @@
}
}
=20=20
- if (len)
+ if (len && add_host)
{
buf[len++] =3D ' ';
buf[len++] =3D '(';
@@ -1370,7 +1373,7 @@
}
}
=20
- if (len)
+ if (len && add_host)
{
strcat(buf, ")");
}
--- bt_if.h 22 Apr 2002 15:22:03 -0000 1.34
+++ bt_if.h 3 Jun 2002 10:07:28 -0000 1.35
@@ -300,7 +300,7 @@
* Init/shutdown and control of stack=20
*/
=20
-int init_stack(int bt_cfd);
+int init_stack(int bt_cfd, char * local_name);
int bt_isinitiated(int bt_cfd);
void shutdown_stack(int bt_cfd);
#ifndef BT_USERSTACK
@@ -385,7 +385,7 @@
=20
=20
/* Sets friendly name to local_name + hostname in HW */
-void set_local_hostname(int bt_cfd, const char *local_name);
+void set_local_hostname(int bt_cfd, const char *local_name, int add_host);
=20
/* Sets friendly name to name */
void bt_set_local_name(int bt_cfd, const unsigned char *name);
--- bt_vendor.c 16 May 2002 15:12:45 -0000 1.34
+++ bt_vendor.c 3 Jun 2002 10:07:28 -0000 1.35
@@ -444,12 +444,12 @@
sleep(1);
=20
/* Initialize stack */
- init_stack(bt_cfd);
+ init_stack(bt_cfd, NULL);
=20
if (csr_disable_deep_sleep(bt_cfd))
{
reset_hw();
- init_stack(bt_cfd); /* reinitialize */
+ init_stack(bt_cfd, NULL); /* reinitialize */
}
=20
/* Read params for ps key PSKEY_HOSTIO_UART_PS_BLOCK */
--- btd.c 20 Dec 2001 14:47:41 -0000 1.37
+++ btd.c 3 Jun 2002 10:07:28 -0000 1.38
@@ -192,7 +192,7 @@
=20
static char *physdev =3D DEFAULT_PHYS_DEV;
static char *speedstr =3D DEFAULT_SPEED;
-static char local_name[LOCAL_NAME_LENGTH+1]; /* 'friendly' name in HW modu=
le */
+static char * local_name =3D NULL; /* not set */
=20
static int btd_pid =3D -1;
static int sdpsrv_pid =3D 0;
@@ -248,7 +248,7 @@
}
=20=20=20
/* now parse options */
- while ((opt =3D getopt_long(argc, argv, "fi:m:nRs:u:IUB",
+ while ((opt =3D getopt_long(argc, argv, "fi:m:n:Rs:u:IUB",
long_options, &option_index)) !=3D -1)
{
switch(opt)
@@ -271,9 +271,8 @@
break;
=20=20=20=20=20=20=20
case 'n':
- D(syslog(LOG_INFO, "setting local name to %s", optarg));
- strncpy(local_name, optarg, LOCAL_NAME_LENGTH);
- local_name[LOCAL_NAME_LENGTH] =3D '\0';
+ local_name =3D optarg;
+ D(syslog(LOG_INFO, "setting local name to %s", local_name));
break;
=20=20=20=20=20=20=20
case 'R':
@@ -351,11 +350,11 @@
if (do_reset)
reset_hw();
=20
- if (init_stack(bt_cfd) < 0)
+ if (init_stack(bt_cfd, local_name) < 0)
{
/* For some reason, the stack sometimes fails to initialize the first
time. So let us try an extra time, just to be sure... */
- if (init_stack(bt_cfd) < 0)
+ if (init_stack(bt_cfd, local_name) < 0)
{
init_failed(bt_cfd, phys_fd, init_hw_speedstr, flow_control);
}
--- btinit.c 15 May 2002 13:07:56 -0000 1.20
+++ btinit.c 3 Jun 2002 10:07:28 -0000 1.21
@@ -114,7 +114,7 @@
static int bt_cfd =3D -1; /* control tty for bt stack */
=20
static int btd_pid;
-static char local_name[LOCAL_NAME_LENGTH+1]; /* 'friendly' name in HW modu=
le */
+static char * local_name =3D NULL; /* not set */
static const char *init_hw_speedstr =3D NULL; /* not set */
static int do_hwinit =3D 1; /* do vendor specific initialization */
static int do_reset =3D 0; /* reset hw using I/O pins */
@@ -183,7 +183,7 @@
}
=20
/* now parse options */
- while ((opt =3D getopt_long(argc, argv, "fi:nRs:u:D",
+ while ((opt =3D getopt_long(argc, argv, "fi:n:Rs:u:D",
long_options, &option_index)) !=3D -1)
{
switch(opt)
@@ -201,9 +201,8 @@
break;
=20
case 'n':
- D(syslog(LOG_INFO, "setting local name to %s", optarg));
- strncpy(local_name, optarg, LOCAL_NAME_LENGTH);
- local_name[LOCAL_NAME_LENGTH] =3D '\0';
+ local_name =3D optarg;
+ D(syslog(LOG_INFO, "setting local name to %s", local_name));
break;
=20
case 'R':
@@ -281,11 +280,11 @@
if (do_reset)
reset_hw();
=20=20=20
- if (init_stack(bt_cfd) < 0)
+ if (init_stack(bt_cfd, local_name) < 0)
{
/* For some reason, the stack sometimes fails to initialize the first
time. So let us try an extra time, just to be sure... */
- if (init_stack(bt_cfd) < 0)
+ if (init_stack(bt_cfd, local_name) < 0)
{
init_failed(bt_cfd, phys_fd, init_hw_speedstr, flow_control);
}
|
|
From: Alain P. <apa...@us...> - 2002-05-24 07:46:31
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btsec.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Correct the fact that the PIN was not always null-terminated
The diff of the modified file(s):
--- btsec.c 18 Mar 2002 16:10:52 -0000 1.1
+++ btsec.c 24 May 2002 07:46:29 -0000 1.2
@@ -494,7 +494,7 @@
=20=20=20
if (length < 16) {
/* Add the null-terminated */
- pin_code[length] =3D '\0';
+ security_message.event_param[length] =3D '\0';
}
=20
/* Set the originator */
@@ -505,6 +505,7 @@
security_message.request_result =3D SECURITY_OK;
else
security_message.request_result =3D GENERAL_FAILURE;
+
=20
/* Write to proc file */
write_proc_file ();
|
|
From: Alain P. <apa...@us...> - 2002-05-16 15:12:45
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bt_vendor.c 1.33 1.34=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added prototype to avoid implicit declarations. The diff of the modified file(s): --- bt_vendor.c 10 May 2002 12:29:00 -0000 1.33 +++ bt_vendor.c 16 May 2002 15:12:45 -0000 1.34 @@ -66,6 +66,8 @@ static void ericsson_init_hw(int bt_cfd, int phys_fd, const char *speedstr= ); static void infineon_init_phys(int fd, int flow_control); static void infineon_init_hw(int bt_cfd, int phys_fd, const char *speedstr= ); +static void texasinstruments_init_phys(int fd, int flow_control); +static void texasinstruments_init_hw(int bt_cfd, int phys_fd, const char *= speedstr); static void usb_init_phys(int fd, int flow_control); static void usb_init_hw(int bt_cfd, int phys_fd, const char *speedstr); static void generic_init_phys(int fd, int flow_control); |
|
From: Alain P. <apa...@us...> - 2002-05-16 15:05:53
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- bluetooth.c 1.227 1.228=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Adde DevFS compatibility. To use DevFS, you'll have to create a symbolic li= nk from ttyBTC to ttyBT7. The diff of the modified file(s): --- bluetooth.c 10 Apr 2002 11:34:55 -0000 1.227 +++ bluetooth.c 16 May 2002 15:05:52 -0000 1.228 @@ -2604,7 +2604,11 @@ #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,2,0) bt_driver.driver_name =3D "bluetooth"; #endif +#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS)) + bt_driver.name =3D "ttyBT%d"; +#else bt_driver.name =3D "ttyBT"; +#endif bt_driver.major =3D BT_TTY_MAJOR; bt_driver.minor_start =3D 0; bt_driver.num =3D BT_NBR_PORTS; |
|
From: Alain P. <apa...@us...> - 2002-05-15 13:29:44
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
hci.c 1.200 1.201=20=20=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.64 1.65=20=20=20=20=20=20=20=20=20=20=20=20=20=20
unplug_test.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Implement the deep_sleep mode for Texas Instruments chip.
Allow to go in deep sleep and to exit from deep sleep. For the
moment only from unplug.
The diff of the modified file(s):
--- hci.c 25 Apr 2002 15:08:49 -0000 1.200
+++ hci.c 15 May 2002 13:29:41 -0000 1.201
@@ -364,6 +364,7 @@
u8 *buf; /* Temporary pointer to the incoming data */
u32 tmp_data_len;
=20=20
+=20
PRINTPKT(__FUNCTION__ ": ", data, count);
=20=20=20
tmp_data_len =3D count;
@@ -387,6 +388,16 @@
case ACL_PKT: state =3D WAIT_FOR_ACL_HDR; break;
case SCO_PKT: state =3D WAIT_FOR_SCO_HDR; break;
default:
+=09=09=09=20=20
+ /* Call vendor specific function if needed */
+#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS=09=09=09=20=20
+ if (hci_receive_data_texas_specific(buf, count) =3D=3D 0) {
+ /* Data has been processed by the function. Normaly, it's one byte.=
*/
+ /* What to do if we received more that one byte ? */
+ return;
+ }
+#endif
+=09=09=09
D_ERR(__FUNCTION__ ": discarding %d bytes\n",
count);
/* An unrecognized HCI header type is usually a
--- hci_vendor.c 10 May 2002 12:27:51 -0000 1.64
+++ hci_vendor.c 15 May 2002 13:29:41 -0000 1.65
@@ -89,14 +89,28 @@
#endif
=20
#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS
-/* Texas instrument defines */
-#define TEXAS_SET_SLEEP_MODE 0x0C
+/* Texas instruments defines */
+#define TEXAS_SET_SLEEP_MODE 0x30c
+
+/* Texas instruments specific short UART messages protocol */
+#define TEXAS_MESSAGE_DEEP_SLEEP_REQUEST 0x30
+#define TEXAS_MESSAGE_DEEP_SLEEP_ACKNOWLEDGE 0x31
+#define TEXAS_MESSAGE_WAKE_UP_REQUEST 0x32
+#define TEXAS_MESSAGE_WAKE_UP_ACKNOWLEDGE 0x33
+
+/* Texas machine state */
+enum texas_states { TI_NORMAL_STATE, TI_WAIT_FOR_DEEP_SLEEP, TI_DEEP_SLEEP=
, TI_WAIT_FOR_WAKE_UP};
#endif
=20
#define BT_HW_INFO_MAX 255
=20
/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
=20
+#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS
+/* The states for specific TI modes */
+static enum texas_states texas_state =3D TI_NORMAL_STATE;
+#endif
+
/* These are declared in hci.c */
extern cmd_pkt c_pkt;
=20
@@ -1441,7 +1455,7 @@
#elif defined(CONFIG_BLUETOOTH_TEXASINSTRUMENTS)
=20
/*************************************************************************=
****/
-/************** Functions for Texas Instrument Bluetooth chips ***********=
****/
+/************** Functions for Texas Instruments Bluetooth chips **********=
****/
/*************************************************************************=
****/
=20
#define VENDOR " [Texas Instruments]"
@@ -1476,7 +1490,30 @@
void
process_vendor_return_param(u32 ocf, u8* r_val)
{
- D_ERR(__FUNCTION__ VENDOR " Texas specific: Invalid reply (0x%x)\n", ocf);
+ switch (ocf) {
+=09
+ case TEXAS_SET_SLEEP_MODE:
+ if (r_val[0] !=3D 0) {
+ D_ERR(__FUNCTION__ VENDOR ": Set sleep mode failure\n");
+ }
+ else {
+ D_CMD(__FUNCTION__ VENDOR ": Set sleep mode : success\n");
+ }
+ break;
+ case 0x0C:
+ D_ERR(__FUNCTION__ VENDOR ": HCI_ERR_COMMAND_DISALLOWED\n");
+ release_cmd_timer();
+ wake_up_interruptible(&hci_wq);
+ break;
+
+ default:
+ release_cmd_timer();
+ D_ERR(__FUNCTION__ VENDOR " Manufacturer specific: Invalid reply (0x%x)\=
n",
+ ocf);
+ wake_up_interruptible(&hci_wq);
+ break;
+ } /* end of switch */
+
}
=20
char*
@@ -1484,6 +1521,111 @@
{
return "Texas Instruments";
}
+
+s32
+hci_set_sleep_mode(int big_sleep, int deep_sleep)
+{
+ u8 settings[2];
+=20=20
+ D_CMD(__FUNCTION__ VENDOR "\n");
+=09
+ /* Verify that big_sleep and deep_sleep are 1 or 0 */
+ if ((big_sleep > 1) || (big_sleep < 0) || (deep_sleep > 1) || (deep_sleep=
< 0)) {
+ D_ERR(__FUNCTION__ VENDOR ": Deep sleep and/or big sleep out of range\n"=
);
+ return -1;
+ }
+=09=09=09
+ /* Verify that we don't want deep_sleep */
+ if (! deep_sleep) {
+ if ((texas_state =3D=3D TI_WAIT_FOR_DEEP_SLEEP) || (texas_state =3D=3D T=
I_DEEP_SLEEP))
+ {
+ /* We should wake-up */
+ u8 command;
+
+ command =3D TEXAS_MESSAGE_WAKE_UP_REQUEST;
+ texas_state =3D TI_WAIT_FOR_WAKE_UP;
+ return hci_send_raw_data(&command, 1);
+ }
+ }
+=09
+ settings[0] =3D big_sleep;
+ settings[1] =3D deep_sleep;
+=20=20
+ PRINTPKT(__FUNCTION__ VENDOR ":", settings, 2);
+ c_pkt.type =3D CMD_PKT;
+ c_pkt.opcode =3D hci_put_opcode(TEXAS_SET_SLEEP_MODE, MANUFACTURER_SPEC);
+ c_pkt.len =3D 2;
+ memcpy(c_pkt.data, settings, 2);
+=09
+ /* Set texas state machine */
+ if (deep_sleep)
+ texas_state =3D TI_WAIT_FOR_DEEP_SLEEP;
+=09
+ /* TO DO : if we ask for deep sleep when in connection, module is set do =
big sleep. */
+ /* So we shouldn't get into TI_WAIT_FOR_DEEP_SLEEP state */
+=09
+ return send_cmd((u8*) &c_pkt, c_pkt.len + CMD_HDR_LEN + HCI_HDR_LEN);
+}
+
+
+/**** hci_receive_data_texas_specific ************************************=
**/
+/* =
*/
+/* this function process the UART short message protocol specific to =
*/
+/* Texas Instruments =
*/
+/* =
*/
+/* Return 0 if data has been correctly interpreted =
*/
+/* Return -1 if not =
*/
+/*************************************************************************=
**/
+
+int
+hci_receive_data_texas_specific(u8* buf, u32 count)
+{
+
+
+/* Just verify that we are waiting for a request */
+ if (texas_state =3D=3D TI_NORMAL_STATE) {
+ return -1; /* We don't wait for anything */
+ }
+
+ switch(*buf) {
+=20=20=20=20
+ case TEXAS_MESSAGE_DEEP_SLEEP_REQUEST: /* Deep sleep request */
+ {
+ u8 acknowledge;
+ D_CMD(__FUNCTION__ ": Deep sleep request\n");
+ if (texas_state !=3D TI_WAIT_FOR_DEEP_SLEEP) {
+ D_ERR(__FUNCTION__ VENDOR ": Receive deep sleep request, but we are no=
t waiting for deep sleep\n");=20
+ return -1;
+ }
+=09=09=09
+ acknowledge =3D TEXAS_MESSAGE_DEEP_SLEEP_ACKNOWLEDGE;
+ hci_send_raw_data(&acknowledge, 1);
+ texas_state =3D TI_DEEP_SLEEP;
+ return 0;
+ }
+ break;
+ case TEXAS_MESSAGE_WAKE_UP_ACKNOWLEDGE: /* Wake-up acnknowledge */
+ {
+=09=09=09
+ if (texas_state !=3D TI_WAIT_FOR_WAKE_UP) {
+ D_ERR(__FUNCTION__ VENDOR ": Receive Wake-up request, but hardware was=
not in deep_sleep\n");=20
+ return -1;
+ }
+ /* Change state before to call hci_set_sleep_mode */
+ texas_state =3D TI_NORMAL_STATE;
+ /* The module is now waked up. Don't allow it to go back to sleep mode =
*/
+ hci_set_sleep_mode(0, 0);
+ return 0;
+ }
+ break;
+ default:
+ /* Another unknown data : let deal the stack with */
+ return -1;
+
+ }
+}
+
+
=20
#else
/*************************************************************************=
****/
--- unplug_test.c 11 Apr 2002 11:53:22 -0000 1.11
+++ unplug_test.c 15 May 2002 13:29:42 -0000 1.12
@@ -2415,6 +2415,24 @@
return rfcomm_send_data(CREATE_RFCOMM_ID(0,2), atd, strlen(atd));
}
=20
+#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS
+
+static s32 test_ti_deep_sleep(void)
+{
+ printk("test_ti_deep_sleep\n");
+ hci_set_sleep_mode(1, 1);
+ return 0;
+}
+
+static s32 test_ti_exit_deep_sleep(void)
+{
+ printk("test_ti_exit_deep_sleep\n");
+ hci_set_sleep_mode(0, 0);
+ return 0;
+}
+
+#endif
+
s32 process_test_cmd(s32 test_case)
{
if (!test_is_initialized) {
@@ -2554,6 +2572,10 @@
case 56: return test_5_6();
case 57: return test_5_7();
case 100: return test_gateway_call();
+#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS
+ case 7000: return test_ti_deep_sleep();
+ case 7001: return test_ti_exit_deep_sleep();
+#endif
case 9001: return sdp_send_data(&sdp_con_list[0], pan_1, pan_1[4] =
+ 5);
case 9002: return sdp_send_data(&sdp_con_list[0], pan_2, pan_2[4] + 5);=
=20=20
=20=20=20=20=20=20=20=20=20
|
|
From: Alain P. <apa...@us...> - 2002-05-15 13:07:56
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btinit.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added long option and documentation for reset on RTS.
The diff of the modified file(s):
--- btinit.c 22 Apr 2002 15:00:22 -0000 1.19
+++ btinit.c 15 May 2002 13:07:56 -0000 1.20
@@ -74,6 +74,10 @@
force uart communication to not use CTS and RTS
default: flow control activated if defined hardware support it
=20
+ -D, --user-rts
+ Use RTS for hard reset
+ default: no use of RTS
+
e.g
./bti --reset --speed 460800 --physdev /dev/ttyS0 --local-name OpenBT
./bti --reset --speed 1000000/1 --physdev /dev/ttyS0 --local-name OpenBT
@@ -128,6 +132,7 @@
{ "local-name", 1, NULL, 'n' }, /* set local bluetooth name */
{ "reset", 0, NULL, 'R' }, /* reset BT HW */
{ "speed", 1, NULL, 's' }, /* uart speed towards hw */
+ { "use-rts", 1, NULL, 'D' }, /* user rts for hard reset */
{ 0, 0, 0, 0 }
};
=20
|
|
From: Alain P. <apa...@us...> - 2002-05-15 13:06:19
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_linkkey_common.c 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20
The accompanying log:
Added some sanity check on linkkey and bd address.
The diff of the modified file(s):
--- bt_linkkey_common.c 2 Apr 2002 13:44:50 -0000 1.1
+++ bt_linkkey_common.c 15 May 2002 13:06:18 -0000 1.2
@@ -104,6 +104,12 @@
/* Separate the line in two parts */
linkkey_tmp =3D str_to_parse;
bd_addr_tmp =3D strsep ((char **) &linkkey_tmp, " ");
+
+ /* check if the two tokens are valid. If not, end the processing */
+ if ((linkkey_tmp =3D=3D NULL) || (bd_addr_tmp =3D=3D NULL)) {
+ return 1;
+ }
+=20=20
DLINKKEY("linkkey : %s\n", linkkey_tmp);
DLINKKEY("bd_addr : %s\n", bd_addr_tmp);
=20=20=20
|
|
From: Alain P. <apa...@us...> - 2002-05-10 13:22:45
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- btdebug.h 1.45 1.46=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Remove additional debug settings. Sorry. The diff of the modified file(s): --- btdebug.h 10 May 2002 12:27:51 -0000 1.45 +++ btdebug.h 10 May 2002 13:22:45 -0000 1.46 @@ -72,12 +72,12 @@ =20 /***************** Bluetooth Debug defines *******************************= ****/ =20 -#define BT_DATA_DEBUG 1 +#define BT_DATA_DEBUG 0 #define BT_DATADUMP_DEBUG 0 /* print each byte */ =20 -#define BT_DRIVER_DEBUG 1 +#define BT_DRIVER_DEBUG 0 =20 -#define BT_LDISC_DEBUG 1 +#define BT_LDISC_DEBUG 0 =20 #define BT_DBG_STR "BT "=20 =20 @@ -105,7 +105,7 @@ #define DEBUG_HCI_CTRL 0 /* Enables / disables debug for the HCI control and signaling */ =20 -#define DEBUG_HCI_CMD 1 +#define DEBUG_HCI_CMD 0 /* Enables / disables debug for the HCI commands */ =20 #define HCI_DBG_STR "HCI: " |
|
From: Alain P. <apa...@us...> - 2002-05-10 12:29:53
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btd.c 1.105 1.106=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added specific functions for new bluetooth hardware from Texas Instruments.
The diff of the modified file(s):
--- btd.c 21 Oct 2001 10:33:10 -0000 1.105
+++ btd.c 10 May 2002 12:29:51 -0000 1.106
@@ -322,6 +322,8 @@
static void ericsson_init_hw(int spd);
static void infineon_init_phys(int fd);
static void infineon_init_hw(int spd);
+static void texasinstruments_init_phys(int fd);
+static void texasinstruments_init_hw(int spd);
static void usb_init_phys(int fd);
static void usb_init_hw(int spd);
static void generic_init_phys(int fd);
@@ -428,6 +430,7 @@
#define HW_GENERIC 5
#define HW_NO_INIT 6
#define HW_UNKNOWN 7
+#define HW_TEXASINSTRUMENTS 8
=20
/*=20
Bluetooth discipline define. Should reside in /include/asm/termios.h
@@ -3235,6 +3238,10 @@
infineon_init_phys(fd);
break;
=20
+ case HW_TEXASINSTRUMENTS:
+ texasinstruments_init_phys(fd);
+ break;
+
case HW_USB:
usb_init_phys(fd);
break;
@@ -3275,6 +3282,10 @@
infineon_init_hw(spd);
break;
=20
+ case HW_TEXASINSTRUMENTS:
+ texasinstruments_init_hw(spd);
+ break;
+
case HW_USB:
usb_init_hw(spd);
break;
@@ -3313,6 +3324,8 @@
hw_vendor =3D HW_ERICSSON;
else if (!strcmp(vendor, "Infineon"))
hw_vendor =3D HW_INFINEON;
+ else if (!strcmp(vendor, "Texas Instruments"))
+ hw_vendor =3D HW_TEXASINSTRUMENTS;
else if (!strcmp(vendor, "USB"))
hw_vendor =3D HW_USB;
else if (!strcmp(vendor, "Generic"))
@@ -3520,6 +3533,46 @@
hci_set_baudrate(spd);=20=20
#endif
}
+
+/* =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*/
+/* Texas Instruments specific commands =
*/
+/* =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*/
+
+void texasinstruments_init_phys(int fd)
+{
+ fd_setup(fd, 115200, USE_FLOW_CTRL);
+}
+
+void
+texasinstruments_init_hw(int spd)
+{
+#ifndef BTD_USERSTACK
+ unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+=20=20
+ sleep(1);
+ printf("Setting write_scan_enable in Texas Instruments chip!\n");
+ if (ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan) < 0)
+ {=20
+ perror("HCIWRITESCANENABLE");
+ exit(1);
+ }
+
+ sleep(1); // wait for HW...=20
+ printf("Setting baudrate in Texas Instruments module : not supported\n")=
;=20=20
+
+#else=20=20
+ printf("Setting write_scan_enable in Texas Instruments chip!\n");
+ hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);=20=20=20=20=
=20=20=20=20=20=20
+ sleep(1); /* wait for HW... */
+=20=20
+ tcflush(phys_fd, TCIOFLUSH);
+
+ printf("Setting baudrate in Texas Instruments chip : not supported\n");
+ hci_set_baudrate(spd);=20=20
+#endif
+}
+
+
=20
/* =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*/
/* USB specific commands */
|
|
From: Alain P. <apa...@us...> - 2002-05-10 12:29:01
|
The following files were modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
bt_vendor.c 1.32 1.33=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_vendor.h 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added settings and functions for new bluetooth hardware from Texas Instrume=
nts.
The diff of the modified file(s):
--- bt_vendor.c 28 Feb 2002 20:08:31 -0000 1.32
+++ bt_vendor.c 10 May 2002 12:29:00 -0000 1.33
@@ -99,6 +99,10 @@
infineon_init_phys(fd, flow_control);
break;
=20
+ case HW_TEXASINSTRUMENTS:
+ texasinstruments_init_phys(fd, flow_control);
+ break;
+
case HW_USB:
usb_init_phys(fd, flow_control);
break;
@@ -139,6 +143,10 @@
infineon_init_hw(bt_cfd, phys_fd, speedstr);
break;
=20
+ case HW_TEXASINSTRUMENTS:
+ texasinstruments_init_hw(bt_cfd, phys_fd, speedstr);
+ break;
+
case HW_USB:
usb_init_hw(bt_cfd, phys_fd, speedstr);
break;
@@ -234,6 +242,8 @@
hw_vendor =3D HW_ERICSSON;
else if (!strcmp(vendor, "Infineon"))
hw_vendor =3D HW_INFINEON;
+ else if (!strcmp(vendor, "Texas Instruments"))
+ hw_vendor =3D HW_TEXASINSTRUMENTS;
else if (!strcmp(vendor, "USB"))
hw_vendor =3D HW_USB;
else if (!strcmp(vendor, "Generic"))
@@ -654,6 +664,34 @@
tcflush(phys_fd, TCIOFLUSH);
}
}
+
+/* =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*/
+/* Texas Instruments specific commands */
+/* =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*/
+
+void
+texasinstruments_init_phys(int fd, int flow_control)
+{
+ fd_setup(fd, "115200", flow_control);
+}
+
+void
+texasinstruments_init_hw(int bt_cfd, int phys_fd, const char *speedstr)
+{
+ unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+
+ sleep(1);
+ D(syslog(LOG_INFO, "Setting write_scan_enable in Texas Instruments modul=
e"));
+ bt_write_scan_enable(bt_cfd, wrscan);
+
+ sleep(1); // wait for HW...
+
+ if (speedstr)
+ {
+ syslog(LOG_INFO, "Setting baudrate in Texas Instruments not supported"=
);
+ }
+}
+
=20
/* =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*/
/* USB specific commands */
--- bt_vendor.h 16 Oct 2001 15:02:20 -0000 1.12
+++ bt_vendor.h 10 May 2002 12:29:00 -0000 1.13
@@ -59,6 +59,7 @@
#define HW_GENERIC 5
#define HW_NO_INIT 6
#define HW_UNKNOWN 7
+#define HW_TEXASINSTRUMENTS 8
=20
/*=20
* Vendor specific functions=20
|
|
From: Alain P. <apa...@us...> - 2002-05-10 12:28:22
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
Config.in 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20=20=20
hci_vendor.c 1.63 1.64=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added settings and functions for new bluetooth hardware from Texas Instrume=
nts.
The diff of the modified file(s):
--- Config.in 18 Dec 2001 09:33:20 -0000 1.21
+++ Config.in 10 May 2002 12:27:51 -0000 1.22
@@ -14,6 +14,7 @@
Digianswer CONFIG_BLUETOOTH_DIGIANSWER \
Ericsson CONFIG_BLUETOOTH_ERICSSON \
Infineon CONFIG_BLUETOOTH_INFINEON_BMI \
+ Texas_Instruments CONFIG_BLUETOOTH_TEXASINSTRUMENTS \
Generic CONFIG_BLUETOOTH_GENERIC \
USB CONFIG_BLUETOOTH_USBMODULE" Ericsson
=20
--- hci_vendor.c 11 Apr 2002 10:16:48 -0000 1.63
+++ hci_vendor.c 10 May 2002 12:27:51 -0000 1.64
@@ -88,6 +88,11 @@
/* Digianswer defines */
#endif
=20
+#ifdef CONFIG_BLUETOOTH_TEXASINSTRUMENTS
+/* Texas instrument defines */
+#define TEXAS_SET_SLEEP_MODE 0x0C
+#endif
+
#define BT_HW_INFO_MAX 255
=20
/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
@@ -1430,6 +1435,54 @@
bt_hw_vendor(void)
{
return "Infineon";
+}
+
+
+#elif defined(CONFIG_BLUETOOTH_TEXASINSTRUMENTS)
+
+/*************************************************************************=
****/
+/************** Functions for Texas Instrument Bluetooth chips ***********=
****/
+/*************************************************************************=
****/
+
+#define VENDOR " [Texas Instruments]"
+
+s32=20
+hci_set_bd_addr(u8 bd[6])
+{
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
+ return 0;
+}
+
+s32
+hci_read_firmware_rev_info(void)
+{
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
+ return 0;
+}
+
+s32=20
+hci_set_baudrate(u32 baudrate)
+{
+ D_ERR(__FUNCTION__ VENDOR " not supported.\n");
+ return 0;
+}
+
+void
+process_vendor_event(u8 *buf, u32 len, u32 event_code)
+{
+ D_REC(__FUNCTION__ VENDOR " Texas specific: Unknown event.\n");
+}
+
+void
+process_vendor_return_param(u32 ocf, u8* r_val)
+{
+ D_ERR(__FUNCTION__ VENDOR " Texas specific: Invalid reply (0x%x)\n", ocf);
+}
+
+char*
+bt_hw_vendor(void)
+{
+ return "Texas Instruments";
}
=20
#else
|
|
From: Alain P. <apa...@us...> - 2002-05-10 12:27:53
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- btconfig.h 1.33 1.34=20=20=20=20=20=20=20=20=20=20=20=20=20=20 btdebug.h 1.44 1.45=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added settings and functions for new bluetooth hardware from Texas Instrume= nts. The diff of the modified file(s): --- btconfig.h 19 Nov 2001 11:29:29 -0000 1.33 +++ btconfig.h 10 May 2002 12:27:51 -0000 1.34 @@ -64,6 +64,7 @@ #define CONFIG_BLUETOOTH_ERICSSON #undef CONFIG_BLUETOOTH_INFINEON_BMI #undef CONFIG_BLUETOOTH_GENERIC=20=20=20=20 +#undef CONFIG_BLUETOOTH_TEXASINSTRUMENTS #undef CONFIG_BLUETOOTH_USBMODULE /* Not implemented */ =20 /* Use TCI layer or not */ --- btdebug.h 24 Jan 2002 12:37:17 -0000 1.44 +++ btdebug.h 10 May 2002 12:27:51 -0000 1.45 @@ -72,7 +72,7 @@ =20 /***************** Bluetooth Debug defines *******************************= ****/ =20 -#define BT_DATA_DEBUG 0 +#define BT_DATA_DEBUG 1 #define BT_DATADUMP_DEBUG 0 /* print each byte */ =20 #define BT_DRIVER_DEBUG 1 @@ -105,7 +105,7 @@ #define DEBUG_HCI_CTRL 0 /* Enables / disables debug for the HCI control and signaling */ =20 -#define DEBUG_HCI_CMD 0 +#define DEBUG_HCI_CMD 1 /* Enables / disables debug for the HCI commands */ =20 #define HCI_DBG_STR "HCI: " |
|
From: Alain P. <apa...@us...> - 2002-05-01 08:07:36
|
The following file was modified in apps/bluetooth/sdp_server:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
sdp_parser.c 1.23 1.24=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
OK, because writev is a system call, I implemented it in uClibc.
So I go back with my changes, and commit the state before my latest commit.
The diff of the modified file(s):
--- sdp_parser.c 24 Apr 2002 12:46:49 -0000 1.23
+++ sdp_parser.c 1 May 2002 08:07:35 -0000 1.24
@@ -786,14 +786,19 @@
write2stack(int sdp_con_id, char *data, int len)
{
data_struct db_hdl;
+ struct iovec vec[2];
=20
D_XMIT("Writing %d bytes to sdp_con_id %d", len, sdp_con_id);
=20=20=20
db_hdl.sdp_con_id =3D sdp_con_id;
db_hdl.len =3D len;
=20
- write( stack_if_fd, &db_hdl, sizeof db_hdl );
- write( stack_if_fd, data, len );
+ vec[0].iov_base =3D &db_hdl;
+ vec[0].iov_len =3D sizeof db_hdl;
+ vec[1].iov_base =3D data;
+ vec[1].iov_len =3D len;
+=20=20
+ writev(stack_if_fd, vec, 2);
}
=20
#ifndef BTD_USERSTACK
|
|
From: Alain P. <apa...@us...> - 2002-04-25 15:09:48
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- btmem.c 1.49 1.50=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added an include mandatory to compile on our platform. The diff of the modified file(s): --- btmem.c 11 Apr 2002 10:15:01 -0000 1.49 +++ btmem.c 25 Apr 2002 15:09:17 -0000 1.50 @@ -55,6 +55,7 @@ #include "include/btmem.h" #include "include/btcommon.h" #include <string.h> /* memset */ +#include <errno.h> #endif =20 /****************** DEBUG CONSTANT AND MACRO SECTION *********************= ***/ |
|
From: Alain P. <apa...@us...> - 2002-04-25 15:08:50
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- hci.c 1.199 1.200=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added an include mandatory to compile on our platform The diff of the modified file(s): --- hci.c 10 Apr 2002 11:37:50 -0000 1.199 +++ hci.c 25 Apr 2002 15:08:49 -0000 1.200 @@ -74,6 +74,7 @@ #include <errno.h> =20 #include <asm/unaligned.h> +#include <asm/param.h> =20 #include "include/bluetooth.h" #include "include/hci.h" |
|
From: Alain P. <apa...@us...> - 2002-04-25 14:56:23
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added the possibility to call the makefile with additional flags The diff of the modified file(s): --- Makefile 28 Feb 2002 15:45:08 -0000 1.31 +++ Makefile 25 Apr 2002 14:56:21 -0000 1.32 @@ -92,6 +92,11 @@ CFLAGS +=3D -DCONFIG_BLUETOOTH_UNPLUG_TEST endif =20 +# if EXTRA_CONF =3D 1, append the value of EXTRA_CFLAGS to CFLAGS +ifeq ($(EXTRA_CONF),1) +CFLAGS +=3D $(EXTRA_CFLAGS) +endif + all: $(O_TARGET) =20 $(O_TARGET): $(OBJS) |
|
From: <jb...@le...> - 2002-04-25 04:37:08
|
Is there any available guide on how to use AXIS stack with the bluetooth.o in Linux 2.4.18 kernel? I am trying to make AXIS stack work with a Motorola USB Bluetooth device. Jake Bantug Sr R&D Engr, Lexmark |
|
From: Alain P. <apa...@us...> - 2002-04-24 12:47:21
|
The following file was modified in apps/bluetooth/sdp_server:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
sdp_parser.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Replaced writev by write, because writev is not present in every expat libr=
aries.
The diff of the modified file(s):
--- sdp_parser.c 7 Mar 2002 21:23:19 -0000 1.22
+++ sdp_parser.c 24 Apr 2002 12:46:49 -0000 1.23
@@ -786,19 +786,14 @@
write2stack(int sdp_con_id, char *data, int len)
{
data_struct db_hdl;
- struct iovec vec[2];
=20
D_XMIT("Writing %d bytes to sdp_con_id %d", len, sdp_con_id);
=20=20=20
db_hdl.sdp_con_id =3D sdp_con_id;
db_hdl.len =3D len;
=20
- vec[0].iov_base =3D &db_hdl;
- vec[0].iov_len =3D sizeof db_hdl;
- vec[1].iov_base =3D data;
- vec[1].iov_len =3D len;
-=20=20
- writev(stack_if_fd, vec, 2);
+ write( stack_if_fd, &db_hdl, sizeof db_hdl );
+ write( stack_if_fd, data, len );
}
=20
#ifndef BTD_USERSTACK
|
|
From: Alain P. <apa...@us...> - 2002-04-23 09:05:20
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Add automatic compilation of btsec, a simple security manager The diff of the modified file(s): --- Makefile 19 Feb 2002 19:03:44 -0000 1.13 +++ Makefile 23 Apr 2002 09:05:16 -0000 1.14 @@ -5,7 +5,7 @@ include $(APPS)/Rules.elinux endif =20 -PROGS =3D btdm memul bti btinq btcon btdisc btconfig btping # btsend b= ttest +PROGS =3D btdm memul bti btinq btcon btdisc btconfig btping btsec # bt= send bttest =20 # Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude # files in $(include_dir)/readline. Define HAVE_READLINE if you have the @@ -33,6 +33,7 @@ BTTESTOBJS =3D bttest.o bt_misc.o bt_vendor.o bt_if.o BTCONFIGOBJS =3D btconfig.o bt_vendor.o bt_if.o bt_misc.o BTPINGOBJS =3D btping.o bt_if.o bt_misc.o +BTSECOBJS =3D btsec.o bt_linkkey_common.o =20 ifdef HAVE_READLINE_READLINE LDLIBS +=3D -lreadline -ltermcap @@ -87,6 +88,9 @@ $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ =20 btping: $(BTPINGOBJS) + $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ + +btsec: $(BTSECOBJS) $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ =20 install: $(PROGS) |
|
From: Alain P. <apa...@us...> - 2002-04-22 15:22:05
|
The following files were modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
README.txt 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.c 1.45 1.46=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bt_if.h 1.33 1.34=20=20=20=20=20=20=20=20=20=20=20=20=20=20
btinq.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
bttest.c 1.26 1.27=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Add an option to btinq to get the names of the remote devices.
The same option produce a formated output which contain BD addresses
and names.
The diff of the modified file(s):
--- README.txt 22 Apr 2002 14:29:22 -0000 1.5
+++ README.txt 22 Apr 2002 15:22:03 -0000 1.6
@@ -121,9 +121,25 @@
btinq.c
-------
Perform inquiry scan
-Syntax : btinq -n <max # returned> -t <max inq time>=20
+Syntax : btinq -n <max # returned> -t <max inq time> [-r]
e.g btinq -n 20 -t 15
=20
+If you want to get the names of the found remote devices and have a
+standard formated output, use option "-r" (for remote name).
+
+If you use option -r, you will recieve next format on standard ouput :
+
+<n>
+<name 1>
+<BT address 1>
+<name 2>
+<BT address 2>
+...
+
+where <n> will be the number of devices found
+ <name x> will be the name of the remote device x
+ <BT address x> will be the bluetooth hardware address of the
+ remote device x.
=20
By using these small apps together with btinit it will be possible to=20
do whole test 'suites' using e.g expect scripts or similar.
--- bt_if.c 8 Apr 2002 11:20:31 -0000 1.45
+++ bt_if.c 22 Apr 2002 15:22:03 -0000 1.46
@@ -973,7 +973,7 @@
=20
=20
int
-bt_inquiry(int bt_cfd, int nbr_rsp, int t)
+bt_inquiry(int bt_cfd, int nbr_rsp, int t, int get_name)
{
int retval =3D 0;
#ifdef BTD_USERSTACK
@@ -1001,11 +1001,60 @@
=20
if ((retval =3D ioctl(bt_cfd, HCIINQUIRY, inq_res)) < 0)
{
- printf("Inquiry failed [%s (%d)]\n", error_msg(retval), MSG_GET_CODE(-=
retval));
+ fprintf(stderr, "Inquiry failed [%s (%d)]\n", error_msg(retval), MSG_G=
ET_CODE(-retval));
free(inq_res);
return retval;
}
=20
+if (get_name)
+ {
+ unsigned char name_device[255];
+ /* First print the number of units found */
+ printf("%d", inq_res->nbr_of_units);
+=09
+ for (i =3D 0; i < inq_res->nbr_of_units; i++) {
+ /* Copy BD_ADDR to send in ioctl */
+ memcpy(name_device,inq_res->bd_addr + 6*i, 6);
+=20=20=20=20
+ if ((retval =3D ioctl(bt_cfd, HCIREMOTENAME_REQUEST, name_device)) < 0=
) {
+ fprintf (stderr, "Remote name request failed [%s (%d)]\n", error_msg=
(retval), MSG_GET_CODE(-retval));
+ /* Test if the problem is that the IOCTL doesn't exist */
+ if (errno =3D=3D EINVAL)
+ fprintf(stderr, "btinq : error : the ioctl HCIREMOTENAME_REQ=
UEST doesn't exist in the driver");
+ /* Print a default name */
+ printf("\nDevice with unknown name");
+ }
+ else {
+ switch (retval)
+ {
+ case 0x04: /* Page timeout */
+ printf("\nDevice with unknown name");
+ break;
+ case 0x00:
+ if (name_device[0] =3D=3D '\0') {
+ printf("Device with empty name\n");
+ }
+ else {
+ printf("\n%s", name_device);
+ }
+ break;
+ default:
+ printf("\nDevice with unrecoverable name");;
+ } /* Switch */
+
+ }
+
+ /* Print BD address */
+ printf("\n%02x:%02x:%02x:%02x:%02x:%02x",
+ inq_res->bd_addr[0+6*i], inq_res->bd_addr[1+6*i],
+ inq_res->bd_addr[2+6*i], inq_res->bd_addr[3+6*i],
+ inq_res->bd_addr[4+6*i], inq_res->bd_addr[5+6*i]);
+=09=20=20
+ } /* End of loop on every addresses founded */
+ } /* End of if get_name */
+else
+ {
+ /* Just write addresses as it was historically done */
for (i =3D 0; i < inq_res->nbr_of_units; i++)
{
printf("BD %d: %02x:%02x:%02x:%02x:%02x:%02x\n",i,
@@ -1014,6 +1063,7 @@
inq_res->bd_addr[4+6*i], inq_res->bd_addr[5+6*i]);
}
=20
+ }
free(inq_res);
#endif
return retval;
--- bt_if.h 8 Apr 2002 11:23:11 -0000 1.33
+++ bt_if.h 22 Apr 2002 15:22:03 -0000 1.34
@@ -349,7 +349,7 @@
int bt_getinfo(int bt_cfd, unsigned char bd[6], unsigned short type);
int bt_testcmd(int bt_cfd, unsigned char *cmd);
=20
-int bt_inquiry(int bt_cfd, int nbr_rsp, int t);
+int bt_inquiry(int bt_cfd, int nbr_rsp, int t, int get_name);
int bt_set_baudrate(int bt_cfd, const char *speedstr);
void bt_set_bd_addr(int bt_cfd, unsigned char *bd);
void read_local_bd(int bt_cfd, unsigned char *bd_addr);
--- btinq.c 14 May 2001 11:29:36 -0000 1.3
+++ btinq.c 22 Apr 2002 15:22:03 -0000 1.4
@@ -62,15 +62,16 @@
#include "bt_conf.h"
=20
/*=20
- * Syntax: btinq -n <max # returned> -t <max inq time>=20
+ * Syntax: btinq -n <max # returned> -t <max inq time> [-r]
*/
=20
int
main(int argc, char **argv)
{=20
int bt_cfd, opt, t =3D 10, nbr =3D 10;
+ int get_name =3D 0;
=20
- while ((opt =3D getopt(argc, argv, "n:t:")) !=3D -1)
+ while ((opt =3D getopt(argc, argv, "n:t:r")) !=3D -1)
{
switch(opt)
{
@@ -82,6 +83,11 @@
t =3D atoi(optarg);
break;
=20
+ case 'r':
+ /* Get the name of remote found devices */
+ get_name =3D 1;
+ break;
+=09=09=20
default:
break;
}
@@ -97,11 +103,11 @@
/* First of all check that stack is running */
if (!bt_isinitiated(bt_cfd))
{
- printf("Stack not initiated, exit\n");
+ fprintf(stderr, "Stack not initiated, exit\n");
exit(1);
}
=20
- bt_inquiry(bt_cfd, nbr, t);
+ bt_inquiry(bt_cfd, nbr, t, get_name);
=20=20
close(bt_cfd);
exit(0);
--- bttest.c 8 Apr 2002 11:22:08 -0000 1.26
+++ bttest.c 22 Apr 2002 15:22:03 -0000 1.27
@@ -486,7 +486,7 @@
}
else if (sscanf(buf, "inq %d %d", &tmp[0], &tmp[1]) =3D=3D 2)
{
- retval =3D bt_inquiry(bt_cfd, tmp[0], tmp[1]);
+ retval =3D bt_inquiry(bt_cfd, tmp[0], tmp[1], 0);
}
else if (sscanf(buf, "rf_send %d %d %d", &i, &repeat, &line) =3D=3D 3)
{
|
|
From: Alain P. <apa...@us...> - 2002-04-22 15:08:07
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Tag Comment
---- ----------- ----------- --- -------
btinit.c 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Just add a break that has been forgotten.
The diff of the modified file(s):
--- btinit.c 22 Apr 2002 14:22:53 -0000 1.18
+++ btinit.c 22 Apr 2002 15:00:22 -0000 1.19
@@ -224,6 +224,8 @@
/* It's usefull if you command a reset by the RTS pin */
D(syslog(LOG_INFO, "Use RTS for hard reset", optarg));
rts_hard_reset =3D 1;
+ break;
+
default:
break;
}
|
|
From: Alain P. <apa...@us...> - 2002-04-22 14:29:57
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- README.txt 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Add documentation for -D option for bti The diff of the modified file(s): --- README.txt 22 Apr 2002 14:18:46 -0000 1.4 +++ README.txt 22 Apr 2002 14:29:22 -0000 1.5 @@ -54,6 +54,12 @@ -f, --noflow Don't use RTS and CTS signals when communicating with the module through = UART =20=20=20 + -D /* RTS reset the module */ + Set the RTS to 0 after the serial port has been opened. This allow to mak= e a + soft reset for a bluetooth module like the module from ericsson if you + wire the rts to the reset pin of the module. + This option is valid only if -f option is present.=20 + e.g ./bti --reset --speed 460800 --physdev /dev/ttyS0 --local-name OpenBT =20 |