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: Peter K. <pk...@us...> - 2001-09-06 16:16:28
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.h 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 btinit.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: csr_h4_to_bcsp() and csr_bcsp_to_h4() need the initial hardware speed. The diff of the modified file(s): --- bt_vendor.c 2001/09/06 16:02:37 1.27 +++ bt_vendor.c 2001/09/06 16:16:26 1.28 @@ -73,6 +73,8 @@ static void unknown_init_phys(int fd); static void unknown_init_hw(int bt_cfd, int phys_fd, int spd); =20 +static void csr_change_if(int bt_cfd, int phys_fd, int speed); + void init_phys(int fd) { @@ -161,7 +163,7 @@ */ =20 void -init_failed(int bt_cfd, int phys_fd) +init_failed(int bt_cfd, int phys_fd, int speed) { =20 static int did_restart =3D 0; /* only try once */=20=20 @@ -178,7 +180,7 @@ { case HW_CSR: /* Try changing interface BCSP<->H4 */ - csr_change_if(bt_cfd, phys_fd); + csr_change_if(bt_cfd, phys_fd, speed); did_restart =3D 1; =20 /* Restart btd */ @@ -312,21 +314,21 @@ * Switches host interface in CSR HW (H4<->BCSP)=20 */ =20 -void csr_change_if(int bt_cfd, int phys_fd) +void csr_change_if(int bt_cfd, int phys_fd, int speed) { /* This may seem reversed, but hw_vendor() returns what we want, not what we have, in this situation... */ if (!bt_bcsp_mode(bt_cfd, -1)) { - csr_bcsp_to_h4(bt_cfd, phys_fd); + csr_bcsp_to_h4(bt_cfd, phys_fd, speed); } else { - csr_h4_to_bcsp(bt_cfd, phys_fd); + csr_h4_to_bcsp(bt_cfd, phys_fd, speed); } } =20 -void csr_bcsp_to_h4(int bt_cfd, int phys_fd) +void csr_bcsp_to_h4(int bt_cfd, int phys_fd, int speed) { unsigned short ps_parbuf[10]; =20 @@ -335,8 +337,11 @@ /* Temporarily set stack to use BCSP framing */ bt_bcsp_mode(bt_cfd, 1); =20 - /* Setup serial port for BCSP (default baudrate) */ - fd_setup(phys_fd, 115200, USE_FLOW_CTRL); + if (speed) + fd_setup(phys_fd, speed, USE_FLOW_CTRL); + else + init_phys(phys_fd); + reset_hw(); =20 if (ioctl(bt_cfd, BTINITBCSP) < 0) @@ -391,7 +396,7 @@ shutdown_stack(bt_cfd); } =20 -void csr_h4_to_bcsp(int bt_cfd, int phys_fd) +void csr_h4_to_bcsp(int bt_cfd, int phys_fd, int speed) { unsigned short ps_parbuf[10]; =20 @@ -400,8 +405,10 @@ /* Set stack to use H4 temporarily */=20=20=20=20=20=20=20=20 bt_bcsp_mode(bt_cfd, 0); =20 - /* Setup serial port for H4 (default baudrate) */ - fd_setup(phys_fd, 115200, USE_FLOW_CTRL); + if (speed) + fd_setup(phys_fd, speed, USE_FLOW_CTRL); + else + init_phys(phys_fd); =20 reset_hw();=20=20=20=20 =20 --- bt_vendor.h 2001/08/29 10:02:05 1.7 +++ bt_vendor.h 2001/09/06 16:16:26 1.8 @@ -66,12 +66,11 @@ =20 void init_hw(int bt_cfd, int phys_fd, int spd); void init_phys(int fd); -void init_failed(int bt_cfd, int phys_fd); +void init_failed(int bt_cfd, int phys_fd, int speed); =20 int hw_vendor(void); =20 -void csr_change_if(int bt_cfd, int phys_fd); -void csr_bcsp_to_h4(int bt_cfd, int phys_fd); -void csr_h4_to_bcsp(int bt_cfd, int phys_fd); +void csr_bcsp_to_h4(int bt_cfd, int phys_fd, int speed); +void csr_h4_to_bcsp(int bt_cfd, int phys_fd, int speed); =20 #endif /* __BT_VENDOR_H__*/ --- btd.c 2001/09/05 15:33:46 1.25 +++ btd.c 2001/09/06 16:16:26 1.26 @@ -301,7 +301,14 @@ reset_hw(); =20 if (init_stack(bt_cfd) < 0) - init_failed(bt_cfd, phys_fd); + { + /* 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) + { + init_failed(bt_cfd, phys_fd, init_hw_speed); + } + } =20 if (do_hwinit) init_hw(bt_cfd, phys_fd, atoi(speedstr)); --- btinit.c 2001/08/29 10:02:05 1.13 +++ btinit.c 2001/09/06 16:16:26 1.14 @@ -222,7 +222,14 @@ reset_hw(); =20=20=20 if (init_stack(bt_cfd) < 0) - init_failed(bt_cfd, phys_fd); + { + /* 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) + { + init_failed(bt_cfd, phys_fd, init_hw_speed); + } + } =20=20=20 if (do_hwinit) init_hw(bt_cfd, phys_fd, atoi(speedstr)); |
From: Peter K. <pk...@us...> - 2001-09-06 16:02:37
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.26 1.27=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Shutdown the stack at the end of csr_h4_to_bcsp() and csr_bcsp_to_h4(). The diff of the modified file(s): --- bt_vendor.c 2001/08/29 10:02:05 1.26 +++ bt_vendor.c 2001/09/06 16:02:37 1.27 @@ -387,6 +387,8 @@ =20 /* Set back stack to use H4 framing */ bt_bcsp_mode(bt_cfd, 0); + + shutdown_stack(bt_cfd); } =20 void csr_h4_to_bcsp(int bt_cfd, int phys_fd) @@ -430,16 +432,16 @@ ps_parbuf[0] =3D 0x1; /* BCSP */ csr_pskey(bt_cfd, PSKEY_HOST_INTERFACE,=20 CSR_PSKEY_SETREQ, ps_parbuf, 1); - - /* Should not be needed if hw_vendor is changed in kernel ....*/ - - /* Set back stack to use BCSP framing */ - bt_bcsp_mode(bt_cfd, 1); } else { syslog(LOG_ERR, __FUNCTION__ ": Unknown PS key parameter: %d", ps_parb= uf[1]); } + + /* Set back stack to use BCSP framing */ + bt_bcsp_mode(bt_cfd, 1); + + shutdown_stack(bt_cfd); } =20 =20 |
From: Peter K. <pk...@us...> - 2001-09-06 15:57:26
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.17 1.18=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Moved BCSP channel definitions to bcsp.h * Corrected spelling of BCSP_EVT_CHN. The diff of the modified file(s): --- bcsp.c 2001/08/16 13:01:22 1.17 +++ bcsp.c 2001/09/06 15:56:56 1.18 @@ -83,13 +83,6 @@ #define BCSPDUMP(data, len) #endif =20 -#define BCSP_BCCMD_CHN 2 -#define BCSP_HQ_CHN 3 -#define BCSP_CMD_CHN 5 -#define BCSP_EVT_CNH 5 -#define BCSP_ACL_CHN 6 -#define BCSP_SCO_CHN 7 - #define BCSP_OCF 0 =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ @@ -226,7 +219,7 @@ case BCSP_HQ_CHN: hci_receive_hq(data, len); break; - case BCSP_EVT_CNH: + case BCSP_EVT_CHN: hci_receive_event(data, (s32)len); break; case BCSP_ACL_CHN: |
From: Peter K. <pk...@us...> - 2001-09-06 15:56:56
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Moved BCSP channel definitions to bcsp.h * Corrected spelling of BCSP_EVT_CHN. The diff of the modified file(s): --- bcsp.h 2001/08/16 13:01:22 1.8 +++ bcsp.h 2001/09/06 15:56:56 1.9 @@ -60,6 +60,14 @@ #define TRUE 1 #endif =20 +#define BCSP_BCCMD_CHN 2 +#define BCSP_HQ_CHN 3 +#define BCSP_CMD_CHN 5 +#define BCSP_EVT_CHN 5 +#define BCSP_ACL_CHN 6 +#define BCSP_SCO_CHN 7 +#define BCSP_DFU_CHN 12 + #define SYNC 0xEDEDDCDA #define SYNC_RSP 0xEEEFAFAC #define CONF 0xEDACEFAD |
From: Peter K. <pk...@us...> - 2001-09-05 15:33:47
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Removed redundant code. The diff of the modified file(s): --- btd.c 2001/08/29 10:02:05 1.24 +++ btd.c 2001/09/05 15:33:46 1.25 @@ -776,8 +776,6 @@ =20=20=20=20=20 return; } - else if(sig =3D=3D SIGTERM) - exit(0); } =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 */ |
From: Peter K. <pk...@us...> - 2001-08-30 05:37:17
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- l2cap.c 1.112 1.113=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Fixed a typo. The diff of the modified file(s): --- l2cap.c 2001/07/18 10:07:02 1.112 +++ l2cap.c 2001/08/30 05:37:17 1.113 @@ -1326,7 +1326,7 @@ } else{ D_CON(__FUNCTION__ ": Denying connection. Current connections: %d,=20 - max connections: %d\n", bt_connections, bt_max_connections= ); + max connections: %d\n", hci_ctrl.nbr_of_connections, bt_ma= x_connections); lp_connect_rsp(bd_addr,0); } } |
From: Peter K. <pk...@us...> - 2001-08-29 11:15:21
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 modememul.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Include bt_if.h in bt_misc.c instead of modememul.c (as was intended). The diff of the modified file(s): --- bt_misc.c 2001/08/29 10:02:05 1.14 +++ bt_misc.c 2001/08/29 11:15:20 1.15 @@ -64,6 +64,7 @@ =20 #include "btd.h" #include "bt_misc.h" +#include "bt_if.h" =20 #define D(x) //x =20 --- modememul.c 2001/08/29 10:15:53 1.11 +++ modememul.c 2001/08/29 11:15:20 1.12 @@ -57,7 +57,6 @@ #include <signal.h> =20 #include "btd.h" -#include "bt_if.h" #include "bt_misc.h" =20 #define D(x) //x |
From: Peter K. <pk...@us...> - 2001-08-29 10:15:54
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 modememul.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made the modem emulator build again. The diff of the modified file(s): --- Makefile 2001/07/31 09:02:21 1.7 +++ Makefile 2001/08/29 10:15:53 1.8 @@ -23,7 +23,7 @@ INSTGROUP =3D root =20 BTDOBJS =3D btd.o bt_ipa.o bt_vendor.o bt_if.o bt_misc.o -MEMULOBJS =3D modememul.o bt_misc.o +MEMULOBJS =3D modememul.o bt_if.o bt_misc.o BTINITOBJS =3D btinit.o bt_vendor.o bt_if.o bt_misc.o BTCONOBJS =3D btcon.o bt_if.o bt_misc.o BTSENDOBJS =3D btsend.o bt_if.o bt_misc.o --- modememul.c 2001/08/29 10:02:05 1.10 +++ modememul.c 2001/08/29 10:15:53 1.11 @@ -57,6 +57,7 @@ #include <signal.h> =20 #include "btd.h" +#include "bt_if.h" #include "bt_misc.h" =20 #define D(x) //x |
From: Peter K. <pk...@us...> - 2001-08-29 10:08:43
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.50 1.51=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Do not differentiate between BCSP and H4 in the CSR version of bt_hw_vendor(). The diff of the modified file(s): --- hci_vendor.c 2001/08/16 13:05:55 1.50 +++ hci_vendor.c 2001/08/29 10:08:42 1.51 @@ -1163,10 +1163,7 @@ char* bt_hw_vendor(void) { - if (bt_use_bcsp(-1)) - return "CSR (BCSP)"; - else - return "CSR (H4)"; + return "CSR"; } =20 #elif defined(CONFIG_BLUETOOTH_INFINEON_BMI) |
From: Peter K. <pk...@us...> - 2001-08-29 10:02:05
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 bt_misc.h 1.8 1.9=20=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.h 1.6 1.7=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.23 1.24=20=20=20=20=20=20=20=20=20=20=20=20 btinit.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20 modememul.c 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use bt_bcsp_mode() to check if BCSP is used, instead of hw_vendor(). This means the use_bcsp argument to fd_setup() is no longer needed. The diff of the modified file(s): --- bt_misc.c 2001/08/29 08:34:43 1.13 +++ bt_misc.c 2001/08/29 10:02:05 1.14 @@ -324,7 +324,7 @@ =20 =20 void -fd_setup(int fd, int speed, int flow, int use_bcsp) +fd_setup(int fd, int speed, int flow) { struct termios t; =20 @@ -343,7 +343,7 @@ cfmakeraw(&t); =20=09 t.c_cflag &=3D ~CBAUD; - if (use_bcsp) + if (bt_bcsp_mode(-1, -1)) { flow =3D 0; t.c_cflag |=3D translate_speed(speed) | CS8 | CLOCAL | PARENB; --- bt_misc.h 2001/06/08 09:45:37 1.8 +++ bt_misc.h 2001/08/29 10:02:05 1.9 @@ -45,15 +45,12 @@ #define USE_NO_FLOW 0=20 #define USE_FLOW_CTRL 1 =20 -#define USE_BCSP 1 -#define DONT_USE_BCSP 0 - #define CLIENT 0 #define SERVER 1 =20 #define LOCAL_NAME_LENGTH 32 =20 -void fd_setup(int fd, int speed, int flow, int use_bcsp); +void fd_setup(int fd, int speed, int flow); int translate_speed(int spd); =20 /* Socket handling */ --- bt_vendor.c 2001/08/29 09:43:49 1.25 +++ bt_vendor.c 2001/08/29 10:02:05 1.26 @@ -78,8 +78,7 @@ { switch (hw_vendor()) { - case HW_CSR_H4: - case HW_CSR_BCSP: + case HW_CSR: csr_init_phys(fd); break; =20 @@ -119,8 +118,7 @@ { switch (hw_vendor()) { - case HW_CSR_H4: - case HW_CSR_BCSP: + case HW_CSR: csr_init_hw(bt_cfd, phys_fd, spd); break; =20 @@ -178,9 +176,7 @@ =20 switch (hw_vendor()) { - case HW_CSR_H4: - case HW_CSR_BCSP: -=20=20=20=20 + case HW_CSR: /* Try changing interface BCSP<->H4 */ csr_change_if(bt_cfd, phys_fd); did_restart =3D 1; @@ -212,10 +208,8 @@ =20 if (!vendor) hw_vendor =3D HW_UNKNOWN; - else if (!strcmp(vendor, "CSR (H4)")) - hw_vendor =3D HW_CSR_H4; - else if (!strcmp(vendor, "CSR (BCSP)")) - hw_vendor =3D HW_CSR_BCSP; + 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")) @@ -251,10 +245,7 @@ csr_init_phys(int fd) { D(syslog(LOG_INFO, "Setting default speed 115200")); - if (hw_vendor() =3D=3D HW_CSR_H4)=20 - fd_setup(fd, 115200, USE_FLOW_CTRL, DONT_USE_BCSP); - else - fd_setup(fd, 115200, USE_FLOW_CTRL, USE_BCSP); + fd_setup(fd, 115200, USE_FLOW_CTRL); } =20 /* @@ -325,7 +316,7 @@ { /* This may seem reversed, but hw_vendor() returns what we want, not what we have, in this situation... */ - if (hw_vendor() =3D=3D HW_CSR_H4) + if (!bt_bcsp_mode(bt_cfd, -1)) { csr_bcsp_to_h4(bt_cfd, phys_fd); } @@ -345,7 +336,7 @@ bt_bcsp_mode(bt_cfd, 1); =20 /* Setup serial port for BCSP (default baudrate) */ - fd_setup(phys_fd, 115200, USE_FLOW_CTRL, USE_BCSP); + fd_setup(phys_fd, 115200, USE_FLOW_CTRL); reset_hw(); =20 if (ioctl(bt_cfd, BTINITBCSP) < 0) @@ -408,7 +399,7 @@ bt_bcsp_mode(bt_cfd, 0); =20 /* Setup serial port for H4 (default baudrate) */ - fd_setup(phys_fd, 115200, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(phys_fd, 115200, USE_FLOW_CTRL); =20 reset_hw();=20=20=20=20 =20 @@ -462,7 +453,7 @@ int firmware =3D -1; char* buf; =20=20=20 - if ((hw_vendor() =3D=3D HW_CSR_BCSP) && (csr_disable_deep_sleep(bt_cfd))) + if (bt_bcsp_mode(bt_cfd, -1) && csr_disable_deep_sleep(bt_cfd)) kill(getpid(), SIGUSR1); /* Restart btd (and HW) to activate change= s */ =20=20=20=20=20=20=20 D(syslog(LOG_INFO, "Setting write_scan_enable in CSR module")); @@ -494,10 +485,7 @@ bt_set_baudrate(bt_cfd, spd); =20 /* Now set phys device speed to whatever HW was set to use */ - if (hw_vendor() =3D=3D HW_CSR_H4)=20 - fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP); - else - fd_setup(phys_fd, spd, USE_FLOW_CTRL, USE_BCSP); + fd_setup(phys_fd, spd, USE_FLOW_CTRL); =20 tcflush(phys_fd, TCIOFLUSH); =20 @@ -518,7 +506,7 @@ void digianswer_init_phys(int fd) { - fd_setup(fd, 9600, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(fd, 9600, USE_FLOW_CTRL); } =20 void @@ -541,7 +529,7 @@ } =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP);=20=20 + fd_setup(phys_fd, spd, USE_FLOW_CTRL); tcflush(phys_fd, TCIOFLUSH); } } @@ -554,7 +542,7 @@ void ericsson_init_phys(int fd) { - fd_setup(fd, 57600, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(fd, 57600, USE_FLOW_CTRL); } =20 void @@ -580,7 +568,7 @@ usleep(10000); =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(phys_fd, spd, USE_FLOW_CTRL); tcflush(phys_fd, TCIOFLUSH); } } @@ -591,7 +579,7 @@ =20 void infineon_init_phys(int fd) { - fd_setup(fd, 115200, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(fd, 115200, USE_FLOW_CTRL); } =20 void @@ -611,7 +599,7 @@ bt_set_baudrate(bt_cfd, spd); =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(phys_fd, spd, USE_FLOW_CTRL); tcflush(phys_fd, TCIOFLUSH); } } @@ -623,7 +611,7 @@ void usb_init_phys(int fd) { - fd_setup(fd, 115200, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(fd, 115200, USE_FLOW_CTRL); } =20 void @@ -654,7 +642,7 @@ void generic_init_phys(int fd) { - fd_setup(fd, 115200, USE_FLOW_CTRL, DONT_USE_BCSP); + fd_setup(fd, 115200, USE_FLOW_CTRL); } =20 void --- bt_vendor.h 2001/08/29 09:43:49 1.6 +++ bt_vendor.h 2001/08/29 10:02:05 1.7 @@ -51,15 +51,14 @@ #define MANUFACTURER_SPEC 0x3f =20 #define HW_NOT_PROBED -1 -#define HW_CSR_H4 0 -#define HW_CSR_BCSP 1 -#define HW_DIGIANSWER 2 -#define HW_ERICSSON 3 -#define HW_INFINEON 4 -#define HW_USB 5 -#define HW_GENERIC 6 -#define HW_NO_INIT 7 -#define HW_UNKNOWN 8 +#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 * Vendor specific functions=20 --- btd.c 2001/08/29 08:39:09 1.23 +++ btd.c 2001/08/29 10:02:05 1.24 @@ -285,7 +285,7 @@ =20 /* Sets initial HW baudrate */ if (init_hw_speed !=3D 0) - fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL, hw_vendor() =3D=3D HW_= CSR_BCSP); + fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL); else init_phys(phys_fd); =20=20 --- btinit.c 2001/08/29 08:39:09 1.12 +++ btinit.c 2001/08/29 10:02:05 1.13 @@ -206,7 +206,7 @@ /* Sets initial HW baudrate */ =20 if (init_hw_speed !=3D 0) - fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL, hw_vendor() =3D=3D HW_= CSR_BCSP); + fd_setup(phys_fd, init_hw_speed, USE_FLOW_CTRL); else init_phys(phys_fd); =20 --- modememul.c 2001/06/08 09:55:47 1.9 +++ modememul.c 2001/08/29 10:02:05 1.10 @@ -128,7 +128,7 @@ } =20 /* not necessary for BT devices... */ - fd_setup(btfd, speed, USE_NO_FLOW, DONT_USE_BCSP); + fd_setup(btfd, speed, USE_NO_FLOW); done =3D modem_emulator(btfd); close(btfd); D(syslog(LOG_INFO, "Closing %s", argv[1])); |
From: Peter K. <pk...@us...> - 2001-08-29 09:43:49
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Broke out the functionality to change between BCSP and H4 from csr_change_if() to csr_bcsp_to_h4() and csr_h4_to_bcsp(). The diff of the modified file(s): --- bt_vendor.c 2001/08/29 09:36:45 1.24 +++ bt_vendor.c 2001/08/29 09:43:49 1.25 @@ -257,7 +257,6 @@ fd_setup(fd, 115200, USE_FLOW_CTRL, USE_BCSP); } =20 - /* * Read/Write any PS key in CSR module=20 * ps_vals holds return values / set params depending on=20 @@ -324,12 +323,23 @@ =20 void csr_change_if(int bt_cfd, int phys_fd) { + /* This may seem reversed, but hw_vendor() returns what we want, + not what we have, in this situation... */ + if (hw_vendor() =3D=3D HW_CSR_H4) + { + csr_bcsp_to_h4(bt_cfd, phys_fd); + } + else + { + csr_h4_to_bcsp(bt_cfd, phys_fd); + } +} =20 +void csr_bcsp_to_h4(int bt_cfd, int phys_fd) +{ unsigned short ps_parbuf[10]; =20 - if (hw_vendor() =3D=3D HW_CSR_H4) - { - syslog(LOG_INFO, "Changing CSR host IF: H4 -> BCSP"); + syslog(LOG_INFO, "Changing CSR host IF: BCSP -> H4"); =20=20=20=20=20 /* Temporarily set stack to use BCSP framing */ bt_bcsp_mode(bt_cfd, 1); @@ -387,9 +397,12 @@ /* Set back stack to use H4 framing */ bt_bcsp_mode(bt_cfd, 0); } - else + +void csr_h4_to_bcsp(int bt_cfd, int phys_fd) { - syslog(LOG_INFO, "Changing CSR host IF: BCSP -> H4"); + unsigned short ps_parbuf[10]; + + syslog(LOG_INFO, "Changing CSR host IF: H4 -> BCSP"); =20 /* Set stack to use H4 temporarily */=20=20=20=20=20=20=20=20 bt_bcsp_mode(bt_cfd, 0); @@ -436,8 +449,8 @@ { syslog(LOG_ERR, __FUNCTION__ ": Unknown PS key parameter: %d", ps_pa= rbuf[1]); } - } } + =20 /* fixme -- remove hardcoded values */ void --- bt_vendor.h 2001/08/29 08:39:09 1.5 +++ bt_vendor.h 2001/08/29 09:43:49 1.6 @@ -72,5 +72,7 @@ int hw_vendor(void); =20 void csr_change_if(int bt_cfd, int phys_fd); +void csr_bcsp_to_h4(int bt_cfd, int phys_fd); +void csr_h4_to_bcsp(int bt_cfd, int phys_fd); =20 #endif /* __BT_VENDOR_H__*/ |
From: Peter K. <pk...@us...> - 2001-08-29 09:36:46
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.30 1.31=20=20=20=20=20=20=20=20=20=20=20=20 bt_if.h 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.c 1.23 1.24=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Moved csr_bcspmode() to bt_if.c and renamed it to bt_bcsp_mode(). The diff of the modified file(s): --- bt_if.c 2001/08/29 08:39:09 1.30 +++ bt_if.c 2001/08/29 09:36:45 1.31 @@ -168,6 +168,29 @@ return buffer; #else return bt_hw_firmware(); +#endif +} + +int +bt_bcsp_mode(int bt_cfd, int enable) +{ +#ifndef BT_USERSTACK + int fd =3D (bt_cfd < 0 ? bt_openctrl() : bt_cfd); + + if (fd < 0 || ioctl(fd, BTSETBCSPMODE, &enable) < 0) + { + perror(__FUNCTION__); + exit(1); + } + + if (bt_cfd < 0) + { + close(fd); + } + + return enable; +#else + return 0; #endif } =20 --- bt_if.h 2001/08/29 08:39:09 1.20 +++ bt_if.h 2001/08/29 09:36:45 1.21 @@ -248,7 +248,7 @@ #define BTTESTCOMMAND _IOW(BT_IOC_MAGIC, 0xf2, unsigned char[261]) =20 #define BTSETMSSWITCH _IOW(BT_IOC_MAGIC, 0xf3, unsigned char) -#define BTSETBCSPMODE _IOW(BT_IOC_MAGIC, 0xf4, unsigned char) +#define BTSETBCSPMODE _IOWR(BT_IOC_MAGIC, 0xf4, int) =20 #define CSR_PSKEY_MSGHDR_SIZE 3 #define CSR_PSKEY_MAXPARAMS 10 @@ -299,6 +299,7 @@ char* bt_hw_vendor(void); #endif char* bt_firmware_info(void); +int bt_bcsp_mode(int bt_cfd, int enable); void reset_hw(void); int bt_openctrl(void); void set_bt_line_disc(int phys_fd, int bt_disc, char* physdev); --- bt_vendor.c 2001/08/29 08:51:47 1.23 +++ bt_vendor.c 2001/08/29 09:36:45 1.24 @@ -257,17 +257,7 @@ fd_setup(fd, 115200, USE_FLOW_CTRL, USE_BCSP); } =20 -void -csr_bcspmode(int bt_cfd, int enable) -{ - if (ioctl(bt_cfd, BTSETBCSPMODE, &enable) < 0) - { - perror(__FUNCTION__); - exit(1); - } -} =20 - /* * Read/Write any PS key in CSR module=20 * ps_vals holds return values / set params depending on=20 @@ -342,7 +332,7 @@ syslog(LOG_INFO, "Changing CSR host IF: H4 -> BCSP"); =20=20=20=20=20 /* Temporarily set stack to use BCSP framing */ - csr_bcspmode(bt_cfd, 1); + bt_bcsp_mode(bt_cfd, 1); =20=20=20=20=20 /* Setup serial port for BCSP (default baudrate) */ fd_setup(phys_fd, 115200, USE_FLOW_CTRL, USE_BCSP); @@ -395,14 +385,14 @@ }=20=20=20 =20=20=20=20=20 /* Set back stack to use H4 framing */ - csr_bcspmode(bt_cfd, 0); + bt_bcsp_mode(bt_cfd, 0); } else { syslog(LOG_INFO, "Changing CSR host IF: BCSP -> H4"); =20 /* Set stack to use H4 temporarily */=20=20=20=20=20=20=20=20 - csr_bcspmode(bt_cfd, 0); + bt_bcsp_mode(bt_cfd, 0); =20=20=20=20=20 /* Setup serial port for H4 (default baudrate) */ fd_setup(phys_fd, 115200, USE_FLOW_CTRL, DONT_USE_BCSP); @@ -440,7 +430,7 @@ /* Should not be needed if hw_vendor is changed in kernel ....*/ =20=20=20=20=20=20=20 /* Set back stack to use BCSP framing */ - csr_bcspmode(bt_cfd, 1); + bt_bcsp_mode(bt_cfd, 1); }=20 else { |
From: Peter K. <pk...@us...> - 2001-08-29 09:35:08
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.190 1.191=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: The BTSETBCSPMODE ioctl can now return the old mode. The diff of the modified file(s): --- bluetooth.c 2001/08/02 15:13:20 1.190 +++ bluetooth.c 2001/08/29 09:35:07 1.191 @@ -718,7 +718,6 @@ kfree(inq_res);=09=09 hci_inq_exit0: return ret; - break; } =20=09 case HCILINKKEYREPLY: @@ -1081,15 +1080,12 @@ =20 case BTSETBCSPMODE : { - u8 enable; - GET_USER(tmp, (s32*)arg); - - enable =3D (u8)(tmp & 0xff); =20=09=09 - BT_DRIVER("BTSETBCSPMODE : %d\n", enable); + BT_DRIVER("BTSETBCSPMODE: %d\n", tmp); =20=09=09 - bt_use_bcsp(enable); + tmp =3D bt_use_bcsp(tmp); + put_user(tmp, (s32*)arg); =20=09=09 return 0; } |
From: Peter K. <pk...@us...> - 2001-08-29 09:34:45
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btcommon.h 1.81 1.82=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: The BTSETBCSPMODE ioctl can now return the old mode. The diff of the modified file(s): --- btcommon.h 2001/08/17 09:19:00 1.81 +++ btcommon.h 2001/08/29 09:34:44 1.82 @@ -184,6 +184,12 @@ /* | len 1 byte | 4 bytes hci header | data (max 256) | */ #define HCISENDRAWDATA _IOW(BT_IOC_MAGIC, 0x72, u8[261]) =20 +/* | BD(6) | len(2) | data |*/ +#define BTPING _IOW(BT_IOC_MAGIC, 0x73, ping_struct) + +/* | BD(6) | type (2) |*/ +#define BTGETINFO _IOW(BT_IOC_MAGIC, 0x74, u8[8]) + /* other ioctls used for testing */ #define BTSENDTESTDATA _IOW(BT_IOC_MAGIC, 0xf0, s32[2]) #define HCITESTCONNECTREQ _IOW(BT_IOC_MAGIC, 0xf1, u8[6]) @@ -193,7 +199,7 @@ =20 #define BTSETMSSWITCH _IOW(BT_IOC_MAGIC, 0xf3, u8) =20 -#define BTSETBCSPMODE _IOW(BT_IOC_MAGIC, 0xf4, u8) +#define BTSETBCSPMODE _IOWR(BT_IOC_MAGIC, 0xf4, s32) =20 =20 #define CSR_PSKEY_MSGHDR_SIZE 3 @@ -202,13 +208,8 @@ #define BT_CSR_PSKEY _IOWR(BT_IOC_MAGIC, 0xf5, u16[CSR_PSKEY_MSGHDR_SIZE = + CSR_PSKEY_MAXPARAMS]) =20 #define BTINITBCSP _IO(BT_IOC_MAGIC, 0xf6) -#define BTSETMAXCONNECTIONS _IOW(BT_IOC_MAGIC, 0xf7, u8) - -/* | BD(6) | len(2) | data |*/ -#define BTPING _IOW(BT_IOC_MAGIC, 0x73, ping_struct) =20 -/* | BD(6) | type (2) |*/ -#define BTGETINFO _IOW(BT_IOC_MAGIC, 0x74, u8[8]) +#define BTSETMAXCONNECTIONS _IOW(BT_IOC_MAGIC, 0xf7, u8) =20 /* NOTE ! * N_BT should be defined in /include/asm/termios.h=20 |
From: Peter K. <pk...@us...> - 2001-08-29 08:51:47
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_vendor.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Only set the speed in the *_init_hw() functions if it is greater than 0. The diff of the modified file(s): --- bt_vendor.c 2001/08/29 08:39:09 1.22 +++ bt_vendor.c 2001/08/29 08:51:47 1.23 @@ -480,6 +480,8 @@ sscanf(buf, " Firmware version: %d", &firmware); } =20 + if (spd > 0) + { /* Only try to set the speed if the CSR firmware is new enough (temporarily setting the speed does not work correctly in 9.x) */ if (firmware >=3D 90) @@ -503,6 +505,7 @@ syslog(LOG_INFO, "Did not set baudrate in CSR module as its firmware i= s too old (%d)", firmware); } } +} =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*/ /* Digianswer specific commands */ @@ -523,6 +526,10 @@ =20 D(syslog(LOG_INFO, "Setting baudrate in Digianswer PC card")); =20 + bt_set_event_filter(bt_cfd, filter); + + if (spd > 0) + { bt_set_baudrate(bt_cfd, spd); =20=20=20 if (spd > 115200) @@ -530,12 +537,11 @@ printf("WARNING : Does this HW really support speeds > 115200 ?\n"); } =20=20=20 - bt_set_event_filter(bt_cfd, filter); - /* Now set phys device speed to whatever HW was set to use */ fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP);=20=20 tcflush(phys_fd, TCIOFLUSH); } +} =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 */ @@ -564,6 +570,8 @@ =20 sleep(1); // wait for HW... =20 + if (spd > 0) + { D(syslog(LOG_INFO, "Setting baudrate in Ericsson module")); bt_set_baudrate(bt_cfd, spd); usleep(10000); @@ -572,6 +580,7 @@ fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP); tcflush(phys_fd, TCIOFLUSH); } +} =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 */ @@ -592,12 +601,16 @@ bt_write_scan_enable(bt_cfd, wrscan); =20 sleep(1); // wait for HW...=20 + + if (spd > 0) + { D(syslog(LOG_INFO, "Setting baudrate in Infineon module")); bt_set_baudrate(bt_cfd, spd); =20=20=20 /* Now set phys device speed to whatever HW was set to use */ fd_setup(phys_fd, spd, USE_FLOW_CTRL, DONT_USE_BCSP); tcflush(phys_fd, TCIOFLUSH); + } } =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-08-29 08:39:10
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.29 1.30=20=20=20=20=20=20=20=20=20=20=20=20 bt_if.h 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.h 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20 btinit.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Removed the speed argument from init_stack() as it was not used. The diff of the modified file(s): --- bt_if.c 2001/08/22 17:49:56 1.29 +++ bt_if.c 2001/08/29 08:39:09 1.30 @@ -70,21 +70,19 @@ /* 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 spd) +int init_stack(int bt_cfd) { int ret; syslog(LOG_INFO, "Init stack"); - -#ifdef BT_USERSTACK - init_userstack(); -#else /* Kernel mode stack */ =20=20=20 +#ifndef BT_USERSTACK if((ret =3D ioctl(bt_cfd, BTINITSTACK)) < 0) { shutdown_stack(bt_cfd); return ret; } -=20=20 +#else + init_userstack(); #endif =20 /* fixme<3> -- read these parameters from config file ? */ --- bt_if.h 2001/08/22 17:49:12 1.19 +++ bt_if.h 2001/08/29 08:39:09 1.20 @@ -292,7 +292,7 @@ * Init/shutdown and control of stack=20 */ =20 -int init_stack(int bt_cfd, int spd); +int init_stack(int bt_cfd); int bt_isinitiated(int bt_cfd); void shutdown_stack(int bt_cfd); #ifndef BT_USERSTACK --- bt_vendor.c 2001/06/19 11:20:59 1.21 +++ bt_vendor.c 2001/08/29 08:39:09 1.22 @@ -163,7 +163,7 @@ */ =20 void -init_failed(int bt_cfd, int phys_fd, int spd) +init_failed(int bt_cfd, int phys_fd) { =20 static int did_restart =3D 0; /* only try once */=20=20 @@ -182,7 +182,7 @@ case HW_CSR_BCSP: =20=20=20=20=20 /* Try changing interface BCSP<->H4 */ - csr_change_if(bt_cfd, phys_fd, spd);=20=20=20=20 + csr_change_if(bt_cfd, phys_fd);=20=20=20=20 did_restart =3D 1; =20 /* Restart btd */ @@ -332,7 +332,7 @@ * Switches host interface in CSR HW (H4<->BCSP)=20 */ =20 -void csr_change_if(int bt_cfd, int phys_fd, int spd) +void csr_change_if(int bt_cfd, int phys_fd) { =20 unsigned short ps_parbuf[10]; @@ -412,12 +412,12 @@ sleep(1); =20 /* Initialize stack */ - init_stack(bt_cfd, spd); + init_stack(bt_cfd); =20 if (csr_disable_deep_sleep(bt_cfd)) { reset_hw(); - init_stack(bt_cfd, spd); /* reinitialize */ + init_stack(bt_cfd); /* reinitialize */ } =20 /* Read params for ps key PSKEY_HOSTIO_UART_PS_BLOCK */ --- bt_vendor.h 2001/06/13 12:19:15 1.4 +++ bt_vendor.h 2001/08/29 08:39:09 1.5 @@ -67,9 +67,10 @@ =20 void init_hw(int bt_cfd, int phys_fd, int spd); void init_phys(int fd); -void init_failed(int bt_cfd, int phys_fd, int spd); +void init_failed(int bt_cfd, int phys_fd); =20 int hw_vendor(void); -void csr_change_if(int bt_cfd, int phys_fd, int spd); + +void csr_change_if(int bt_cfd, int phys_fd); =20 #endif /* __BT_VENDOR_H__*/ --- btd.c 2001/06/15 12:36:25 1.22 +++ btd.c 2001/08/29 08:39:09 1.23 @@ -300,8 +300,8 @@ if (do_reset) reset_hw(); =20 - if (init_stack(bt_cfd, atoi(speedstr)) < 0) - init_failed(bt_cfd, phys_fd, atoi(speedstr)); + if (init_stack(bt_cfd) < 0) + init_failed(bt_cfd, phys_fd); =20 if (do_hwinit) init_hw(bt_cfd, phys_fd, atoi(speedstr)); --- btinit.c 2001/06/13 12:17:34 1.11 +++ btinit.c 2001/08/29 08:39:09 1.12 @@ -221,8 +221,8 @@ if (do_reset) reset_hw(); =20=20=20 - if (init_stack(bt_cfd, atoi(speedstr)) < 0) - init_failed(bt_cfd, phys_fd, atoi(speedstr)); + if (init_stack(bt_cfd) < 0) + init_failed(bt_cfd, phys_fd); =20=20=20 if (do_hwinit) init_hw(bt_cfd, phys_fd, atoi(speedstr)); |
From: Peter K. <pk...@us...> - 2001-08-29 08:34:44
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Rewrote print_data() to handle a NULL message. The diff of the modified file(s): --- bt_misc.c 2001/08/17 16:23:21 1.12 +++ bt_misc.c 2001/08/29 08:34:43 1.13 @@ -384,16 +384,22 @@ void=20 print_data(const char *message, const unsigned char *buf, int len) {=20 - int t; + int t =3D 0; =20 - printf("\n%s (%d)", message, len); - for (t =3D 0; t < len; t++)=20 + if (message) + { + printf("\n%s (%d):\n", message, len); + } + while (t < len) { + printf("0x%02x ", (uint)buf[t++]); if(!(t % 16)) printf("\n "); - printf("0x%02x ", (uint)buf[t]); } + if (t && (t % 16)) + { printf("\n"); + } } #endif =20 |
From: Mattias A. <mat...@us...> - 2001-08-27 15:42:38
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- test.h 1.9 1.10=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added define The diff of the modified file(s): --- test.h 2001/07/31 18:27:41 1.9 +++ test.h 2001/08/27 15:42:37 1.10 @@ -56,6 +56,8 @@ extern l2cap_con *testcon2; extern l2cap_con *testcon3; =20 +#define UPTEST_DATA_LEN 16384 + /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 /****************** EXPORTED FUNCTION DECLARATION SECTION ****************= ***/ |
From: Mattias A. <mat...@us...> - 2001-08-27 15:42:00
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- unplug_test.h 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added do_sdp_test (unplug test) The diff of the modified file(s): --- unplug_test.h 2001/07/30 11:09:37 1.1 +++ unplug_test.h 2001/08/27 15:42:00 1.2 @@ -45,5 +45,6 @@ =20 void unplug_test_init(void); void process_test_cmd(s32 test_case); +void do_sdp_test(int n); =20 #endif |
From: Mattias A. <mat...@us...> - 2001-08-27 15:26:41
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btdebug.h 1.39 1.40=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added credit based flow debug flag The diff of the modified file(s): --- btdebug.h 2001/04/17 11:53:29 1.39 +++ btdebug.h 2001/08/27 15:26:41 1.40 @@ -136,6 +136,8 @@ /* Will enable/disable debug for the internal signaling between the RFCOMM layers on two differnet BT-units */ =20 +#define DEBUG_RFCOMM_CREDIT_BASED_FLOW + #define PRINT_DATA_ENABLE 0 /* Enables /disables the printing of the send and received data */ =20 |
From: Mattias A. <mat...@us...> - 2001-08-27 15:22:05
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- unplug_test.c 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added real unplug SDP test cases The diff of the modified file(s): --- unplug_test.c 2001/08/02 16:04:47 1.4 +++ unplug_test.c 2001/08/27 15:22:04 1.5 @@ -80,6 +80,76 @@ extern s32 disable_testpsm; s32 test_role; =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=3D=3D=3D=3D=3D=3D=3D=3D=3D */= =20 +/* Unplug Test Cases 1-13 */ + +/* [Test-01] Service search request for UUID 0x1103 (DialUp Profile) */ +unsigned char q1_1[] =3D {0x02, 0x77, 0x77, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x11, 0x03, 0x00, 0xff, 0x00}; + +/* Service attribute request for Rec Hdl 00010000 + * Attr : ProtDescrList=20 + */ +unsigned char q1_2[] =3D {0x04, 0x77, 0x77, 0x00, 0x0c, + 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x03, + 0x09, 0x00, 0x04, 0x00}; + +/* [Test-02] Service browsing.=20 + * Service Search Attribute Req for UUID 1002 (Public=20 + * Browse Group) Attr : ServiceName=20 + */ +unsigned char q2[] =3D {0x06, 0x77, 0x77, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x10, 0x02, 0x00, 0xff, 0x35, + 0x03, 0x09, 0x01, 0x00, 0x00}; + +/* [Test-3]=20 + * Continued query with limiting MaximumAttrByteCount + */ +unsigned char q3_1[] =3D {0x06, 0x77, 0x77, 0x00, 0x0f, + 0x35, 0x03, 0x19, 0x11, 0x05, 0x00, 0x45, 0x35, + 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00}; + +/* The continued request */ +unsigned char q3_2[] =3D {0x06, 0x88, 0x88, 0x00, 0x13, + 0x35, 0x03, 0x19, 0x11, 0x05, 0x00, 0x45, 0x35, + 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00}; + +/* [Test-04]=20 + * Search for non-existing service=20 + */ +unsigned char q4[] =3D {0x02, 0x88, 0x88, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x12, 0x35, 0x00, 0xff, 0x00}; + +unsigned char q5[] =3D {0x04, 0x88, 0x88, 0x00, 0x0c, + 0x12, 0x34, 0x56, 0x78, 0x00, 0xff, 0x35, 0x03, + 0x09, 0x00, 0x06, 0x00}; + +unsigned char q6[] =3D {0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x19, 0x11, 0x11, 0x00, 0xff, 0x35, 0x03, + 0x09, 0xab, 0xcd, 0x00}; + +unsigned char q7[] =3D {0x04, 0x88, 0x88, 0x00, 0x50, + 0x00, 0x01, 0x00, 0x02, 0x00, 0xff, 0x35, 0x03, 0x09, + 0x00, 0x09, 0x00}; + +unsigned char q8[] =3D {0x06, 0x88, 0x88, 0x00, 0x0d, + 0x35, 0x03, 0x09, 0x11, 0x11, 0x00, 0xff, 0x35, 0x03, + 0x09, 0x00, 0x09, 0x00}; + +unsigned char q9[] =3D {0x06, 0x88, 0x88, 0x00, 0x13, + 0x35, 0x09, 0x19, 0x11, 0x05, 0x19, 0x00, 0x03, 0x19, + 0x01, 0x00, 0x00, 0xff, 0x35, 0x03, 0x09, 0x00, 0x04, + 0x00}; + +unsigned char q10[] =3D {0x02, 0x88, 0x88, 0x00, 0x08, + 0x35, 0x03, 0x19, 0x00, 0x03, 0x00, 0x02, 0x00}; + +unsigned char q11[] =3D {0x04, 0x88, 0x88, 0x00, 0x12, + 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x35, 0x09, 0x09, + 0x00, 0x06, 0x09, 0x00, 0x11, 0x09, 0x01, 0x00, 0x00}; + +/* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =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 + unsigned char sdp_data_52111[] =3D { 0x02, 0x77, 0x77, 0x00, 0x08, 0x35, 0x03, 0x19, 0x00, 0x01, 0x00, 0xff, 0x00 }; @@ -241,8 +311,7 @@ 0x35, 0x05, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x00 }; =20 -#define UPDATA_MAXLEN 16384 -static u8 tmpdata[UPDATA_MAXLEN]; +extern u8 testdata[]; static u8 test_is_initialized =3D 0; =20 static void @@ -253,8 +322,8 @@ printk("Initializing Unplug Test\n"); =20 /* group data into 0xff chunks */ - for (i =3D 0; i < UPDATA_MAXLEN; i++) { - *(tmpdata+i) =3D (u8) i%0x100; + for (i =3D 0; i < UPTEST_DATA_LEN; i++) { + *(testdata+i) =3D (u8) i%0x100; } test_is_initialized =3D 1; } @@ -304,42 +373,42 @@ { /* client sends 10 bytes */ printk("test_2_2_1, client sends 10 bytes\n");=20 - test_send_data(testcon, tmpdata, 10); + test_send_data(testcon, testdata, 10); } =20 static void test_2_2_2(void) { /* client sends 350 bytes */ printk("test_2_2_2, client sends 350 bytes\n");=20 - test_send_data(testcon, tmpdata, 350); + test_send_data(testcon, testdata, 350); } =20 static void test_2_2_3(void) { /* client sends 672 bytes */ printk("test_2_2_3, client sends 672 bytes\n");=20 - test_send_data(testcon, tmpdata, 672); + test_send_data(testcon, testdata, 672); } =20 static void test_2_2_4(void) { /* server sends 10 bytes */ printk("test_2_2_4, server sends 10 bytes\n");=20 - test_send_data(testcon, tmpdata, 10); + test_send_data(testcon, testdata, 10); } =20 static void test_2_2_5(void) { /* server sends 350 bytes */ printk("test_2_2_5, server sends 350 bytes\n");=20 - test_send_data(testcon, tmpdata, 350); + test_send_data(testcon, testdata, 350); } =20 static void test_2_2_6(void) { /* server sends 672 bytes */ printk("test_2_2_6, server sends 672 bytes\n");=20 - test_send_data(testcon, tmpdata, 672); + test_send_data(testcon, testdata, 672); } =20 /* @@ -398,14 +467,14 @@ { /* Client sends 8192 bytes of data */ printk("Sends 8192 bytes\n"); - test_send_data(testcon, tmpdata, 8192); + test_send_data(testcon, testdata, 8192); } =20 static void test_2_5_6(void) { printk("Sending 4096 bytes\n"); /* Server sends 4096 bytes of data */ - test_send_data(testcon, tmpdata, 4096); + test_send_data(testcon, testdata, 4096); } =20 /* @@ -438,25 +507,25 @@ static void test_2_8_1(void) { printk("Client sends 350 bytes on testcon 1\n"); - test_send_data(testcon, tmpdata, 350); + test_send_data(testcon, testdata, 350); } =20 static void test_2_8_2(void) { printk("Server sends 350 bytes on testcon 1\n"); - test_send_data(testcon, tmpdata, 350); + test_send_data(testcon, testdata, 350); } =20 static void test_2_8_3(void) { printk("Client sends 350 bytes on testcon 2\n"); - test_send_data(testcon2, tmpdata, 350); + test_send_data(testcon2, testdata, 350); } =20 static void test_2_8_4(void) { printk("Server sends 350 bytes on testcon 2\n"); - test_send_data(testcon2, tmpdata, 350); + test_send_data(testcon2, testdata, 350); } =20 static void test_2_9_1(void) @@ -516,20 +585,50 @@ static void test_2_13_5(void) { printk("test_2_13_5, client sending 672 bytes\n");=20 - test_send_data(testcon, tmpdata, 672);=09 + test_send_data(testcon, testdata, 672);=09 } =20 static void test_2_13_6(void) { printk("test_2_13_6, server sending 672 bytes\n");=20 - test_send_data(testcon, tmpdata, 672);=09 + test_send_data(testcon, testdata, 672);=09 } =20 - /* * SDP Stuff */ =20 +void do_sdp_test(int n) +{ + unsigned char *q; + int q_len; + printk(__FUNCTION__" -- %d\n", n); + switch(n) { +=09=09 + case 101: q =3D q1_1; break; + case 102: q =3D q1_2; break; + case 2: q =3D q2; break; + case 301: q =3D q3_1; break; + case 302: q =3D q3_2; break; + case 4: q =3D q4; break; + case 5: q =3D q5; break; + case 6: q =3D q6; break; + case 7: q =3D q7; break; + case 8: q =3D q8; break; + case 9: q =3D q9; break; + case 10: q =3D q10; break; + case 11: q =3D q11; break; + default: printk("Unknown SDP test.\n");return; + } + + q_len =3D q[4] + 5; /* assumes less than 255 bytes long pdu:s */ +=09 + /* Now send the request */=20=20 + sdp_send_data(&sdp_con_list[0], q, q_len); +} + + + static void sdp_test_52111(void) { sdp_send_data(&sdp_con_list[0], sdp_data_52111, sdp_data_52111[4] + 5); @@ -1039,7 +1138,7 @@ /* Here we should send data after we received a flow stop command */ printk("test_4_3\n"); =20=09 - if (rfcomm_send_data(CREATE_RFCOMM_ID(0,4),tmpdata, 1024) =3D=3D 0) { + if (rfcomm_send_data(CREATE_RFCOMM_ID(0,4),testdata, 1024) =3D=3D 0) { printk("Success!\n"); } } @@ -1367,10 +1466,6 @@ printk("test_gateway_call, sending %s\n", atd); rfcomm_send_data(CREATE_RFCOMM_ID(0,2), atd, strlen(atd)); } - -/*=20 - * main switch case called from btd in process_cmd=20 - */ =20 void process_test_cmd(s32 test_case) { |
From: Mattias A. <mat...@us...> - 2001-08-27 15:20:42
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- test.c 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * use simple_strtoul instead of my_atoi (kernel mode) * renamed l2cap con object variables * added tx_data command which can send data to any local CID The diff of the modified file(s): --- test.c 2001/08/17 09:20:46 1.25 +++ test.c 2001/08/27 15:20:41 1.26 @@ -133,6 +133,12 @@ s32 use_multiple_conf_params =3D 0; s32 disable_testpsm =3D 0; =20 +u8 testdata[UPTEST_DATA_LEN]; + +#ifdef __KERNEL__ +#define strtoul simple_strtoul +#endif + void test_init(void) { protocol_layer this_layer; @@ -205,18 +211,18 @@ } =20 =20 -void test_connect_ind(l2cap_con *l2cap)=20 +void test_connect_ind(l2cap_con *con)=20 { #ifdef __KERNEL__ static struct timer_list test_timer; #endif =20 - D_STATE("test_connect_ind : remote cid : %d\n", l2cap->remote_cid); - PRINTPSM(l2cap); + D_STATE("test_connect_ind : remote cid : %d\n", con->remote_cid); + PRINTPSM(con); =20 if (emulate_pending) { printk("Sending connect rsp pending and waiting 5 secs\n"); - if (l2ca_connect_rsp(l2cap, RES_PENDING, STAT_AUTHENTPEND)) { + if (l2ca_connect_rsp(con, RES_PENDING, STAT_AUTHENTPEND)) { D_ERR("test_connect_ind: l2ca_connect_rsp failed\n");=20 return; } @@ -225,17 +231,19 @@ #ifdef __KERNEL__ init_timer(&test_timer); test_timer.function =3D test_timeout; - test_timer.data =3D (unsigned long)l2cap; + test_timer.data =3D (unsigned long)con; test_timer.expires =3D jiffies + 5*HZ; add_timer(&test_timer); -#endif return; +#else + sleep(5); +#endif } =20=09 if (disable_testpsm =3D=3D 1) { /* send back psm not supp */ - if (l2ca_connect_rsp(l2cap, RES_PSMNEG, 0)) { + if (l2ca_connect_rsp(con, RES_PSMNEG, 0)) { D_ERR("test_connect_ind: l2ca_connect_rsp failed\n");=20 return; } @@ -245,48 +253,47 @@ } =20 printk("now sending back result success !\n"); - if (l2ca_connect_rsp(l2cap, RES_SUCCESS, STAT_NOINFO)) { + if (l2ca_connect_rsp(con, RES_SUCCESS, STAT_NOINFO)) { D_ERR("test_connect_ind: l2ca_connect_rsp failed\n");=20 return; } =20 /* (temp fix for test interface) store connection */ =20 - if (l2cap->psm =3D=3D L2CAP_TEST_LAYER) - testcon =3D l2cap; - else if (l2cap->psm =3D=3D L2CAP_TEST2_LAYER) - testcon2 =3D l2cap; - else if (l2cap->psm =3D=3D L2CAP_TEST3_LAYER) - testcon3 =3D l2cap; + if (con->psm =3D=3D L2CAP_TEST_LAYER) + testcon =3D con; + else if (con->psm =3D=3D L2CAP_TEST2_LAYER) + testcon2 =3D con; + else if (con->psm =3D=3D L2CAP_TEST3_LAYER) + testcon3 =3D con; } =20 /* only client receives connect pnd */ -void test_connect_pnd(l2cap_con *l2cap, s32 status) +void test_connect_pnd(l2cap_con *con, s32 status) { D_STATE("test_connect_pnd : reason %d\n", status);=09 - PRINTPSM(l2cap); + PRINTPSM(con); =20 - if (l2cap->psm =3D=3D L2CAP_TEST_LAYER) - testcon =3D l2cap; - else if (l2cap->psm =3D=3D L2CAP_TEST2_LAYER) - testcon2 =3D l2cap; - else if (l2cap->psm =3D=3D L2CAP_TEST3_LAYER) - testcon3 =3D l2cap; + if (con->psm =3D=3D L2CAP_TEST_LAYER) + testcon =3D con; + else if (con->psm =3D=3D L2CAP_TEST2_LAYER) + testcon2 =3D con; + else if (con->psm =3D=3D L2CAP_TEST3_LAYER) + testcon3 =3D con; } =20 /* only client receives connect cfm */ -void test_connect_cfm(l2cap_con *l2cap, s32 status) +void test_connect_cfm(l2cap_con *con, s32 status) { D_STATE("test_connect_cfm\n"); - PRINTPSM(l2cap); + PRINTPSM(con); =20 if(status) { D_STATE("Connect failed: Status %d\n", status); return; } =20=09 - - if (!l2ca_local_conf_done(l2cap)) { + if (!l2ca_local_conf_done(con)) { if (dont_send_config_req) { printk("Don't send back config_req...\n"); printk("Now waiting for initator to shutdown link...\n"); @@ -296,20 +303,20 @@ =20 /* still haven't sent config request yet */ if (use_multiple_conf_params) { - if (l2ca_config_req(l2cap, 1280, NULL, 0x1234, 0)) { + if (l2ca_config_req(con, 1280, NULL, 0x1234, 0)) { D_ERR("test_config_cfm : Configuration request failed\n"); } } else { - if (l2ca_config_req(l2cap, 0, NULL, 0, 0)) { + if (l2ca_config_req(con, 0, NULL, 0, 0)) { D_ERR("test_config_cfm : Configuration request failed\n"); } } =20=09=09 /* store connection */ - if (l2cap->psm =3D=3D L2CAP_TEST_LAYER) - testcon =3D l2cap; - else if (l2cap->psm =3D=3D L2CAP_TEST2_LAYER) - testcon2 =3D l2cap; - else if (l2cap->psm =3D=3D L2CAP_TEST3_LAYER) - testcon3 =3D l2cap; + if (con->psm =3D=3D L2CAP_TEST_LAYER) + testcon =3D con; + else if (con->psm =3D=3D L2CAP_TEST2_LAYER) + testcon2 =3D con; + else if (con->psm =3D=3D L2CAP_TEST3_LAYER) + testcon3 =3D con; } else=20=09=20=20=20=20=20=20=20 D_RCV("test_config_cfm : already have sent config request\n"); } @@ -317,28 +324,28 @@ =20 /* someone wants to configure l2cap... */ void=20 -test_config_ind(l2cap_con* l2cap) +test_config_ind(l2cap_con* con) {=20 D_STATE("test_config_ind : remote cid : %d remote_mtu : %d\n",=20 - l2cap->remote_cid, l2cap->remote_mtu); + con->remote_cid, con->remote_mtu); =20=09 /* check if we have sent a pos response yet */ - if (!l2ca_remote_conf_done(l2cap)) { + if (!l2ca_remote_conf_done(con)) { /* still haven't sent a pos configure response*/ =20 - if (l2ca_config_rsp(l2cap, 0, NULL, CONF_SUCCESS)) { + if (l2ca_config_rsp(con, 0, NULL, CONF_SUCCESS)) { D_ERR("test_config_ind : Configuration response failed\n"); }=20=20=20=20 } else=20 printk("test_config_ind : already have sent back a pos response\n"); =20 /* check if we received a pos response on a previous config req */=20 - if (!l2ca_local_conf_done(l2cap)) { + if (!l2ca_local_conf_done(con)) { =20 /* still haven't sent config request yet */ =20 D_RCV("Setting local mtu to %d on con (%d:%d)\n",=20 - l2cap->local_mtu, l2cap->local_cid, l2cap->remote_cid); + con->local_mtu, con->local_cid, con->remote_cid); =20 if (dont_send_config_req) { printk("Don't send back config_req...\n"); @@ -349,11 +356,11 @@ =20=09=09 /* still haven't sent config request yet */ if (use_multiple_conf_params) { - if (l2ca_config_req(l2cap, 1280, NULL, 0x1234, 0)) { + if (l2ca_config_req(con, 1280, NULL, 0x1234, 0)) { D_ERR("test_config_cfm : Configuration request failed\n"); } } else { - if (l2ca_config_req(l2cap, test_inmtu, NULL, 0, 0)) + if (l2ca_config_req(con, test_inmtu, NULL, 0, 0)) D_ERR("test_config_ind : configuration request failed\n"); =20 if (test_inmtu) @@ -367,26 +374,26 @@ D_RCV("already ready with config req\n"); } =20 -void test_config_cfm(l2cap_con *l2cap, s32 status) +void test_config_cfm(l2cap_con *con, s32 status) { - D_STATE("test_config_cfm : remote cid : %d\n", l2cap->remote_cid); + D_STATE("test_config_cfm : remote cid : %d\n", con->remote_cid); =20=09 D_STATE("Now we have an open l2cap channel\n"); =20 /* negotiate upper protocol */ } =20 -void test_disconnect_ind(l2cap_con *l2cap)=20 +void test_disconnect_ind(l2cap_con *con)=20 { D_STATE("test_disconnect_ind : (%d:%d)\n",=20 - l2cap->local_cid, l2cap->remote_cid); + con->local_cid, con->remote_cid); =20 - l2ca_disconnect_rsp(l2cap); + l2ca_disconnect_rsp(con); } =20 -void test_disconnect_cfm(l2cap_con *l2cap) +void test_disconnect_cfm(l2cap_con *con) { - D_STATE("TEST_disconnect_cfm: remote cid : %d\n", l2cap->remote_cid); + D_STATE("TEST_disconnect_cfm: remote cid : %d\n", con->remote_cid); } =20 s32 test_disconnect_req(l2cap_con *con) @@ -398,9 +405,9 @@ return l2ca_disconnect_req(con); } =20 -void test_receive_data(l2cap_con *l2cap, unsigned char* data, u32 len) +void test_receive_data(l2cap_con *con, unsigned char* data, u32 len) { - PRINTPSM(l2cap); + PRINTPSM(con); PRINTPKT("test_receive_data : ", data, len);=20=20 } =20 @@ -428,25 +435,8 @@ return l2cap_send_data(tx_buf, con); } =20 -/* assumes int at end of string */ -int -my_atoi(u8 *str) -{ - int i =3D 0, mult =3D 1; - int len =3D strlen(str); - int res =3D 0; =20=20=20 - for (i =3D len-1; i >=3D 0; i--) { - if ((str[i] <=3D '9') && (str[i] >=3D '0' )) { - res +=3D mult*(str[i]-'0'); - mult *=3D 10; - } - else=20 - return -1; - }=20=20 - - return res; -} +/* FIXME -- add new commands in user application menu !!!! */ =20 void test_process_cmd(unsigned char *cmd, s32 size) @@ -455,8 +445,9 @@ int testcase, tmp[10], i; unsigned char bd[6], char_buf[4]; char_buf[3] =3D 0; + if(strncmp(cmd, "t ", 2) =3D=3D 0) { - testcase =3D my_atoi(cmd+2); + testcase =3D strtoul(cmd+2, NULL, 0); =20 if (testcase > 0) { process_test_cmd(testcase); @@ -466,8 +457,12 @@ } } else if(!strncmp(cmd, "bb_conn ", 8)) { + char *p =3D cmd + 8; +=09=09 for (i =3D 0; i < 6; i++) { - bd[i] =3D (unsigned char *)my_atoi(strncpy(&char_buf[0], cmd + 8 + (i*3= ), 3)); + bd[i] =3D strtoul(p, &p, 0); + printk("bb_conn read [%d] =3D 0x%x\n", i, bd[i]); + p=3Dp+1; } =20=09=09 printk("Connecting BB to bd : %02X:%02X:%02X:%02X:%02X:%02X\n", @@ -478,13 +473,13 @@ lp_connect_req(bd); } else if(!strncmp(cmd, "bb_disc ", 8)) { - int i =3D my_atoi(&cmd[8]); + int i =3D strtoul(cmd+8, NULL, 0); lp_disconnect((unsigned short)i); } else if(!strncmp(cmd, "lcid_disconnect ", 16)) { l2cap_con *con =3D NULL; - int i =3D my_atoi(&cmd[16]); - if(con =3D get_lcon(i)) { + int i =3D strtoul(cmd + 16, NULL, 0); + if((con =3D get_lcon(i))) { l2ca_disconnect_req(con); } else { @@ -493,12 +488,33 @@ } else if(!strncmp(cmd, "test_case_reject ", 17)) { unsigned short fake_psm =3D 0x4561; + char *p =3D cmd + 8; for (i =3D 0; i < 6; i++) { - bd[i] =3D (unsigned char)my_atoi(strncpy(&char_buf[0], cmd + 17 + i*3, = 3)); + bd[i] =3D strtoul(p, &p, 0); + printk("bb_conn read [%d] =3D 0x%x\n", i, bd[i]); + p++; }=20=20 l2ca_connect_req(bd, fake_psm); } - else { + else if(!strncmp(cmd, "tx_data ", 8)) { + int lcid, len; + char *p =3D cmd+8; + l2cap_con *con; + lcid =3D strtoul(p, &p, 0); + len =3D strtoul(p+1, &p, 0); +=09=09 + /* first find connection based on local cid */ + con =3D get_lcon(lcid); + if (!con) { + printk("Found no connection with lcid : %d\n", lcid); + return; + } + + test_send_data(con, testdata, len); + } else if(!strncmp(cmd, "sdptest ", 8)) { + int n =3D strtoul(cmd+8, NULL, 0);=09 + do_sdp_test(n); + } else { printk("Unknown test cmd!\n"); } =20=09 |
From: Mattias A. <mat...@us...> - 2001-08-27 15:09:00
|
The following file was modified in apps/bluetooth/sdp_server: Name Old version New version Comment ---- ----------- ----------- ------- sdp_parser.c 1.20 1.21=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * minor change The diff of the modified file(s): --- sdp_parser.c 2001/06/18 14:45:08 1.20 +++ sdp_parser.c 2001/08/27 15:08:58 1.21 @@ -324,7 +324,7 @@ cur_pos +=3D 2; service_search_uuid[i] =3D CHAR2INT16(data[cur_pos + 1], data[cur_pos + 2]); - D_MISC("Got Service class 0x%08x", service_search_uuid[i]); + D_MISC("Found UUID128 0x%08x", service_search_uuid[i]); i++; tmp_pos +=3D 17; cur_pos +=3D 15; @@ -340,7 +340,9 @@ service_search_uuid_cnt =3D i; =20 max_rec_cnt =3D CHAR2INT16(data[cur_pos], data[cur_pos + 1]); + D_MISC("max_rec_cnt: %d", max_rec_cnt); + cur_pos +=3D 2; =20 cont_state_len =3D data[cur_pos++]; |
From: Mattias A. <mat...@us...> - 2001-08-22 17:49:57
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.28 1.29=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added missing return The diff of the modified file(s): --- bt_if.c 2001/08/17 09:23:25 1.28 +++ bt_if.c 2001/08/22 17:49:56 1.29 @@ -517,8 +517,6 @@ tmp[0]=3D len; memcpy(tmp+1, cmd, len+1); /* don't forget nullterminate... */ =20 - //printf("bt_testcmd : [%d] '%s'", len, cmd); -=20=20=20=20 #ifndef BT_USERSTACK=20 if ((ret_val =3D ioctl(bt_cfd, BTTESTCOMMAND, tmp)) < 0) { @@ -947,6 +945,7 @@ perror(__FUNCTION__); exit(1); } + return result; #else return hci_read_country_code(); #endif |
From: Mattias A. <mat...@us...> - 2001-08-22 17:49:13
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.h 1.18 1.19=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * change according to testcases at UP6 The diff of the modified file(s): --- bt_if.h 2001/08/01 09:39:24 1.18 +++ bt_if.h 2001/08/22 17:49:12 1.19 @@ -76,7 +76,7 @@ #define TCS_LAYER 5 #define L2CAP_TEST_LAYER 0x1231 #define L2CAP_TEST2_LAYER 0x1233 -#define L2CAP_TEST3_LAYER 0x4561 +#define L2CAP_TEST3_LAYER 0x4461 =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 */ /* SDP server */ |