|
From: Mats F. <ma...@us...> - 2001-02-27 15:51:52
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.77 1.78=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added parameters for the inquiry command Made some changes in the modem emulator, that solved some client problems |
|
From: Mats F. <ma...@us...> - 2001-02-27 16:40:37
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.78 1.79=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed change in modem_emulator
The diff of the modified file(s):
--- btd.c 2001/02/27 15:53:01 1.78
+++ btd.c 2001/02/27 16:41:46 1.79
@@ -1795,7 +1795,7 @@
return SEND_OK;
}
else
- return DO_PPP;
+ return SEND_OK;
}
=20
void modem_emulator(int bt_fd, char *data, int len)
|
|
From: Marcus A. S. <mar...@us...> - 2001-03-01 00:29:53
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.79 1.80=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added SDP client support.
The diff of the modified file(s):
--- btd.c 2001/02/27 16:41:46 1.79
+++ btd.c 2001/03/01 00:31:05 1.80
@@ -1472,7 +1472,7 @@
tmp_bd[0], tmp_bd[1], tmp_bd[2],
tmp_bd[3], tmp_bd[4], tmp_bd[5]);
=20
- sdp_connect_req(tmp_bd);
+ sdp_connect_req(tmp_bd, 0);
}
else if(sscanf(buf, "test_conn %x:%x:%x:%x:%x:%x %x",
&bd[0], &bd[1], &bd[2], &bd[3], &bd[4], &bd[5], &tmp[0]) =3D=3D 7)
@@ -2312,6 +2312,16 @@
test_rfcomm =3D rfcomm;
test_dlci =3D dlci;
return 0;
+}
+
+int bt_register_sdp(u8 line)
+{
+ return 0;
+}
+=20
+int bt_unregister_sdp(u8 line)
+{
+ return 0;
}
=20
int bt_initiated(void)
|
|
From: Mattias ?g. <mat...@us...> - 2001-03-01 10:35:09
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.80 1.81=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * fixed auto detect of ppp frames in modem emulator i.e modem emulator can always be running for both dialup and real LAN profile clients. * fixed erroneous calculation of total nbr bytes to send in rf_send * minor changes * removed 10 ms sleep after setting baudrate on ericsson HW |
|
From: Peter K. <pk...@us...> - 2001-03-04 15:47:59
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.81 1.82=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
No longer needed to pass any arguments to sdp_server. The default
values should work.
The diff of the modified file(s):
--- btd.c 2001/03/01 10:36:22 1.81
+++ btd.c 2001/03/04 15:49:23 1.82
@@ -281,7 +281,9 @@
static int open_socket(char *name, int role);
=20
static int sdpsrv_pid =3D 0;
+#ifndef BTD_USERSTACK
static void start_sdp_server(void);
+#endif
=20
/* misc */
#ifndef BTD_USERSTACK
@@ -859,25 +861,21 @@
}
}
=20
+#ifndef BTD_USERSTACK
static void start_sdp_server(void)
{
-#ifndef BTD_USERSTACK
- char *args[] =3D { SDPSRV_CMD, "/etc/sdp.xml", "/proc/sdp_srv", NULL };
-#else=20
- char *args[] =3D { SDPSRV_CMD, "/etc/sdp.xml", NULL };
-#endif
-=20=20
syslog(LOG_INFO, "Starting SDP server\n");
=20=20=20
if (!(sdpsrv_pid =3D vfork()))
{
- execvp(SDPSRV_CMD, args);
+ execlp(SDPSRV_CMD, SDPSRV_CMD);
=20
fprintf(stderr, "%s: no such file or directory\n", SDPSRV_CMD);
=20
_exit(0);
}
}
+#endif
=20
static void start_pppd(void)
{
|
|
From: Mattias ?g. <mat...@us...> - 2001-03-05 11:14:19
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.83 1.84=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
only reply CONNECT... (without OK) when receiving ATD... string in=20
modem emulator
The diff of the modified file(s):
--- btd.c 2001/03/04 17:54:54 1.83
+++ btd.c 2001/03/05 11:15:55 1.84
@@ -1843,8 +1843,6 @@
#ifdef PALM_FIX
sleep(2); /* wait for client */
#endif
- syslog(LOG_INFO, "Write : %s", ok);
- bt_write_top(ok, strlen(ok), 0);=20
syslog(LOG_INFO, "Write : %s", connect);
bt_write_top(connect, strlen(connect), 0);=20=20=20
syslog(LOG_INFO, "Modem connected !");
@@ -1914,8 +1912,6 @@
#ifdef PALM_FIX
sleep(2); /* wait for client */
#endif
- syslog(LOG_INFO, "Write : %s", ok);
- write(bt_fd, ok, strlen(ok));=20
syslog(LOG_INFO, "Write : %s", connect);
write(bt_fd, connect, strlen(connect));=20=20=20
syslog(LOG_INFO, "Modem connected !");
|
|
From: Peter K. <pk...@us...> - 2001-03-09 16:22:03
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.85 1.86=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Turn off pty echo in open_pty() (by Matthias Fuchs).
The diff of the modified file(s):
--- btd.c 2001/03/09 13:18:02 1.85
+++ btd.c 2001/03/09 16:23:51 1.86
@@ -207,7 +207,6 @@
extern int bt_read_proc(char *buf, int len);
bt_stat_struct bt_stat;
static int bt_initdone =3D 0;
-static int ready_for_ppp =3D 0;
rfcomm_con *test_rfcomm;
int test_dlci;
=20
@@ -936,10 +935,6 @@
static void start_pppd(void)
{
=20=20=20
-#ifdef BTD_USERSTACK
- ready_for_ppp =3D 1;
-#endif
-
/* run pppd in a child */
if (!(pppd_pid =3D vfork()))
{
@@ -978,11 +973,6 @@
syslog(LOG_ERR, "Failed to return IP address to IPA\n");
}
#endif
-
-#ifdef BTD_USERSTACK
- ready_for_ppp =3D 0;
-#endif
-
}=20
=20
/* FIXME -- use separate options file 'pppd file <optionfile>' for=20
@@ -2212,10 +2202,38 @@
*/
int open_pty(void)
{
+ struct termios settings;
+ int result;
+
+
printf("Open pty.\n");
- return openpty(&pty_master_fd, &pty_slave_fd, ptydev, NULL, NULL);
+ result =3D openpty(&pty_master_fd, &pty_slave_fd, ptydev, NULL, NULL);
+ if (result < 0)
+ {
+ perror("openpty");
+ return result;
}
=20
+ /* modify pty settinges -> turn off echo - mfuchs */
+ result =3D tcgetattr(pty_master_fd, &settings);
+ if (result < 0)
+ {
+ perror("tcgetattr");
+ return result;
+ }
+
+ cfmakeraw(&settings);
+ settings.c_lflag &=3D ~ECHO;
+
+ result =3D tcsetattr(pty_master_fd, TCSANOW, &settings);
+ if (result < 0)
+ {
+ perror("tcsetattr");
+ return result;
+ }
+ return 0;
+}
+
/* Create a thread that reads data from the pty and=20
passes it to the rfcomm layer */
int init_pty_thread(void)
@@ -2308,11 +2326,6 @@
return len;
}
=20=20=20
- /* FIXME -- why is data echoed back if no application is running on top=
=20
- of PTY ?? */
- if (!ready_for_ppp)
- return len;
-
/* feed this to PTY connected to pppd or whatever application=20
that may be running there... */
=20=20=20
|
|
From: Peter K. <pk...@us...> - 2001-03-13 22:19:46
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.86 1.87=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Added O_NOCTTY flag to all open() calls of any /dev/ttyBT* device to
make sure we do not accidentally end up with one as controlling TTY.
The diff of the modified file(s):
--- btd.c 2001/03/09 16:23:51 1.86
+++ btd.c 2001/03/13 22:21:16 1.87
@@ -1749,7 +1749,7 @@
#endif=20=20
=20
syslog(LOG_INFO, "Opening dev %s\n", dev);
- if ((fd =3D open(dev, flags)) < 0 )
+ if ((fd =3D open(dev, flags | O_NOCTTY)) < 0)
{=20
perror("open_device");
exit(1);
@@ -3100,7 +3100,7 @@
int devfd;
=20
printf("Resetting HW board...\n");
- if ((devfd =3D open(BT_CTRL_TTY, O_RDWR)) >=3D 0)
+ if ((devfd =3D open(BT_CTRL_TTY, O_RDWR | O_NOCTTY)) >=3D 0)
{
if (ioctl(devfd, BTRESETPHYSICALHW) < 0)
{
|
|
From: Mattias A. <mat...@us...> - 2001-03-20 12:10:57
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.87 1.88=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* updated bt_receive_top for usermode
* minor adjustments when running usermode stack with hci emulation enabled
*=A0fixed BT_DATA debug macro
The diff of the modified file(s):
--- btd.c 2001/03/13 22:21:16 1.87
+++ btd.c 2001/03/20 12:13:17 1.88
@@ -200,7 +200,7 @@
const char* psmname(unsigned short psm);
int bt_write_lower_driver(unsigned char *data, int len);
int bt_write_top(char *buf, int count, int line);
-int bt_receive_top(rfcomm_con *rfcomm, unsigned char *data, int len);
+int bt_receive_top(unsigned int con_id, unsigned char *data, int len);
void bt_rfcomm_connection_ready(int status);
void bt_sdp_connection_ready(int status);
int bt_initiated(void);
@@ -226,9 +226,9 @@
pthread_t read_thread;
=20
#if BT_DATA_DEBUG
-#define BT_DATA(fmt, args...) printf("BT DATA "fmt, ## args)
+#define BT_DATA(fmt...) printf("BT DATA "fmt)
#else
-#define BT_DATA(fmt, args...)=20
+#define BT_DATA(fmt...)=20
#endif
=20
#if BT_DATAFLOW_DEBUG
@@ -665,6 +665,7 @@
do_reset =3D 0;
modem_emulation =3D 0;
hw_init =3D 0;
+ enter_cmd_mode =3D 1; /* temp fix until bt_waitline works for usermo=
de */
break;
=20
case 'T':
@@ -2314,11 +2315,11 @@
return bytes_sent;
}
=20
-int bt_receive_top(rfcomm_con *rfcomm, unsigned char *data, int len)
+int bt_receive_top(unsigned int con_id, unsigned char *data, int len)
{
int n;
=20
- BT_DATA(" |X|--> %3d [%d]\n", len, rfcomm->line);
+ BT_DATA(" |X|--> %3d [%d]\n", len, GET_RFCOMMLINE(con_id));
=20
if (modem_emulation && !modem_connected)
{
@@ -2877,6 +2878,7 @@
#else
/* fixme -- !*/
printf("bt_waitline : not impl in usermode stack\n");
+ sleep(2);
#endif
}
=20
|
|
From: Gordon M. <gm...@us...> - 2001-03-20 16:41:02
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.88 1.88.2.1=20=20=20=20=20=20=20=20
The accompanying log:
--Initial checking of changes to HCI. Including a) fixed the hci inquiry ha=
ng b) changed buffer allocation strategy for hci inquiry c) converted to ca=
ll tables for HCI Command Status & Command Complete processing.
The diff of the modified file(s):
--- btd.c 2001/03/20 12:13:17 1.88
+++ btd.c 2001/03/20 16:42:53 1.88.2.1
@@ -2887,14 +2887,21 @@
{
#ifdef BTD_USERSTACK
char inq_lap[6];
+ inquiry_results *inq_res;
=20=20=20=20=20
printf("Inquiring...\n");
=20=20=20=20=20
+ inq_res =3D (inquiry_results*) malloc(sizeof(inquiry_results) + nbr_rs=
p * 6);
+ inq_res->nbr_of_units =3D nbr_rsp;
+ inq_res->inq_time =3D t;
+
inq_lap[0] =3D 0x33;
inq_lap[1] =3D 0x8b;
inq_lap[2] =3D 0x9e;
=20=20=20=20=20=20=20=20
- hci_inquiry(inq_lap, t, nbr_rsp);
+ hci_inquiry(inq_lap, t, nbr_rsp, inq_res);
+
+ free(inq_res);
#else
int i;
inquiry_results *inq_res;
|
|
From: Gordon M. <gm...@us...> - 2001-03-21 19:38:22
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.88.2.1 1.88.2.2=20=20=20=20=20=20=20=20
The accompanying log:
--If the HCIINQUIRY ioctl fails we just return now instead of exiting.
The diff of the modified file(s):
--- btd.c 2001/03/20 16:42:53 1.88.2.1
+++ btd.c 2001/03/21 19:38:19 1.88.2.2
@@ -2913,7 +2913,7 @@
if (ioctl(bt_cfd, HCIINQUIRY, inq_res) < 0)
{
perror("Inquiry");
- exit(1);
+ return;
}
=20=20=20=20=20
for (i =3D 0; i < inq_res->nbr_of_units; i++)
|
|
From: Mattias A. <mat...@us...> - 2001-03-30 12:49:08
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.88 1.89=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
don't exit if inquiry fails
updated l2cap_ping function for usermode stack
The diff of the modified file(s):
--- btd.c 2001/03/20 12:13:17 1.88
+++ btd.c 2001/03/30 12:49:06 1.89
@@ -1455,7 +1455,7 @@
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);
+ l2ca_ping(tmp_bd, NULL, 0);
}
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
@@ -2906,7 +2906,7 @@
if (ioctl(bt_cfd, HCIINQUIRY, inq_res) < 0)
{
perror("Inquiry");
- exit(1);
+ return;
}
=20=20=20=20=20
for (i =3D 0; i < inq_res->nbr_of_units; i++)
|
|
From: Peter K. <pk...@us...> - 2001-04-11 12:23:46
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.89 1.90=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
open_tcpsocket() no longer crashes if there is no colon in
the address string. Instead it terminates the program
(thanks to Salil Gokhale for finding this).
The diff of the modified file(s):
--- btd.c 2001/03/30 12:49:06 1.89
+++ btd.c 2001/04/11 12:23:45 1.90
@@ -851,7 +851,7 @@
/* check if there is a server available */
if (! use_ipassign)
{
- if ((ipa_sock =3D open_socket(SRVSOCKET, CLIENT)))
+ if ((ipa_sock =3D open_socket(SRVSOCKET, CLIENT)) >=3D 0)
{
syslog(LOG_INFO, "IP Assign server OK.\n");
close_device(ipa_sock);
@@ -2332,8 +2332,7 @@
=20=20=20
if ((n =3D write(pty_master_fd, data, len)) !=3D len)
{
- BT_DATA("bt_receive_top: tried to write %d bytes, wrote %d\n",
- len, n);
+ BT_DATA("bt_receive_top: tried to write %d bytes, wrote %d\n", len, n);
}
=20
bt_stat.bytes_received+=3Dn;
@@ -2360,7 +2359,6 @@
line =3D GET_RFCOMMLINE(con_id);
=20=20=20=20=20=20=20=20=20=20=20
if ((line < 0) || (line > BT_NBR_DATAPORTS)) {
-=20=20=20=20=20=20=20=20=20=20=20=20
printf("bt_connect_cfm on invalid line (%d)\n", line);
return;
}
@@ -2371,10 +2369,8 @@
=20=09
switch (psm) {
case RFCOMM_LAYER:
- {=09
printf("bt_connect_cfm [%s]\n", psmname(psm));
break;
- }
=20=20=20=20=20=20=20=20=20=20=20
case SDP_LAYER:
printf("bt_connect_cfm [%s]\n", psmname(psm));
@@ -2436,11 +2432,16 @@
=20=20=20
/*parse address string */
=20
- pos =3D strchr(addrstr, ':');
+ if (!(pos =3D strchr(addrstr, ':')))
+ {
+ fprintf(stderr, "Port argument missing!\n");
+ exit(1);
+ }
=20
/* copy ip address */
- memcpy(ipstr, addrstr, pos-addrstr);
- ipstr[pos-addrstr]=3D0; /* null term */
+ *pos =3D '\0';
+ strncpy(ipstr, addrstr, sizeof ipstr);
+ ipstr[sizeof ipstr - 1] =3D '\0';
=20
/* extract port number */
port =3D atoi(pos+1);
@@ -2472,9 +2473,6 @@
client_sockfd =3D accept(server_sockfd,
(struct sockaddr *)&(client_address),
&client_len);
-=20=20=20=20
- return client_sockfd;
-
}
else
{
@@ -2497,10 +2495,10 @@
perror("open_tcpsocket");
exit(1);
}
+ }
=20
return client_sockfd;
}
-}
=20
#endif /* BTD_USERSTACK */
=20
@@ -2530,8 +2528,6 @@
client_sockfd =3D accept(server_sockfd,=20
(struct sockaddr *)&(client_address),
&client_len);
-=20=20=20=20
- return client_sockfd;
}
else
{
@@ -2547,13 +2543,13 @@
(struct sockaddr *)&server_address,=20
server_len) < 0) {
syslog(LOG_ERR, "open_socket %s failed", name);
- return 0;
+ return -1;
}
=20
-
syslog(LOG_INFO, "Socket connected to %s\n", server_address.sun_path);
- return client_sockfd;
}
+
+ return client_sockfd;
}
=20
#ifdef USE_IPASSIGN
@@ -2565,7 +2561,7 @@
=20=20=20
syslog(LOG_INFO, "Opening socket to IP Assigner\n");
=20=20=20
- if (!(ipa_sock =3D open_socket(SRVSOCKET, CLIENT)))
+ if ((ipa_sock =3D open_socket(SRVSOCKET, CLIENT)) < 0)
{=20=20
perror("open_socket");
return NULL;
@@ -2748,7 +2744,6 @@
switch (layer)
{
case MSG_LAYER_HCI:
- {
switch(code)
{=20=20=20=20=20=20=20
case 4:=20=20=20=20=20=20=20=20
@@ -2757,11 +2752,9 @@
return "HCI - Unknown reason";
break;
}
- }
break;
=20=20=20=20=20
case MSG_LAYER_L2CAP:
- {
switch(code)
{=20
case RES_PSMNEG:
@@ -2773,7 +2766,6 @@
default:
return "L2CAP - unknown reason";
}
- }
break;
=20=20=20=20=20
default:
@@ -2807,7 +2799,8 @@
/* only connects rfcomm (as client) currently */
if (GET_PSM(con_id) =3D=3D RFCOMM_LAYER)
con.id =3D con_id;
- else{=20=20
+ else
+ {
printf("Only connects rfcomm as client !\n");
return ;
}
@@ -2826,7 +2819,8 @@
srv_ch =3D GET_RFCOMMSRVCH(con_id);
line =3D GET_RFCOMMLINE(con_id);
=20=20
- if (line !=3D 0) {
+ if (line !=3D 0)
+ {
printf("Use line 0 instead ! (usermode only)\n");
return;
}
@@ -2854,7 +2848,8 @@
CHECK_RFCOMM(con_id);
line =3D GET_RFCOMMLINE(con_id);
=20=20=20
- if (line !=3D 0) {
+ if (line !=3D 0)
+ {
printf("Use line 0 instead ! (usermode only)\n");
return;
}
@@ -2982,8 +2977,8 @@
for (i =3D 0; i < 6; i++) {
bd_addr[i] =3D rev_bd[5-i];
}
-
#endif
+
printf("Current bd addr : %02X:%02X:%02X:%02X:%02X:%02X\n",
bd_addr[0], bd_addr[1], bd_addr[2],
bd_addr[3], bd_addr[4], bd_addr[5]);
@@ -3025,8 +3020,8 @@
for (i =3D 0; i < 6; i++) {
bd_addr[i] =3D rev_bd[5-i];
}
-
#endif
+
printf("Client bd addr : %02X:%02X:%02X:%02X:%02X:%02X\n",
bd_addr[0], bd_addr[1], bd_addr[2],
bd_addr[3], bd_addr[4], bd_addr[5]);
@@ -3326,7 +3321,7 @@
=20
/*********************************************************************/
/***************** Ericsson test functions ***************************/
-/******************This will be moved later **************************/
+/***************** This will be moved later **************************/
/*********************************************************************/
=20
#ifdef ECS_TEST_FUNCTIONS
|
|
From: Mattias A. <mat...@us...> - 2001-04-17 12:09:11
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.90 1.91=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* added setting event filter for CSR Hw too.
* added return code in start_sdp_server
* fixed correct args when starting sdp_server in usermode stack
* fixed shutting down sdp_server when quitting btd
* changed how test_disc works, now shut down all l2cap connections
* minor changes
The diff of the modified file(s):
--- btd.c 2001/04/11 12:23:45 1.90
+++ btd.c 2001/04/17 12:09:10 1.91
@@ -231,7 +231,7 @@
#define BT_DATA(fmt...)=20
#endif
=20
-#if BT_DATAFLOW_DEBUG
+#if BT_DATADUMP_DEBUG
#define PRINTPKT(str, data, len) print_data(str, data, len)
#else
#define PRINTPKT(str, data, len)
@@ -285,9 +285,7 @@
static int open_socket(char *name, int role);
=20
static int sdpsrv_pid =3D 0;
-#ifndef BTD_USERSTACK
-static void start_sdp_server(void);
-#endif
+static int start_sdp_server(void);
=20
/* misc */
#ifndef BTD_USERSTACK
@@ -732,12 +730,8 @@
physdev, btdev, speedstring);
#endif
=20
- /* FIXME -- add check for pppd */
-
-#ifndef BTD_USERSTACK
if (role =3D=3D SERVER)
- start_sdp_server();
-#endif
+ sdpsrv_pid =3D start_sdp_server();
=20=20=20
spd =3D atoi(speedstring);
=20
@@ -776,10 +770,6 @@
{
read_history(BTD_HISTORY_FILE);
=20
-#ifdef BTD_USERSTACK
- sleep(2); /* temp fix - wait for last command response to be returned =
*/
-#endif
-
printf("Now entering cmd line mode\n");
=20
show_menu();
@@ -917,21 +907,32 @@
}
#endif /* !HAVE_READLINE */
=20
-#ifndef BTD_USERSTACK
-static void start_sdp_server(void)
+#define SDPSRV_CONF "/etc/sdp.xml"
+
+#ifdef BTD_USERSTACK
+#define SDPSRV_PROC "/tmp/sdp_sock"
+#else
+#define SDPSRV_PROC "/proc/sdp_srv"
+#endif
+
+int start_sdp_server(void)
{
- syslog(LOG_INFO, "Starting SDP server\n");
+ int sdpsrv_pid;
+ char *args[] =3D { SDPSRV_CMD, SDPSRV_CONF, SDPSRV_PROC, NULL };
=20=20=20
+ syslog(LOG_INFO, "Starting SDP server [%s]\n", SDPSRV_CMD);=20=20
+
if (!(sdpsrv_pid =3D vfork()))
{
- execlp(SDPSRV_CMD, SDPSRV_CMD);
+ execvp(SDPSRV_CMD, args);
=20
fprintf(stderr, "%s: no such file or directory\n", SDPSRV_CMD);
+ syslog(LOG_INFO, "%s not found", SDPSRV_CMD);
=20
_exit(0);
}
+ return sdpsrv_pid;
}
-#endif
=20
static void start_pppd(void)
{
@@ -1546,12 +1547,25 @@
}
else if (strncmp(buf, "test_disc", 9) =3D=3D 0)
{
- printf("Disconnecting TEST layer\n");
+ l2cap_con *con =3D get_first_con();
+ printf("Disconnecting all l2cap cons\n");
+
+#if 1
+ con =3D get_first_con();
+ while (con!=3D NULL) {
+ l2ca_disconnect_req(con);
+ con =3D get_first_con();
+ sleep(1);
+ }
+#else
test_disconnect_req(testcon); /* extern l2cap_con set in test.c */
sleep(2);
test_disconnect_req(testcon2);
sleep(2);
test_disconnect_req(testcon3);
+#endif=20=20=20=20
+ /* shutdown baseband ? */
+
}
else if(sscanf(buf, "bb_conn %x:%x:%x:%x:%x:%x",
&bd[5], &bd[4], &bd[3], &bd[2], &bd[1], &bd[0]) =3D=3D 6)
@@ -1732,6 +1746,9 @@
bt_initdone =3D 0;
}
#endif
+
+ btd_killchilds();
+
}
=20
int open_device(char* dev, int flags, int role)
@@ -2168,7 +2185,7 @@
if (pthread_create(&read_thread, NULL,=20
(void*)hci_receive_thread, NULL)!=3D0)
perror("pthread_create");=20=20=20=20
- sleep(1); /* wait for thread to start */
+=20
return 0;
}
=20
@@ -2290,6 +2307,8 @@
int retval;
int bytes_sent =3D 0;
=20
+ printf("bt_write_top : try sending data on last connected ch\n");
+
BT_DATA(" |X|<-- %3d [%d]\n", count, line);
=20=20=20
while (bytes_sent!=3Dcount)
@@ -2300,13 +2319,12 @@
if (retval > 0)
bytes_sent+=3Dretval;
else if (retval=3D=3D0)
- usleep(1000); /* wait some ... */
+ usleep(100000); /* wait some ... */
else
{
printf("error\n");
return retval;
}
-=20=20=20
usleep(1000); /* wait some time ... */
};
=20
@@ -3153,7 +3171,7 @@
=20
/* set_event_filter must be called for m/s switch on IrmaC! */
sleep(1);
- evfilter[0] =3D 0x02; /* Conenction setup */
+ evfilter[0] =3D 0x02; /* Connection setup */
evfilter[1] =3D 0x00; /* All devices */
evfilter[2] =3D 0x01; /* No auto accept */
printf("Setting event filter in Ericsson module!\n");
@@ -3228,6 +3246,7 @@
{=20=20
#ifndef BTD_USERSTACK
unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+ unsigned char evfilter[3];=20
unsigned int tmp[2];
tmp[0]=3D0x50;
tmp[1]=3D0x20;
@@ -3248,6 +3267,19 @@
perror("HCIWRITESCANENABLE");
exit(1);
}
+
+ sleep(1);
+ evfilter[0] =3D 0x02; /* Connection setup */
+ evfilter[1] =3D 0x00; /* All devices */
+ evfilter[2] =3D 0x01; /* No auto accept */
+ printf("Setting event filter in CSR module!\n");
+ if (ioctl(bt_cfd, HCISET_EVENT_FILTER, &evfilter) < 0)
+ {=20
+ perror("HCISET_EVENT_FILTER");
+ exit(1);
+ }
+
+
#else
printf("Setting write_scan_enable in CSR module!\n");
hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);
|
|
From: Gordon M. <gm...@us...> - 2001-04-18 00:54:07
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.91 1.92=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Fixed the hci_inquiry hang (hopefully).
The diff of the modified file(s):
--- btd.c 2001/04/17 12:09:10 1.91
+++ btd.c 2001/04/18 00:53:36 1.92
@@ -2900,6 +2900,7 @@
{
#ifdef BTD_USERSTACK
char inq_lap[6];
+ inquiry_results *inq_res;
=20
printf("Inquiring...\n");
=20
@@ -2907,7 +2908,8 @@
inq_lap[1] =3D 0x8b;
inq_lap[2] =3D 0x9e;
=20
- hci_inquiry(inq_lap, t, nbr_rsp);
+ inq_res =3D (inquiry_results*) malloc(sizeof(inquiry_results) + nbr_rsp =
* 6);
+ hci_inquiry(inq_lap, t, nbr_rsp, inq_res);
#else
int i;
inquiry_results *inq_res;
|
|
From: Peter K. <pk...@us...> - 2001-04-18 11:50:33
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.92 1.93=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added a missing include of l2cap_con.h. The diff of the modified file(s): --- btd.c 2001/04/18 00:53:36 1.92 +++ btd.c 2001/04/18 11:50:32 1.93 @@ -179,6 +179,7 @@ #include "include/btmem.h" #include "include/hci.h" #include "include/l2cap.h" +#include "include/l2cap_con.h" #include "include/sdp.h" #include "include/tcs.h" #include "include/test.h" |
|
From: Mattias A. <mat...@us...> - 2001-04-25 18:13:05
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.94 1.95=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* re-added 10 ms sleep
* changed write page scan activity values to default
The diff of the modified file(s):
--- btd.c 2001/04/20 16:12:14 1.94
+++ btd.c 2001/04/25 18:13:05 1.95
@@ -3347,6 +3347,7 @@
=20
printf("Setting baudrate in Ericsson module!\n");=20=20
hci_set_baudrate(spd);=20=20
+ usleep(10000); /* needed for some reason... */
#endif
}
=20
@@ -3369,8 +3370,8 @@
unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
unsigned char evfilter[3];=20
unsigned int tmp[2];
- tmp[0] =3D 0x50;
- tmp[1] =3D 0x20;
+ tmp[0]=3D0x800;
+ tmp[1]=3D0x12;
=20=20=20
sleep(1);
printf("Setting write_scan_enable in CSR module!\n");
|
|
From: Gordon M. <gm...@us...> - 2001-04-27 15:38:34
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.95 1.96=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
--Added the Infineon BlueMoon Chipset support provided by Christian Kranz.
The diff of the modified file(s):
--- btd.c 2001/04/25 18:13:05 1.95
+++ btd.c 2001/04/27 15:38:03 1.96
@@ -326,7 +326,10 @@
static void no_init_hw(int spd);
static void unknown_init_phys(int fd);
static void unknown_init_hw(int spd);
+static void infineon_init_phys(int fd);
+static void infineon_init_hw(int spd);
=20
+
#undef ECS_TEST_FUNCTIONS
=20
#ifdef ECS_TEST_FUNCTIONS
@@ -422,6 +425,7 @@
#define HW_GENERIC 4
#define HW_NO_INIT 5
#define HW_UNKNOWN 6
+#define HW_INFINEON 7
=20
/*=20
Bluetooth discipline define. Should reside in /include/asm/termios.h
@@ -3209,6 +3213,10 @@
usb_init_phys(fd);
break;
=20
+ case HW_INFINEON:
+ infineon_init_phys(fd);
+ break;
+
case HW_GENERIC:
generic_init_phys(fd);
break;
@@ -3245,6 +3253,10 @@
usb_init_hw(spd);
break;
=20
+ case HW_INFINEON:
+ infineon_init_hw(spd);
+ break;
+
case HW_GENERIC:
generic_init_hw(spd);
break;
@@ -3283,6 +3295,8 @@
hw_vendor =3D HW_GENERIC;
else if (!strcmp(vendor, "No Init"))
hw_vendor =3D HW_NO_INIT;
+ else if (!strcmp(vendor, "Infineon"))
+ hw_vendor =3D HW_INFINEON;
else
hw_vendor =3D HW_UNKNOWN;
}
@@ -3467,6 +3481,52 @@
hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);
sleep(1); /* wait for HW */
#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*/
+/* Infineon 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 infineon_init_phys(int fd)
+{
+ fd_setup(fd, 115200, USE_FLOW_CTRL);
+}
+
+void
+infineon_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 Infineon chip!\n");
+ if (ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan) < 0)
+ {=20
+ perror("HCIWRITESCANENABLE");
+ exit(1);
+ }
+
+ sleep(1); // wait for HW...=20
+ printf("Setting baudrate in Infineon module!\n");=20=20
+ if (ioctl(bt_cfd, HCISETBAUDRATE, &spd) < 0)
+ {
+ perror("HCISETBAUDRATE");
+ exit(1);
+ }
+ printf("read Firmware version number\n");
+
+#else=20=20
+ printf("Setting write_scan_enable in Infineon 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 Infineon chip!\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*/
|
|
From: Peter K. <pk...@us...> - 2001-04-27 16:48:44
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.96 1.97=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Reorganized code somewhat.
The diff of the modified file(s):
--- btd.c 2001/04/27 15:38:03 1.96
+++ btd.c 2001/04/27 16:48:43 1.97
@@ -312,12 +312,14 @@
=20
static int hw_vendor(void);
=20
-static void ericsson_init_phys(int fd);
-static void ericsson_init_hw(int spd);
static void csr_init_phys(int fd);
static void csr_init_hw(int spd);
static void digianswer_init_phys(int fd);
static void digianswer_init_hw(int spd);
+static void ericsson_init_phys(int fd);
+static void ericsson_init_hw(int spd);
+static void infineon_init_phys(int fd);
+static void infineon_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);
@@ -326,8 +328,6 @@
static void no_init_hw(int spd);
static void unknown_init_phys(int fd);
static void unknown_init_hw(int spd);
-static void infineon_init_phys(int fd);
-static void infineon_init_hw(int spd);
=20
=20
#undef ECS_TEST_FUNCTIONS
@@ -418,14 +418,14 @@
#define BTD_HISTORY_FILE "/tmp/btd_history"
=20
#define HW_NOT_PROBED -1
-#define HW_ERICSSON 0
-#define HW_CSR 1
-#define HW_DIGIANSWER 2
-#define HW_USB 3
-#define HW_GENERIC 4
-#define HW_NO_INIT 5
-#define HW_UNKNOWN 6
-#define HW_INFINEON 7
+#define HW_CSR 0
+#define HW_DIGIANSWER 1
+#define HW_ERICSSON 2
+#define HW_INFINEON 3
+#define HW_USB 4
+#define HW_GENERIC 5
+#define HW_NO_INIT 6
+#define HW_UNKNOWN 7
=20
/*=20
Bluetooth discipline define. Should reside in /include/asm/termios.h
@@ -3197,10 +3197,6 @@
{
switch (hw_vendor())
{
- case HW_ERICSSON:
- ericsson_init_phys(fd);
- break;
-
case HW_CSR:
csr_init_phys(fd);
break;
@@ -3209,14 +3205,18 @@
digianswer_init_phys(fd);
break;
=20
- case HW_USB:
- usb_init_phys(fd);
+ case HW_ERICSSON:
+ ericsson_init_phys(fd);
break;
=20
case HW_INFINEON:
infineon_init_phys(fd);
break;
=20
+ case HW_USB:
+ usb_init_phys(fd);
+ break;
+
case HW_GENERIC:
generic_init_phys(fd);
break;
@@ -3237,10 +3237,6 @@
{
switch (hw_vendor())
{
- case HW_ERICSSON:
- ericsson_init_hw(spd);
- break;
-
case HW_CSR:
csr_init_hw(spd);
break;
@@ -3249,14 +3245,18 @@
digianswer_init_hw(spd);
break;
=20
- case HW_USB:
- usb_init_hw(spd);
+ case HW_ERICSSON:
+ ericsson_init_hw(spd);
break;
=20
case HW_INFINEON:
infineon_init_hw(spd);
break;
=20
+ case HW_USB:
+ usb_init_hw(spd);
+ break;
+
case HW_GENERIC:
generic_init_hw(spd);
break;
@@ -3283,20 +3283,20 @@
=20
if (!vendor)
hw_vendor =3D HW_UNKNOWN;
- else if (!strcmp(vendor, "Ericsson"))
- hw_vendor =3D HW_ERICSSON;
else if (!strcmp(vendor, "CSR"))
hw_vendor =3D HW_CSR;
else if (!strcmp(vendor, "Digianswer"))
hw_vendor =3D HW_DIGIANSWER;
+ else if (!strcmp(vendor, "Ericsson"))
+ hw_vendor =3D HW_ERICSSON;
+ else if (!strcmp(vendor, "Infineon"))
+ hw_vendor =3D HW_INFINEON;
else if (!strcmp(vendor, "USB"))
hw_vendor =3D HW_USB;
else if (!strcmp(vendor, "Generic"))
hw_vendor =3D HW_GENERIC;
else if (!strcmp(vendor, "No Init"))
hw_vendor =3D HW_NO_INIT;
- else if (!strcmp(vendor, "Infineon"))
- hw_vendor =3D HW_INFINEON;
else
hw_vendor =3D HW_UNKNOWN;
}
@@ -3305,67 +3305,6 @@
}
=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*/
-/* Ericsson 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*/
-
-/* Set the phys device to Ericsson default speed, 57600 */
-void
-ericsson_init_phys(int fd)
-{
- fd_setup(fd, 57600, USE_FLOW_CTRL);
-}
-
-void
-ericsson_init_hw(int spd)
-{
-#ifndef BTD_USERSTACK
- unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
- unsigned char evfilter[3];
-=20=20
- /* wait for Ericsson module to boot if running this app directly at star=
tup=20
- */
- sleep(1);
-
- printf("Setting write_scan_enable in Ericsson module!\n");
- if (ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan) < 0)
- {=20
- perror("HCIWRITESCANENABLE");
- exit(1);
- }
-
- /* set_event_filter must be called for m/s switch on IrmaC! */
- sleep(1);
- evfilter[0] =3D 0x02; /* Connection setup */
- evfilter[1] =3D 0x00; /* All devices */
- evfilter[2] =3D 0x01; /* No auto accept */
- printf("Setting event filter in Ericsson module!\n");
- if (ioctl(bt_cfd, HCISET_EVENT_FILTER, &evfilter) < 0)
- {=20
- perror("HCISET_EVENT_FILTER");
- exit(1);
- }
-
- sleep(1); // wait for HW...=20
- printf("Setting baudrate in Ericsson module!\n");=20=20
- if (ioctl(bt_cfd, HCISETBAUDRATE, &spd) < 0)
- {
- perror("HCISETBAUDRATE");
- exit(1);
- }
-#else=20=20
- printf("Setting write_scan_enable in Ericsson module!\n");
- hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);=09=09
- sleep(1); /* wait for HW... */
-=20=20
- tcflush(phys_fd, TCIOFLUSH);
-
- printf("Setting baudrate in Ericsson module!\n");=20=20
- hci_set_baudrate(spd);=20=20
- usleep(10000); /* needed for some reason... */
-#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*/
/* CSR 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*/
=20
@@ -3384,6 +3323,7 @@
unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
unsigned char evfilter[3];=20
unsigned int tmp[2];
+
tmp[0]=3D0x800;
tmp[1]=3D0x12;
=20=20=20
@@ -3455,35 +3395,66 @@
}
=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 */
+/* Ericsson 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*/
=20
+/* Set the phys device to Ericsson default speed, 57600 */
void
-usb_init_phys(int fd)
+ericsson_init_phys(int fd)
{
- fd_setup(fd, 115200, USE_FLOW_CTRL);
+ fd_setup(fd, 57600, USE_FLOW_CTRL);
}
=20
void
-usb_init_hw(int spd)
+ericsson_init_hw(int spd)
{
#ifndef BTD_USERSTACK
unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+ unsigned char evfilter[3];
+=20=20
+ /* wait for Ericsson module to boot if running this app directly at star=
tup=20
+ */
sleep(1);
- printf("Setting write_scan_enable in USB module!\n");
=20=20=20
+ printf("Setting write_scan_enable in Ericsson module!\n");
if (ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan) < 0)
{=20
perror("HCIWRITESCANENABLE");
exit(1);
}
+
+ /* set_event_filter must be called for m/s switch on IrmaC! */
+ sleep(1);
+ evfilter[0] =3D 0x02; /* Connection setup */
+ evfilter[1] =3D 0x00; /* All devices */
+ evfilter[2] =3D 0x01; /* No auto accept */
+ printf("Setting event filter in Ericsson module!\n");
+ if (ioctl(bt_cfd, HCISET_EVENT_FILTER, &evfilter) < 0)
+ {=20
+ perror("HCISET_EVENT_FILTER");
+ exit(1);
+ }
+
+ sleep(1); // wait for HW...=20
+ printf("Setting baudrate in Ericsson module!\n");=20=20
+ if (ioctl(bt_cfd, HCISETBAUDRATE, &spd) < 0)
+ {
+ perror("HCISETBAUDRATE");
+ exit(1);
+ }
#else
+ printf("Setting write_scan_enable in Ericsson module!\n");
hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);
- sleep(1); /* wait for HW */
+ sleep(1); /* wait for HW... */
+=20=20
+ tcflush(phys_fd, TCIOFLUSH);
+
+ printf("Setting baudrate in Ericsson module!\n");=20=20
+ hci_set_baudrate(spd);=20=20
+ usleep(10000); /* needed for some reason... */
#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*/
/* Infineon 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*/
@@ -3526,7 +3497,35 @@
printf("Setting baudrate in Infineon chip!\n");
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*/
+/* USB 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*/
=20
+void
+usb_init_phys(int fd)
+{
+ fd_setup(fd, 115200, USE_FLOW_CTRL);
+}
+
+void
+usb_init_hw(int spd)
+{
+#ifndef BTD_USERSTACK
+ unsigned int wrscan =3D (PAGE_SCAN_ENABLE | INQUIRY_SCAN_ENABLE);
+ sleep(1);
+ printf("Setting write_scan_enable in USB module!\n");
+=20=20
+ if (ioctl(bt_cfd, HCIWRITESCANENABLE, &wrscan) < 0)
+ {=20
+ perror("HCIWRITESCANENABLE");
+ exit(1);
+ }
+#else
+ hci_write_scan_enable(PAGE_SCAN_ENABLE|INQUIRY_SCAN_ENABLE);
+ sleep(1); /* wait for HW */
+#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*/
|
|
From: Anders J. <and...@us...> - 2001-07-30 11:13:53
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.98 1.99=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected include of unplug_test.h The diff of the modified file(s): --- btd.c 2001/06/15 12:43:15 1.98 +++ btd.c 2001/07/30 11:13:52 1.99 @@ -186,7 +186,7 @@ #include "include/rfcomm.h" #include "include/btdebug.h" #include "include/bt_proc.h" -#include "unplug_test.h" +#include "include/unplug_test.h" =20 /* * Local functions |
|
From: Anders J. <and...@us...> - 2001-07-30 12:54:29
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.99 1.100=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Removed unplug_test_init as this is done at first call to the process_test_= command in unplug_test.c The diff of the modified file(s): --- btd.c 2001/07/30 11:13:52 1.99 +++ btd.c 2001/07/30 12:54:27 1.100 @@ -1729,7 +1729,6 @@ tcs_init(); test_init(); btmem_init(); - unplug_test_init(); bt_stat.bytes_received =3D 0; bt_stat.bytes_sent =3D 0;=20=20 =20 |
|
From: Anders J. <and...@us...> - 2001-07-30 15:44:04
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.100 1.101=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
The t command isn't available if we are not building with unplug test code
The diff of the modified file(s):
--- btd.c 2001/07/30 12:54:27 1.100
+++ btd.c 2001/07/30 15:44:01 1.101
@@ -581,7 +581,9 @@
" bb_conn <xx:xx:xx:xx:xx:xx>", /* connect only baseband */
" bb_disc <hci handle>", /* disconnect baseband */
" ",
+#ifdef INCLUDE_UNPLUG_TEST
" t <testcase>", /* e.g testcase 4.3 't 43' */
+#endif
"",
#endif
NULL
@@ -1504,11 +1506,13 @@
tmp_bd[3], tmp_bd[4], tmp_bd[5], tmp[0]);
l2ca_getinfo(tmp_bd, tmp[0]);
}
+#ifdef INCLUDE_UNPLUG_TEST
else if (sscanf(buf, "t %d", &i) =3D=3D 1)
{
/* unplug test cases, if you don't know what it is, don't use it !!! :=
) */
process_test_cmd(i);
}
+#endif
else if(sscanf(buf, "tcs_conn %x:%x:%x:%x:%x:%x",
&bd[0], &bd[1], &bd[2], &bd[3], &bd[4], &bd[5]) =3D=3D 6)
{=20=20=20=20
|
|
From: Anders J. <and...@us...> - 2001-07-31 09:03:35
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.101 1.102=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Changed #INCLUDE_UNPLUG_TEST -> #CONFIG_BLUETOOTH_UNPLUG_TEST
The diff of the modified file(s):
--- btd.c 2001/07/30 15:44:01 1.101
+++ btd.c 2001/07/31 09:03:34 1.102
@@ -581,7 +581,7 @@
" bb_conn <xx:xx:xx:xx:xx:xx>", /* connect only baseband */
" bb_disc <hci handle>", /* disconnect baseband */
" ",
-#ifdef INCLUDE_UNPLUG_TEST
+#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
" t <testcase>", /* e.g testcase 4.3 't 43' */
#endif
"",
@@ -1506,7 +1506,7 @@
tmp_bd[3], tmp_bd[4], tmp_bd[5], tmp[0]);
l2ca_getinfo(tmp_bd, tmp[0]);
}
-#ifdef INCLUDE_UNPLUG_TEST
+#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST
else if (sscanf(buf, "t %d", &i) =3D=3D 1)
{
/* unplug test cases, if you don't know what it is, don't use it !!! :=
) */
|
|
From: Peter K. <pk...@us...> - 2001-08-17 16:23:23
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.102 1.103=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Need to set ifr.ifr_addr.sa_family before calling the SIOCGIFADDR ioctl The diff of the modified file(s): --- btd.c 2001/07/31 09:03:34 1.102 +++ btd.c 2001/08/17 16:23:21 1.103 @@ -1644,6 +1644,8 @@ char *local_address =3D NULL; int fd =3D socket(AF_INET, SOCK_DGRAM, 0); struct ifreq ifr; + + ifr.ifr_addr.sa_family =3D AF_INET; strcpy(ifr.ifr_name, "eth0"); ioctl(fd, SIOCGIFADDR, (int)&ifr); close_device(fd); |
|
From: Anders J. <and...@us...> - 2001-10-10 14:53:02
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.103 1.104=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* GET_RFCOMMLINE -> GET_LINE
The diff of the modified file(s):
--- btd.c 2001/08/17 16:23:21 1.103
+++ btd.c 2001/10/10 14:53:01 1.104
@@ -2374,7 +2374,7 @@
{
int n;
=20
- BT_DATA(" |X|--> %3d [%d]\n", len, GET_RFCOMMLINE(con_id));
+ BT_DATA(" |X|--> %3d [%d]\n", len, GET_LINE(con_id));
=20
if (modem_emulation && !modem_connected)
{
@@ -2411,7 +2411,7 @@
=20
if (status) {
/* fixme -- only works for rfcomm now */
- line =3D GET_RFCOMMLINE(con_id);
+ line =3D GET_LINE(con_id);
=20
if ((line < 0) || (line > BT_NBR_DATAPORTS)) {
printf("bt_connect_cfm on invalid line (%d)\n", line);
@@ -2875,7 +2875,7 @@
=20=20=20=20=20
CHECK_RFCOMM(con_id);
srv_ch =3D GET_RFCOMMSRVCH(con_id);
- line =3D GET_RFCOMMLINE(con_id);
+ line =3D GET_LINE(con_id);
=20=20
if (line !=3D 0)
{
@@ -2903,7 +2903,7 @@
u8 line;=09=09=09=09
=20=20=20
CHECK_RFCOMM(con_id);
- line =3D GET_RFCOMMLINE(con_id);
+ line =3D GET_LINE(con_id);
=20=20=20
if (line !=3D 0)
{
@@ -2911,7 +2911,7 @@
return;
}
=20=20=20
- rfcomm_disconnect_req(GET_RFCOMMLINE(con_id));
+ rfcomm_disconnect_req(GET_LINE(con_id));
#endif
printf("Disconnected!\n");
}
|