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: Anders J. <and...@us...> - 2001-10-23 10:10:28
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.127 1.128=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Minimum limit when sending credits set to 6. * Only send credits in an empty packet if we run out of them, otherwise=20 always try to send them together with any outgoing data. The diff of the modified file(s): --- rfcomm.c 2001/10/18 15:49:25 1.127 +++ rfcomm.c 2001/10/23 10:10:28 1.128 @@ -136,7 +136,7 @@ =20 #define MAX_CREDITS 30 #define START_CREDITS 7 -#define MIN_CREDITS 15 +#define MIN_CREDITS 6 =20 #define DEF_RFCOMM_MTU 127 =20 @@ -1302,13 +1302,18 @@ u32 con_id =3D CREATE_RFCOMM_ID(rfcomm->line, tmp_dlci); =20 if (rfcomm->credit_flow) { + if(rfcomm->dlci[tmp_dlci].remote_credits) { --rfcomm->dlci[tmp_dlci].remote_credits; + } +=09=09=09=09 D_CTRL(FNC": Remote credits: %d\n",rfcomm->dlci[tmp_dlci].remote_credi= ts); - if (rfcomm->dlci[tmp_dlci].remote_credits < MIN_CREDITS) { + /* Send new credits in packet only if we totally run out of them. When= we send + data to the other side we usually send credits needed together with= the data + (piggy-backed) */ + if (rfcomm->dlci[tmp_dlci].remote_credits =3D=3D 0) { u8 newcredits =3D MAX_CREDITS - rfcomm->dlci[tmp_dlci].remote_credits; - rfcomm_send_credits(rfcomm, tmp_dlci, newcredits); rfcomm->dlci[tmp_dlci].remote_credits +=3D newcredits; -=09=09=09=09=09 + rfcomm_send_credits(rfcomm, tmp_dlci, newcredits); D_SND(FNC"Remote credits: %d\n",rfcomm->dlci[tmp_dlci].remote_credits= ); =20=09=09=09=09=09 } @@ -1831,6 +1836,7 @@ u32 rfcomm_frame_size; u8 send_credit =3D 0; s32 retval =3D 0; + u8 newcredits =3D 0; =20=09=09 D_CTRL(FNC"Creating UIH packet with %d bytes data to DLCI %d\n", len, dlci); @@ -1847,6 +1853,8 @@ if (rfcomm->credit_flow &&(rfcomm->dlci[dlci].remote_credits < MIN_CREDIT= S)) { D_SND(FNC"Sending more credits to remote port\n"); send_credit =3D 1; + newcredits =3D MAX_CREDITS - rfcomm->dlci[dlci].remote_credits; + rfcomm->dlci[dlci].remote_credits +=3D newcredits; } =20=09 if (len > SHORT_PAYLOAD_SIZE) { @@ -1872,10 +1880,8 @@ l_pkt =3D (long_frame*) (tx_buf->data + sizeof(rfcomm_tx_buf)); set_uih_hdr((void*) l_pkt, dlci, len, rfcomm->initiator); if (send_credit) { - u8 newcredits =3D MAX_CREDITS - rfcomm->dlci[dlci].remote_credits; l_pkt->h.control =3D SET_PF(UIH); l_pkt->data[0] =3D (newcredits); - rfcomm->dlci[dlci].remote_credits +=3D newcredits; D_SND(FNC": Remote credits: %d\n",rfcomm->dlci[dlci].remote_credits); memcpy(l_pkt->data + 1, data, len); } else { @@ -1905,11 +1911,8 @@ /* Always one */ set_uih_hdr((void*) s_pkt, dlci, len, rfcomm->initiator); if (send_credit) { - u8 newcredits =3D MAX_CREDITS - rfcomm->dlci[dlci].remote_credits; -=09=09=09 s_pkt->h.control =3D SET_PF(UIH); s_pkt->data[0] =3D (newcredits); - rfcomm->dlci[dlci].remote_credits +=3D newcredits; D_SND(FNC": Remote credits: %d\n",rfcomm->dlci[dlci].remote_credits); memcpy(s_pkt->data + 1, data, len); } else { @@ -2538,6 +2541,13 @@ rfcomm_con_list[i].line,=20 rfcomm_con_list[i].dlci[j].mtu); =20=09=09=09=09 + if(j) { + len +=3Dsprintf(buf+len, " lc[%d] rc[%d] ", + rfcomm_con_list[i].dlci[j].local_credits, + rfcomm_con_list[i].dlci[j].remote_credits); + } +=09=09=09=09 + len+=3Dsprintf(buf+len, "dlci#%d state[%s]\n",=20 j, state2name(rfcomm_con_list[i].dlci[j].state)); } |
From: Peter K. <pk...@us...> - 2001-10-23 09:21:00
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci_vendor.c 1.59 1.60=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Let csr_waitcmdnum() timeout after five seconds to not hang there indefinitely if no COMMAND_STATUS event is received. The diff of the modified file(s): --- hci_vendor.c 2001/10/16 11:13:09 1.59 +++ hci_vendor.c 2001/10/23 09:20:59 1.60 @@ -796,10 +796,12 @@ =20 void csr_waitcmdnum(void) { + int count =3D 5 * HZ; +=20=20 D_CMD(__FUNCTION__"\n"); hci_ctrl.hc_buf.cmd_num =3D 0; /* wait for command status */ - while (hci_ctrl.hc_buf.cmd_num =3D=3D 0) + while (hci_ctrl.hc_buf.cmd_num =3D=3D 0 && --count) { current->state =3D TASK_INTERRUPTIBLE; #if LINUX_VERSION_CODE >=3D KERNEL_VERSION(2,2,0) @@ -809,6 +811,11 @@ schedule(); current->timeout =3D 0; #endif + } + + if (!count) { + D_WARN(__FUNCTION__ ": Did not receive COMMAND_STATUS within five second= s!\n"); + hci_ctrl.hc_buf.cmd_num =3D 1; } } =20 |
From: Peter K. <pk...@us...> - 2001-10-22 13:25:55
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- btmem.c 1.43 1.44=20=20=20=20=20=20=20=20=20=20=20=20 l2cap.c 1.122 1.123=20=20=20=20=20=20=20=20=20=20=20 test.c 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Make sure macro arguments are enclosed by parentheses. The diff of the modified file(s): --- btmem.c 2001/06/19 06:13:01 1.43 +++ btmem.c 2001/10/22 13:25:54 1.44 @@ -77,7 +77,7 @@ =20 /****************** CONSTANT AND MACRO SECTION ***************************= ***/ =20 -#define BUFFER_USAGE_LEVEL(usage) ((usage*100)/(int)(BT_BUF_SIZE)) +#define BUFFER_USAGE_LEVEL(usage) (((usage)*100)/(int)(BT_BUF_SIZE)) =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 --- l2cap.c 2001/10/16 10:51:29 1.122 +++ l2cap.c 2001/10/22 13:25:54 1.123 @@ -88,7 +88,7 @@ #if L2CAP_DEBUG_STATE /* State machine */ #define D_STATE(fmt...) printk(L2CAP_DBG_STR fmt) -#define PRINTSTATE(con) (printk(L2CAP_DBG_STR "Current state of (%d:%d) is= %s\n", con->local_cid, con->remote_cid, state_name[con->current_state])) +#define PRINTSTATE(con) (printk(L2CAP_DBG_STR "Current state of (%d:%d) is= %s\n", (con)->local_cid, (con)->remote_cid, state_name[(con)->current_stat= e])) #else /* State machine */ #define D_STATE(fmt...) @@ -149,15 +149,16 @@ #define MAX_CID 0xffff =20 /* EVEN =3D> REQUEST */=20 -#define ISREQUEST(x) (!(x%2)) -#define SET_L2CAP_HDR(frame, len, cid) {\ +#define ISREQUEST(x) (!((x) % 2)) +#define SET_L2CAP_HDR(frame, len, cid) \ +do { \ (*(u8 *)(frame)) =3D (u8)(((len) & 0xff)); \ - (*(u8 *)(frame + 1)) =3D (u8)((len) >> 8); \ - (*(u8 *)(frame + 2)) =3D (u8)(((cid) & 0xff)); \ - (*(u8 *)(frame + 3)) =3D (u8)((cid) >> 8); \ -} + (*(u8 *)((frame) + 1)) =3D (u8)((len) >> 8); \ + (*(u8 *)((frame) + 2)) =3D (u8)(((cid) & 0xff)); \ + (*(u8 *)((frame) + 3)) =3D (u8)((cid) >> 8); \ +} while (0) =20 -#define ENTERSTATE(con, state) (con->current_state =3D state) +#define ENTERSTATE(con, state) ((con)->current_state =3D state) =20 #define RCID_NOT_SET 0 #define RCID_SET 1 @@ -168,38 +169,6 @@ =20 #define CONFREQ_NO_OPTIONS 0x11 =20 -const u8* psm2str(u16 psm) -{ - switch (psm) { - case 1: - return "SDP"; - break; - - case 3: - return "RFCOMM"; - break; - - case 5: - return "TCS"; - break; - - case 0x1231: - return "TEST"; - break; - - case 0x1233: - return "TEST-2"; - break; - - case 0x4561: - return "TEST-3"; - break; - - default : - return "unknown"; - } -} - const u8* cmdrej_reason[] =3D { "Command not understood", "Signalling MTU exceeded", @@ -3296,6 +3265,7 @@ (unsigned int)f->latency, (unsigned int)f->delay); } } + /* Returns a free cid in range 0x0040 - 0xffff */ /* FIXME - search from MIN_CID every time ? */ u16 get_cid(void) @@ -3313,6 +3283,32 @@ else if (i =3D=3D MAX_CID) return 0; i++; + } +} + +const u8* psm2str(u16 psm) +{ + switch (psm) { + case 1: + return "SDP"; + + case 3: + return "RFCOMM"; + + case 5: + return "TCS"; + + case 0x1231: + return "TEST"; + + case 0x1233: + return "TEST-2"; + + case 0x4561: + return "TEST-3"; + + default: + return "Unknown"; } } =20 --- test.c 2001/10/18 15:49:25 1.31 +++ test.c 2001/10/22 13:25:54 1.32 @@ -79,7 +79,7 @@ /* State machine */ #define D_STATE(fmt...) printk(TEST_DBG_STR fmt) #define PRINTSTATE(con) (printk("Current state : %s\n",\ - state_name[con->current_state])) + state_name[(con)->current_state])) #else /* State machine */ #define D_STATE(fmt) @@ -121,7 +121,7 @@ #define TEST_FLUSH_TIMEOUT 0xffff=20 /* Reliable channel, infinite amout of retransmissions */ =20 -#define PRINTPSM(con) (printk("PSM : 0x%x\n", con->psm)) +#define PRINTPSM(con) (printk("PSM : 0x%x\n", (con)->psm)) =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 |
From: Peter K. <pk...@us...> - 2001-10-22 12:57:14
|
The following files were modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bt_errno.h 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20 btcommon.h 1.88 1.89=20=20=20=20=20=20=20=20=20=20=20=20 l2cap.h 1.40 1.41=20=20=20=20=20=20=20=20=20=20=20=20 rfcomm.h 1.41 1.42=20=20=20=20=20=20=20=20=20=20=20=20 sdp.h 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Make sure macro arguments are enclosed by parentheses. The diff of the modified file(s): --- bt_errno.h 2001/10/16 16:24:51 1.5 +++ bt_errno.h 2001/10/22 12:57:13 1.6 @@ -45,8 +45,8 @@ =20 /* Unique status codes 32 bits : | layer 16 bits | code 16 bits | */ #define MSGCODE(layer, msgcode) ((((layer)<<16)&0xffff0000) | ((msgcode)&0= xffff)) -#define MSG_GET_LAYER(msg) ((msg >> 16) & 0x0000ffff) -#define MSG_GET_CODE(msg) (msg & 0x0000ffff) +#define MSG_GET_LAYER(msg) (((msg) >> 16) & 0x0000ffff) +#define MSG_GET_CODE(msg) ((msg) & 0x0000ffff) =20 /* Layer ID */ #define MSG_LAYER_HCI 1 --- btcommon.h 2001/10/16 14:57:10 1.88 +++ btcommon.h 2001/10/22 12:57:13 1.89 @@ -74,8 +74,8 @@ #endif =20 #ifndef __KERNEL__ -#define kmalloc(size,prio) malloc((size)) -#define kfree(obj) free((obj)) +#define kmalloc(size, prio) malloc(size) +#define kfree(obj) free(obj) #define wake_up_interruptible(p) do {*(p) =3D 0;} while (0) #define interruptible_sleep_on(p) do {(int)*(p)=3D1; while (*(p)){ usleep(= 10000);}; } while (0) #define cli() @@ -93,12 +93,12 @@ } while (0) =20 /* extract line number from tty */ -#define GET_TTYLINE(tty) (MINOR(tty->device) - tty->driver.minor_start) +#define GET_TTYLINE(tty) (MINOR((tty)->device) - (tty)->driver.minor_start) =20 /* These two macros are the same as le16_to_cpup() and le32_to_cpup() only that they work with unaligned addresses */ -#define le16_to_cpuu(addr) (le16_to_cpu(get_unaligned((u16 *)addr))) -#define le32_to_cpuu(addr) (le32_to_cpu(get_unaligned((u32 *)addr))) +#define le16_to_cpuu(addr) (le16_to_cpu(get_unaligned((u16 *)(addr)))) +#define le32_to_cpuu(addr) (le32_to_cpu(get_unaligned((u32 *)(addr)))) =20 /****************** Defines realted to the bluetooth implementation ******= ***/ =20 @@ -113,13 +113,12 @@ #define MAX_NBR_OF_CONNECTIONS 7 =20 /* Macro to extract the linenumber in a conid used by applications/stack. = */ -#define GET_LINE(conID) ( ((conID & 0xff00) >> 8) ) +#define GET_LINE(conID) (((conID) & 0xff00) >> 8) =20 /* Define to control usage of the security manager */=20=20 =20 /****************** Defines realated to the management of the bt-driver **= ***/ =20 - #define BT_NBR_DATAPORTS 7 #define BT_NBR_CTRLPORTS 1 #define BT_NBR_PORTS (BT_NBR_CTRLPORTS + BT_NBR_DATAPORTS) @@ -450,6 +449,7 @@ } __attribute__ ((packed)) rfcomm_con; =20 /****************** SDP connection object ****************************/ + enum sdp_states{SDP_DISCONNECTED, SDP_CONNECTING, SDP_CONNECTED}; =20 typedef struct sdp_con{ @@ -460,13 +460,12 @@ u8 line; } __attribute__ ((packed)) sdp_con; =20 - /****************** BT connection object ********************************/ =20 /* Connection id (32 bits) |PSM(16 bits)|layer_specific(16 bits)|=A0*/ =20 /* General connection id macros */ -#define GET_PSM(con_id) (con_id >> 16) +#define GET_PSM(con_id) ((con_id) >> 16) =20 =20 /* see rfcomm.h for layer specific macros */ --- l2cap.h 2001/09/12 12:12:30 1.40 +++ l2cap.h 2001/10/22 12:57:13 1.41 @@ -56,7 +56,7 @@ =20 #define L2CAP_CON_MAGIC 0xb055e =20 -#define PARANOIA_CHECKCON(con) (!con || (con->magic!=3DL2CAP_CON_MAGIC)) +#define PARANOIA_CHECKCON(con) (!(con) || ((con)->magic !=3D L2CAP_CON_MAG= IC)) =20 #define FALSE 0 #define TRUE 1 --- rfcomm.h 2001/10/10 14:59:17 1.41 +++ rfcomm.h 2001/10/22 12:57:13 1.42 @@ -64,16 +64,16 @@ * format : | psm(16 bits) | line(8bits) | dlci(8 bits) |=20 */ =20 -#define CREATE_RFCOMM_ID(line, dlci) ( ((RFCOMM_LAYER << 16)&0xffff0000) |= ((line<<8)&0xff00) | ((dlci) & 0xff) ) +#define CREATE_RFCOMM_ID(line, dlci) (((RFCOMM_LAYER << 16) & 0xffff0000) = | (((line) << 8) & 0xff00) | ((dlci) & 0xff)) =20 -#define CHECK_RFCOMM(id) do { \ +#define CHECK_RFCOMM(id) \ + do { \ if (GET_PSM(id) !=3D RFCOMM_LAYER) \ D_ERR("con id 0x%x is not a RFCOMM ID (%s, l.= %d)\n", id, __FILE__, __LINE__);\ } while (0) =20 -#define GET_RFCOMMSRVCH(con_id) ((con_id&0xff) >> 1) -#define GET_RFCOMMDLCI(con_id) (con_id&0xff) - +#define GET_RFCOMMSRVCH(con_id) (((con_id) & 0xff) >> 1) +#define GET_RFCOMMDLCI(con_id) ((con_id) & 0xff) =20 #ifdef CONFIG_SVINTO2 #include <asm/svinto.h> @@ -221,5 +221,6 @@ s32 rfcomm_send_credits(rfcomm_con *rfcomm, u8 dlci, u8 credits); s32 valid_dlci(u8 dlci); s32 rfcomm_flow_stop(u8 line, u8 dlci); + #endif /****************** END OF FILE rfcomm.h *********************************= ***/ --- sdp.h 2001/10/10 14:59:17 1.27 +++ sdp.h 2001/10/22 12:57:13 1.28 @@ -67,8 +67,8 @@ /* index =3D The SDP connection data structure. = */ /*------------------------------------------------------------------------= --*/ =20 -#define CREATE_SDP_ID(line, index) ( ((SDP_LAYER << 16) & 0xffff0000) | ((= line << 8) & 0x0000ff00) | (index & 0xff) ) -#define GET_SDPINDEX(conID) ( (conID & 0xff) ) +#define CREATE_SDP_ID(line, index) (((SDP_LAYER << 16) & 0xffff0000) | (((= line) << 8) & 0x0000ff00) | (index & 0xff)) +#define GET_SDPINDEX(conID) ((conID) & 0xff) =20 /****************** TYPE DEFINITION SECTION ******************************= ***/ =20 |
From: Peter K. <pk...@us...> - 2001-10-22 12:52:14
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bcsp.c 1.21 1.22=20=20=20=20=20=20=20=20=20=20=20=20 hci.c 1.187 1.188=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: hci_get_ocf() and hci_get_ogf() should now work correctly regarding endianness and alignment. The diff of the modified file(s): --- bcsp.c 2001/09/18 13:04:27 1.21 +++ bcsp.c 2001/10/22 12:51:44 1.22 @@ -252,13 +252,11 @@ s32 bcsp_write_top(u8 *data, u32 len) { - u16 opcode; s32 ret =3D -EINVAL; =20=09 switch (data[0]) { case CMD_PKT: - opcode =3D le16_to_cpu(get_unaligned((u16 *)&data[1])); - if (hci_get_ocf(opcode) =3D=3D BCSP_OCF) { + if (hci_get_ocf(data+1) =3D=3D BCSP_OCF) { ret =3D bcsp_sequence_send(data + 5, len - 5, data[4] & 0x3f); } else { ret =3D bcsp_sequence_send(data + 1, len - 1, BCSP_CMD_CHN); --- hci.c 2001/10/16 14:57:10 1.187 +++ hci.c 2001/10/22 12:51:44 1.188 @@ -3622,10 +3622,10 @@ =20 PRINTPKT(__FUNCTION__, data, cmd->len + CMD_HDR_LEN + HCI_HDR_LEN); =20 - switch (hci_get_ogf(cmd->opcode)) { + switch (hci_get_ogf(&cmd->opcode)) { =20 case HCI_LC: /* Host Controller commands */ - switch (hci_get_ocf(cmd->opcode)) { + switch (hci_get_ocf(&cmd->opcode)) { =20 case CREATE_CONNECTION: /* Send connection request event */ @@ -3676,13 +3676,13 @@ =20 default: printk(__FUNCTION__ ": Unknown command ogf:0x%x,ocf:0x%x\n", - hci_get_ogf(cmd->opcode), hci_get_ocf(cmd->opcode)); + hci_get_ogf(&cmd->opcode), hci_get_ocf(&cmd->opcode)); break; } break; =20 case HCI_IP: /* Informational parameters */ - switch (hci_get_ocf(cmd->opcode)) { + switch (hci_get_ocf(&cmd->opcode)) { =20 case READ_BUFFER_SIZE: D_CMD(__FUNCTION__ ": READ_BUFFER_SIZE->setting buffer size\n"); @@ -3694,14 +3694,14 @@ =20 default: printk(__FUNCTION__ ": Unknown command ogf:0x%x,ocf:0x%x\n", - hci_get_ogf(cmd->opcode), hci_get_ocf(cmd->opcode)); + hci_get_ogf(&cmd->opcode), hci_get_ocf(&cmd->opcode)); break; } break; =20 default: printk(__FUNCTION__ ": Unknown command ogf:0x%x,ocf:0x%x\n", - hci_get_ogf(cmd->opcode), hci_get_ocf(cmd->opcode)); + hci_get_ogf(&cmd->opcode), hci_get_ocf(&cmd->opcode)); break; } } |
From: Peter K. <pk...@us...> - 2001-10-22 12:51:45
|
The following file was modified in linux/include/linux/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- hci.h 1.72 1.73=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: hci_get_ocf() and hci_get_ogf() should now work correctly regarding endianness and alignment. The diff of the modified file(s): --- hci.h 2001/10/05 12:06:43 1.72 +++ hci.h 2001/10/22 12:51:44 1.73 @@ -87,9 +87,8 @@ } __attribute__ ((packed)) cmd_pkt; =20 #define hci_put_opcode(ocf, ogf)(cpu_to_le16(((ocf) & 0x03ff) | ((ogf) << = 10 & 0xfc00))) -//#define hci_put_le16(buf, val) { *((char*)buf) =3D (val) & 0xff; *((char= *)buf + 1) =3D (val) >> 8; } -#define hci_get_ocf(opcode) (cpu_to_le16((opcode) & 0x3ff)) -#define hci_get_ogf(opcode) (cpu_to_le16(((opcode) & 0xfc00) >> 10)) +#define hci_get_ocf(opcode_addr) (le16_to_cpuu(opcode_addr) & 0x3ff) +#define hci_get_ogf(opcode_addr) ((le16_to_cpuu(opcode_addr) & 0xfc00) >> = 10) =20 /****************** EXPORTED FUNCTION DECLARATION SECTION ****************= ***/ =20 |
From: Peter K. <pk...@us...> - 2001-10-22 12:49:21
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- bluetooth.c 1.207 1.208=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Make sure bcsp_shutdown() is called if bcsp_init() fails. The diff of the modified file(s): --- bluetooth.c 2001/10/16 16:12:14 1.207 +++ bluetooth.c 2001/10/22 12:49:20 1.208 @@ -1131,6 +1131,7 @@ BT_DRIVER("BTINITBCSP\n"); if (bcsp_init() < 0) { printk("Sync failed\n"); + bcsp_shutdown(); return -ETIMEDOUT; } return 0; @@ -2564,7 +2565,6 @@ #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP if (bt_use_bcsp(-1) && !bcsp_issyncronized()) {=20=20 if (bcsp_init() < 0) { - bcsp_shutdown(); goto init_failed_exit0; } } @@ -2600,10 +2600,10 @@ =20 init_failed_exit1:=20 hci_shutdown(); +init_failed_exit0: #ifdef CONFIG_BLUETOOTH_SUPPORT_BCSP bcsp_shutdown(); #endif -init_failed_exit0: btmem_shutdown(); if (tmp_bt_buf) { free_page((unsigned long) tmp_bt_buf); |
From: Peter K. <pk...@us...> - 2001-10-21 10:49:44
|
The following file was modified in : Name Old version New version Comment ---- ----------- ----------- ------- ChangeLog 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Updated for release 0.0.8 The diff of the modified file(s): --- ChangeLog 2001/10/19 13:57:35 1.1 +++ ChangeLog 2001/10/21 10:49:43 1.2 @@ -1,3 +1,31 @@ +2001-10-21 12:40 pkj + + * init_env: Updated to work with the new version of Rules.elinux=20 + +2001-10-21 12:39 pkj + + * apps/Rules.elinux: Synchronised with our latest version of this + file.=20=20 + +2001-10-21 12:33 pkj + + * apps/bluetooth/btd/btd.c: Added dummy versions of bt_use_bcsp() + and bt_dfu_mode() for user mode stack.=20=20 + +2001-10-21 11:39 pkj + + * apps/bluetooth/userstack/Makefile: Corrected creation and removal + of links.=20=20 + +2001-10-21 11:15 pkj + + * apps/bluetooth/Makefile: Added experimental to the list of + sub-directories.=20=20 + +2001-10-19 15:57 pkj + + * ChangeLog: Initial version.=20=20 + 2001-10-19 15:39 pkj =20 * linux/drivers/char/bluetooth/README: Updated (finally) to match |
From: Peter K. <pk...@us...> - 2001-10-21 10:40:12
|
The following file was modified in : Name Old version New version Comment ---- ----------- ----------- ------- init_env 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Updated to work with the new version of Rules.elinux The diff of the modified file(s): --- init_env 2001/02/28 23:42:08 1.1 +++ init_env 2001/10/21 10:40:11 1.2 @@ -1,12 +1,10 @@ # init_env: Sets some environment variables # Run using '. init_env' or 'source init_env' =20 -export DEVTREE_ROOT=3D`pwd` +export AXIS_TOP_DIR=3D`pwd` =20 -#export AX_PRODUCTDIR=3D$DEVTREE_ROOT -export EROOT=3D$DEVTREE_ROOT/eroot -export HROOT=3D$DEVTREE_ROOT/hroot -#export ELINUXDIR=3D$DEVTREE_ROOT/elinux -export ELIBSDIR=3D$DEVTREE_ROOT/libs -export APPS=3D$DEVTREE_ROOT/apps -#export AX_PACKAGES=3D$DEVTREE_ROOT/packages +#export AX_PRODUCTDIR=3D$AXIS_TOP_DIR +#export ELINUXDIR=3D$AXIS_TOP_DIR/elinux +export ELIBSDIR=3D$AXIS_TOP_DIR/libs +export APPS=3D$AXIS_TOP_DIR/apps +#export AX_PACKAGES=3D$AXIS_TOP_DIR/packages |
From: Peter K. <pk...@us...> - 2001-10-21 10:39:12
|
The following file was modified in apps: Name Old version New version Comment ---- ----------- ----------- ------- Rules.elinux 1.4 1.5=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Synchronised with our latest version of this file. The diff of the modified file(s): --- Rules.elinux 2001/08/16 13:12:46 1.4 +++ Rules.elinux 2001/10/21 10:39:11 1.5 @@ -1,65 +1,108 @@ # Hey Emacs, this Makefile is in -*- makefile -*- mode! +## $Id$ + +# Try 'make axishelp' to display the possible targets =20 makefrag_name =3D .target-makefrag =20 +# Set VERBOSE_FRAG to nothing to print that stuff if you want it,=20 +# it clutters up the screen so it's @ by default. +VERBOSE_FRAG =3D @ + +# By default we do not build statically except for one target (clinux), +# but it can be enabled/disabled with the targets static and nostatic. +AXIS_STATIC =3D + +AXIS_WARNING_PREFIX =3D ---------- WARNING: +AXIS_ERROR_PREFIX =3D ---------- ERROR: +AXIS_USE_UCLIBC_DEPRECATED =3D Makefile in $(shell pwd) sets deprecated \ +USE_UCLIBC. It should set AXIS_USABLE_LIBS =3D UCLIBC +AXIS_LIB_MISMATCH =3D The code in $(shell pwd) cannot be linked with\ + $(AXIS_WILL_USE_LIB) + +# Help "function" to add slashes before spaces +slashify =3D $(shell echo "$(1)" | sed 's/ /\\ /g') + +########################################################################### +# Start by deciding what we are building for + ifndef AXIS_BUILDTYPE -# If we have a .target-makefrag, read stuff from it. Else we will -# probably create one, so define ROOT_MAKEFRAG. +# If we have a .target-makefrag, read stuff from it. ifeq ($(makefrag_name),$(wildcard $(makefrag_name))) include $(makefrag_name) endif # An $(makefrag_name) existing in current directory. =20 -# Backward compatibility with the old .target_* files. +# OBSOLETE: Backward compatibility with the old .target_* files. ifndef AXIS_BUILDTYPE ifeq (.target_elinux,$(wildcard .target_*)) +$(warning $(AXIS_WARNING_PREFIX) Use of .target_elinux is deprecated, and = support for it will be removed in the near future) AXIS_BUILDTYPE=3Delinux endif ifeq (.target_clinux,$(wildcard .target_*)) +$(warning $(AXIS_WARNING_PREFIX) Use of .target_clinux is deprecated, and = support for it will be removed in the near future) AXIS_BUILDTYPE=3Dclinux endif ifeq (.target_host,$(wildcard .target_*)) +$(warning $(AXIS_WARNING_PREFIX) Use of .target_host is deprecated, and su= pport for it will be removed in the near future) AXIS_BUILDTYPE=3Dhost endif endif =20 endif # !AXIS_BUILDTYPE =20 -SUBDIRS +=3D dummy -AXIS_WARNING_PREFIX =3D ---------- WARNING: -AXIS_ERROR_PREFIX =3D ---------- ERROR: -AXIS_USE_UCLIBC_DEPRECATED =3D Makefile in $(shell pwd) sets deprecated \ -USE_UCLIBC. It should set AXIS_USABLE_LIBS =3D UCLIBC -AXIS_LIB_MISMATCH =3D The code in $(shell pwd) cannot be linked with\ - $(AXIS_WILL_USE_LIB) +# Build for host if the build type is not defined. +ifndef AXIS_BUILDTYPE +AXIS_BUILDTYPE =3D host +endif =20 -########################################################################### +# Should we build with debug information or not? +ifeq ($(AXIS_DEBUG),debug) +AXIS_USE_DEBUG =3D yes +else +AXIS_USE_DEBUG =3D no +endif + +#-------------------------------------------------------------------------- + # Deduce other build variables from AXIS_BUILDTYPE. -ifdef AXIS_BUILDTYPE + +AXIS_BUILDTYPE_KNOWN =3D no =20 ifeq ($(AXIS_BUILDTYPE),cris-axis-linux-gnu) CLINUX =3D 1 AXIS_WILL_USE_LIB =3D GLIBC -endif +AXIS_BUILDTYPE_KNOWN =3D yes +endif # AXIS_BUILDTYPE =3D=3D cris-axis-linux-gnu =20 +ifeq ($(AXIS_BUILDTYPE),cris-axis-linux-gnuuclibc) +CLINUX =3D 1 +AXIS_WILL_USE_LIB =3D UCLIBC +AXIS_BUILDTYPE_KNOWN =3D yes +endif # AXIS_BUILDTYPE =3D=3D cris-axis-linux-gnuuclibc + ifeq ($(AXIS_BUILDTYPE),clinux) CLINUX =3D 1 AXIS_WILL_USE_LIB =3D UCLIBC -endif +# Default static +AXIS_STATIC =3D static +AXIS_BUILDTYPE_KNOWN =3D yes +endif # AXIS_BUILDTYPE =3D=3D clinux =20 ifeq ($(AXIS_BUILDTYPE),elinux) ELINUX =3D 1 AXIS_WILL_USE_LIB =3D UCLIBC -endif +AXIS_BUILDTYPE_KNOWN =3D yes +endif # AXIS_BUILDTYPE =3D=3D elinux =20 ifeq ($(AXIS_BUILDTYPE),host) HOST =3D 1 -endif - -# Has this ever been used? What's the difference to "host"? -ifeq ($(AXIS_BUILDTYPE),linux) -LINUX =3D 1 +# We want to be able to use gdb with full debug info for host compiled +# programs. +ifneq ($(AXIS_DEBUG),no) +AXIS_USE_DEBUG =3D yes endif -endif # AXIS_BUILDTYPE +AXIS_BUILDTYPE_KNOWN =3D yes +endif # AXIS_BUILDTYPE =3D=3D host =20 ########################################################################### =20 @@ -71,11 +114,7 @@ # include-files and have the right defines etc. so it should be # seen as part of CC rather than CFLAGS. CC =3D gcc_cris -melinux -CPP =3D gcc_cris -melinux -E -CXX =3D gcc_cris -melinux -xc++ =20 -LDFLAGS =3D -s -shlib - TARGET_TYPE =3D elinux CRIS =3D 1 =20 @@ -95,16 +134,20 @@ ifneq ($(filter $(AXIS_USABLE_LIBS),UCLIBC),UCLIBC) $(error $(AXIS_ERROR_PREFIX) $(AXIS_LIB_MISMATCH)) else -# Define legacy macro. +# OBSOLETE: Define legacy macro. USE_UCLIBC =3D 1 -endif # not UCLIBC in AXIS_USABLE_LIBS +endif # UCLIBC not in AXIS_USABLE_LIBS endif # AXIS_USABLE_LIBS =20 else +# OBSOLETE: If you get an error about missing separator here +# upgrade your make! $(warning $(AXIS_WARNING_PREFIX) $(AXIS_USE_UCLIBC_DEPRECATED)) -endif # not USE_UCLIBC +endif # !USE_UCLIBC endif # ELINUX =20 +#-------------------------------------------------------------------------- + ifdef CLINUX =20 ifndef ELINUXDIR @@ -116,8 +159,8 @@ # library and compile variable settings (like CC) aren't supposed to be # set or are not applicable, then AXIS_USABLE_LIBS should not be set. =20 -# First some backwards compatibility: each app used to set USE_UCLIBC in -# its makefile. +# OBSOLETE: First some backwards compatibility: each app used to set +# USE_UCLIBC in its makefile. ifdef USE_UCLIBC $(warning $(AXIS_WARNING_PREFIX) $(AXIS_USE_UCLIBC_DEPRECATED)) AXIS_USABLE_LIBS +=3D UCLIBC @@ -131,7 +174,7 @@ endif endif # AXIS_USABLE_LIBS =20 -# Set legacy variables used in various unknown Makefiles. +# OBSOLETE: Set legacy variables used in various unknown Makefiles. # FIXME: Kill the USE_* variables when all apps are changed to use # AXIS_WILL_USE_LIB instead. Until then, introduce no new use or setting # of USE_*. @@ -147,22 +190,13 @@ =20 # Now that we've checked that AXIS_WILL_USE_LIB matches AXIS_USABLE_LIBS, # we set the other build vars. - -ifeq ($(AXIS_WILL_USE_LIB),UCLIBC) -# Same as ELINUX but with different options (to build as ELF), and we -# build statically since uclibc does not support dynamic linking. =20 -CC =3D gcc_cris -mlinux -DCRISMMU -CPP =3D gcc_cris -mlinux -DCRISMMU -E -CXX =3D gcc_cris -mlinux -DCRISMMU -xc++ - -LDFLAGS =3D -static -ifneq ($(AXIS_DEBUG),debug) -# Add -s flag for stripping if not building for debug. -LDFLAGS +=3D -s -endif # AXIS_DEBUG !=3D debug -endif # AXIS_WILL_USE_LIB =3D UCLIBC +CC =3D gcc_cris -mlinux =20 +ifeq ($(AXIS_WILL_USE_LIB),UCLIBC) +# Same as ELINUX but with different options (to build as ELF). +CC +=3D -DCRISMMU +else ifeq ($(AXIS_WILL_USE_LIB),GLIBC) # Using glibc, linking dynamically like on the host. =20 @@ -173,16 +207,11 @@ # lest we also drag in the other subdirs, which collide with the normal # gcc-cris -mlinux system-includes, for example <net/...>. =20 -CC =3D gcc-cris -mlinux -isystem $(prefix)/include -CPP =3D gcc-cris -mlinux -E -isystem $(prefix)/include -CXX =3D g++-cris -mlinux -xc++ -isystem $(prefix)/include - -LDFLAGS =3D -L$(prefix)/lib -ifneq ($(AXIS_DEBUG),debug) -# Add -s flag for stripping if not building for debug. -LDFLAGS +=3D -s -endif # AXIS_DEBUG !=3D debug -endif # AXIS_WILL_USE_LIB !=3D GLIBC +CC +=3D -isystem $(prefix)/include +else +$(error $(AXIS_ERROR_PREFIX) Unexpected library $(AXIS_WILL_USE_LIB).) +endif # AXIS_WILL_USE_LIB =3D GLIBC +endif # AXIS_WILL_USE_LIB =3D UCLIBC =20 TARGET_TYPE =3D clinux CRIS =3D 1 @@ -191,8 +220,20 @@ =20 endif # CLINUX =20 +#-------------------------------------------------------------------------- + ifdef CRIS =20 +ifeq ($(AXIS_WILL_USE_LIB),UCLIBC) +# OBSOLETE: Delete the UCLIBC macro once all usage is exterminated. Usage +# should be of if[n]eq ($(AXIS_WILL_USE_LIB),UCLIBC). +UCLIBC =3D 1 +CC +=3D -muclibc=3D$(prefix) +endif + +CPP =3D $(CC) -E +CXX =3D $(CC) -xc++ + # This is for building for the CRIS architecture. =20 OBJCOPY =3D objcopy-cris @@ -200,12 +241,6 @@ AR =3D ar-cris RANLIB =3D ranlib-cris =20 -TARGET_ENV =3D "\$$EROOT" -ifdef EROOT -ifndef prefix -prefix =3D $(EROOT) -endif # prefix -endif # EROOT run_prefix =3D=20 =20 else @@ -214,85 +249,103 @@ =20 RANLIB =3D ranlib =20 -TARGET_TYPE =3D host -TARGET_ENV =3D "\$$HROOT" -ifdef HROOT -ifndef prefix -prefix =3D $(HROOT) -endif # prefix -endif # HROOT run_prefix =3D $(prefix) =20 -endif # not CRIS +endif # !CRIS =20 -INSTALL =3D install +#-------------------------------------------------------------------------- =20 -########################################################################### +ifndef prefix +ifdef AXIS_TOP_DIR +prefix =3D $(AXIS_TOP_DIR)/target/$(AXIS_BUILDTYPE) +else +# OBSOLETE: The $(EROOT) and $(HROOT) variables should not be used any mor= e. +ifdef CRIS +ifdef EROOT +prefix =3D $(EROOT) +$(warning $(AXIS_WARNING_PREFIX) Use of $$EROOT is deprecated! Please use = $$AXIS_TOP_DIR instead) +endif +else +ifdef HROOT +prefix =3D $(HROOT) +$(warning $(AXIS_WARNING_PREFIX) Use of $$HROOT is deprecated! Please use = $$AXIS_TOP_DIR instead) +endif=20 +endif # CRIS +endif # AXIS_TOP_DIR +endif # !prefix =20 +#-------------------------------------------------------------------------- + # Define CFLAGS to something sensible. CFLAGS =3D -Wall - -ifdef CRIS -CFLAGS +=3D -O2 =20 -ifeq ($(AXIS_DEBUG),debug) +ifeq ($(AXIS_USE_DEBUG),yes) # Add suitable compiler flags for debugging. -CFLAGS +=3D -g -fno-omit-frame-pointer +CFLAGS +=3D -O0 -g -fno-omit-frame-pointer +else +CFLAGS +=3D -O2 endif =20=20 +# OBSOLETE: Add ELINUX define. ifdef ELINUX CFLAGS +=3D -DELINUX endif =20 -else -# We want to be able to use gdb with full debug info for host compiled -# programs. -CFLAGS +=3D -O0 -g -endif - # Can't use -pedantic due to use of long long in standard includes. :( CXXFLAGS =3D $(CFLAGS) -Wno-ctor-dtor-privacy -ansi -pipe =20 -# An elinux program is expected to be compiled like this: -# $(CC) $(CFLAGS) -c my_file.c -# I don't know if C++ works as "expected" in elinux, but in -# theory it could be compiled like this: -# $(CXX) $(CXXFLAGS) -c my_file.cc -# And all objects should be linked like this: -# $(CC) $(LDFLAGS) -o my_program my_file.o possibly_other_objects.o +# Define LDFLAGS to something sensible. +LDFLAGS =3D =20 -ifdef CRIS -ifeq ($(AXIS_WILL_USE_LIB),UCLIBC) -# FIXME: Delete the UCLIBC macro once all usage is exterminated. Usage -# should be of if[n]eq ($(AXIS_WILL_USE_LIB),UCLIBC). -UCLIBC =3D 1 -CC +=3D -muclibc=3D$(prefix) -CPP +=3D -muclibc=3D$(prefix) -CXX +=3D -muclibc=3D$(prefix) +ifeq ($(AXIS_WILL_USE_LIB),GLIBC) +LDFLAGS +=3D -L$(prefix)/lib +endif + +# Add -s flag for stripping if not building for debug. (The -s flag must n= ot +# be specified when building statically for elinux, however.) +ifneq ($(AXIS_USE_DEBUG),yes) +ifneq ($(AXIS_STATIC),static) +LDFLAGS +=3D -s +else +ifndef ELINUX +LDFLAGS +=3D -s endif endif +endif # AXIS_USE_DEBUG !=3D yes =20 -#-------------------------------------------------------------------------- -# The following are a set of standard rules to try to make sure we build +ifeq ($(AXIS_STATIC),static) +LDFLAGS +=3D -static +else +ifdef ELINUX +LDFLAGS +=3D -shlib +endif +endif # AXIS_STATIC =3D static + +INSTALL =3D install + +########################################################################### +# The following is a set of standard rules to try to make sure we build # and install the correct files. =20 +# Make verify_builddir a dependency of all build and install rules to make +# sure the build directory is set correctly before trying to actually build +# anything. + all: all-recurse all-recurse: pre-all-recurse +pre-all-recurse: verify_builddir =20 -# Make eroot a dependency of all install rules to make sure the $(prefix) -# variable is set (to $HROOT or $EROOT depending on whether this -# is a build for the host or elinux). depend: depend-recurse depend-recurse: pre-depend-recurse -pre-depend-recurse: eroot=20 +pre-depend-recurse: verify_builddir =20 install: install-recurse install-recurse: pre-install-recurse=20 -pre-install-recurse: eroot +pre-install-recurse: verify_builddir =20 uninstall: uninstall-recurse uninstall-recurse: pre-uninstall-recurse -pre-uninstall-recurse: eroot +pre-uninstall-recurse: verify_builddir =20 clean: clean-recurse clean-recurse: pre-clean-recurse @@ -300,9 +353,9 @@ ifndef ROOT_MAKEFRAG ROOT_MAKEFRAG :=3D $(shell echo `pwd`/$(makefrag_name)) =20 -# This rule allows old .target_* files to be converted to .target-makefrag -# by running make configsubs in the root directory -$(ROOT_MAKEFRAG): +# OBSOLETE: This rule allows old .target_* files to be converted to +# .target-makefrag by running make configsubs in the root directory +$(call slashify,$(ROOT_MAKEFRAG)): ifdef AXIS_BUILDTYPE $(MAKE) $(AXIS_BUILDTYPE) else @@ -311,59 +364,99 @@ endif endif # !ROOT_MAKEFRAG =20 -nodebug: - grep -v AXIS_DEBUG $(makefrag_name) > $(makefrag_name).tmp - mv -f $(makefrag_name).tmp $(makefrag_name) - -$(MAKE) clean +##=20 +## The following special targets exists: =20 -debug: - grep -v AXIS_DEBUG $(makefrag_name) >$(makefrag_name).tmp - echo AXIS_DEBUG=3Ddebug >>$(makefrag_name).tmp - mv -f $(makefrag_name).tmp $(makefrag_name) - -$(MAKE) clean +## axishelp - This help +axishelp: + @grep '^## ' $(APPS)/Rules.elinux =20 -cris-axis-linux-gnu elinux clinux host: - echo AXIS_BUILDTYPE=3D$@ > .tmp$(makefrag_name) +##=20 +## The following build types exist: +## cris-axis-linux-gnu - CRIS/Linux 2.4 with shared glibc +## cris-axis-linux-gnuuclibc - CRIS/Linux 2.4 with shared uClibc +## clinux - CRIS/Linux 2.4 with static uClibc +## elinux - CRIS/Linux 2.0 NO_MMU with uC-libc +## host - Host build with debug +cris-axis-linux-gnu cris-axis-linux-gnuuclibc clinux elinux host: + $(VERBOSE_FRAG)echo AXIS_BUILDTYPE=3D$@ > .tmp$(makefrag_name) ifeq ($(AXIS_DEBUG),debug) - echo AXIS_DEBUG=3D$(AXIS_DEBUG) >> .tmp$(makefrag_name) + $(VERBOSE_FRAG)echo AXIS_DEBUG=3D$(AXIS_DEBUG) >> .tmp$(makefrag_name) endif - -$(MAKE) configsubs AXIS_BUILDTYPE=3D$@ ROOT_MAKEFRAG=3D$(shell echo `pwd= `/.tmp$(makefrag_name)) + @$(MAKE) configsubs AXIS_BUILDTYPE=3D$@ ROOT_MAKEFRAG=3D"$(shell echo `pw= d`/.tmp$(makefrag_name))" || ( rm -f .tmp$(makefrag_name); exit 1 ) + @rm -f .tmp$(makefrag_name) + +##=20 +## The following build options exist: +## debug - Enable debug +## nodebug - Do not enable debug +## static - Enable static linking +## nostatic - Do not enable static linking +debug nodebug static nostatic: + @option=3D`echo $@ | sed 's/^no//'`;\ + target=3D`echo AXIS_$$option | tr a-z A-Z`;\ + grep -v "$$target" $(makefrag_name) > .tmp$(makefrag_name) 2> /dev/null; \ + if test "$$option" =3D=3D "$@"; then \ + echo $$target=3D$@ >> .tmp$(makefrag_name); \ + neg_check=3D'!'; \ + fi; \ + $(MAKE) configsubs AXIS_CHECK_STRING=3D"$$target=3D$$option" AXIS_NEG_CHE= CK=3D$$neg_check ROOT_MAKEFRAG=3D"$(shell echo `pwd`/.tmp$(makefrag_name))"= || ( rm -f .tmp$(makefrag_name); exit 1 ) @rm -f .tmp$(makefrag_name) =20 +ifndef AXIS_CHECK_STRING +AXIS_CHECK_STRING =3D "AXIS_BUILDTYPE=3D$(AXIS_BUILDTYPE)" +AXIS_NEG_CHECK =3D ! +endif + checkclean: @if ! test -f .target_$(AXIS_BUILDTYPE) \ && ( ! test -f $(makefrag_name) \ - || ! grep AXIS_BUILDTYPE=3D$(AXIS_BUILDTYPE) $(makefrag_name) > = /dev/null ); then \ - NO_SUBDIR_RECURSION=3D1 $(MAKE) --no-print-directory clean ROOT_MAKEFRA= G=3D$(ROOT_MAKEFRAG); \ + || $(AXIS_NEG_CHECK) grep $(AXIS_CHECK_STRING) $(makefrag_name) = > /dev/null ); then \ + NO_SUBDIR_RECURSION=3D1 $(MAKE) --no-print-directory clean ROOT_MAKEFRA= G=3D"$(ROOT_MAKEFRAG)"; \ fi =20 configsubs: configsubs-recurse configsubs-recurse: pre-configsubs-recurse -pre-configsubs-recurse: $(ROOT_MAKEFRAG)=20 +pre-configsubs-recurse: $(call slashify,$(ROOT_MAKEFRAG)) =20 configsubs: checkclean - -cmp -s $(ROOT_MAKEFRAG) $(makefrag_name) || ( rm -f .target*; cp $(ROOT_= MAKEFRAG) $(makefrag_name) ) + -@if ! cmp -s "$(ROOT_MAKEFRAG)" $(makefrag_name); then \ + rm -f .target*; \ + echo "cp \"$(ROOT_MAKEFRAG)\" $(makefrag_name)"; \ + cp "$(ROOT_MAKEFRAG)" $(makefrag_name); \ + fi =20 # These are hooks that can be used to have rules executed before the # recursive rules are checked. pre-all-recurse pre-depend-recurse pre-install-recurse pre-uninstall-recur= se pre-clean-recurse pre-configsubs-recurse: =20 -# Recursive rules to make all, depend, install, uninstall, clean and -# configsubs. +# Recursive rules to make all, depend, install, uninstall, clean and confi= gsubs all-recurse depend-recurse install-recurse uninstall-recurse clean-recurse= configsubs-recurse: - @if test $(NO_SUBDIR_RECURSION)0 -eq 0 ; then \ - for subdir in $(SUBDIRS); do \ - if test -d $$subdir ; then \ +ifneq ($(NO_SUBDIR_RECURSION),1) + @subdirs=3D"$(SUBDIRS)"; \ + for subdir in $$subdirs; do \ + if test -d "$$subdir"; then \ target=3D`echo $@ | sed 's/-recurse//'`; \ - echo Making $$target in $$subdir for $(AXIS_BUILDTYPE); \ - $(MAKE) -C $$subdir $$target ROOT_MAKEFRAG=3D$(ROOT_MAKEFRAG) || ex= it 1; \ + echo "Making $$target in $$subdir for $(AXIS_BUILDTYPE)"; \ + $(MAKE) -C "$$subdir" $$target ROOT_MAKEFRAG=3D"$(ROOT_MAKEFRAG)" || = exit 1; \ + else \ + echo "The directory '$$subdir' does not exist or is not a directory!"= ; \ + exit 1; \ fi; \ - done; \ - fi + done +endif =20 -eroot: +verify_builddir: verify_buildtype ifndef prefix - @echo "You must define the environment variable $(TARGET_ENV) to where yo= ur $(TARGET_TYPE)" - @echo "applications should be installed!" + @echo "You must define either the environment variable \$$AXIS_TOP_DIR to= where your" + @echo "source tree is located, or \$$prefix to where anything (independen= t of target" + @echo "type) should be installed!" + @exit 1 +endif + +verify_buildtype: +ifneq ($(AXIS_BUILDTYPE_KNOWN),yes) + @echo "Unknown build type '$(AXIS_BUILDTYPE)'!" + @echo "Use 'make axishelp' to get a list of valid build types." @exit 1 endif |
From: Peter K. <pk...@us...> - 2001-10-21 10:33:11
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.104 1.105=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added dummy versions of bt_use_bcsp() and bt_dfu_mode() for user mode stack. The diff of the modified file(s): --- btd.c 2001/10/10 14:53:01 1.104 +++ btd.c 2001/10/21 10:33:10 1.105 @@ -205,6 +205,8 @@ void bt_rfcomm_connection_ready(int status); void bt_sdp_connection_ready(int status); int bt_initiated(void); +int bt_use_bcsp(int new_use_bcsp); +int bt_dfu_mode(int new_dfu_mode); extern int bt_read_proc(char *buf, int len); bt_stat_struct bt_stat; static int bt_initdone =3D 0; @@ -2469,6 +2471,16 @@ int bt_initiated(void) { return bt_initdone; +} + +int bt_use_bcsp(int new_use_bcsp) +{ + return 0; +} + +int bt_dfu_mode(int new_dfu_mode) +{ + return 0; } =20 /* TCP socket */ |
From: Peter K. <pk...@us...> - 2001-10-21 09:39:14
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.25 1.26=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Corrected creation and removal of links. The diff of the modified file(s): --- Makefile 2001/10/18 15:56:25 1.25 +++ Makefile 2001/10/21 09:39:13 1.26 @@ -59,7 +59,8 @@ =20 BTDSRCS =3D btd.c KSRCS =3D btdebug.c btmem.c hci.c l2cap.c l2cap_con.c rfcomm.c sdp.c t= cs.c \ - test.c bt_proc.c hci_vendor.c sec_client.c l2cap_sec.c rfcomm_= sec.c + test.c bt_proc.c hci_vendor.c sec_client.c l2cap_sec.c \ + rfcomm_sec.c unplug_test.c =20 CFLAGS +=3D -DBTD_USERSTACK =20 @@ -68,7 +69,8 @@ CFLAGS +=3D -DCONFIG_BLUETOOTH_UNPLUG_TEST endif =20 -all: links $(PROGS) +all: links + @make --no-print-directory $(PROGS) =20 unplugtest: @$(MAKE) --no-print-directory INCLUDE_UNPLUG_TEST=3D1 |
From: Peter K. <pk...@us...> - 2001-10-21 09:15:37
|
The following file was modified in apps/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added experimental to the list of sub-directories. The diff of the modified file(s): --- Makefile 2001/02/28 23:42:08 1.2 +++ Makefile 2001/10/21 09:15:36 1.3 @@ -1,3 +1,3 @@ include $(APPS)/Rules.elinux =20 -SUBDIRS =3D btd sdp_server userstack +SUBDIRS =3D experimental sdp_server userstack btd |
From: Peter K. <pk...@us...> - 2001-10-19 13:57:36
|
The following file was modified in : Name Old version New version Comment ---- ----------- ----------- ------- ChangeLog 1.1 Added The accompanying log: Initial version. |
From: Peter K. <pk...@us...> - 2001-10-19 13:39:42
|
The following file was modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- README 1.30 1.31=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Updated (finally) to match the current status of the stack somewhat better. The diff of the modified file(s): --- README 2001/04/27 14:52:17 1.30 +++ README 2001/10/19 13:39:40 1.31 @@ -1,126 +1,129 @@ =20 -Bluetooth Driver for Linux Kernel v2.0 and v2.2 ------------------------------------------------ - -These files are work in progress. For more information on Bluetooth=20 -on Linux see http://developer.axis.com where you can find the newest=20 -versions of the software. - -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -What has happened lately ------------------------- +Bluetooth Driver for Linux Kernel v2.0, v2.2 and v2.4 +----------------------------------------------------- =20 -8 Jan 2001 +These files are a work in progress. For more information on Bluetooth=20 +on Linux see http://sourceforge.net/projects/openbt/ where you can find +the newest versions of the software. =20 -* Made connect command available again (rf_conn/rf_disc/rf_send)=20 - (only use rfcomm when connect as client, since sdp client is=20 - still not implemented due to redesign in sdp). +See the ChangeLog file for list of all changes. =20 -* Fixed bugs in sdp browsing. +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 -* Fixed race problems in hci and btmem. +1) How to build and install the AXIS Bluetooth Stack +---------------------------------------------------- =20 -* Added blocking on all tty:s when doing connect/disconnect and added=20 - an ioctl which blocks until an rfcomm is up on a specific line. +# Unpack the archive: =20 -* Now uses a 'raw' interface in usermode to send any vendor specific HCI= =20 - commands down to the module. +tar xvfz <name of archive> =20 -* Now possible to open ttyBTC multiple times +# Create the Bluetooth stack module and all applications (both for use + with the kernel version of the stack and the user mode version): =20 -* Now it works to setup an rfcomm connection on any of ttyBT0-6 (line)=20 - and use it as a virtual serial port. +cd openbt +source init_env =20 -* Fixed bug in bluetooth.c which could cause the stack to stop receiving= =20 - data from the user mode application. +(See section 6 on how to compile for different Bluetooth HW) =20 -* Separated all vendor specific code into separate files. +make =20 -* Added security functionalities in HCI and IOCTLs for enabling=20 - authentication, handling linkkeys, pincodes etc in bluetooth.c +# Install the applications in /usr/local/bin and the SDP configuration + file in /etc (must be done as root): =20 -* Added functions in lower driver to cope with overruns on serial port. +make install =20 -* Fixed ip_forwarding when using pppd on usermode stack (ppp option=20 - ktune). Only works on pppd ver > 2.3.7. +# If the BT device nodes have not been created previously then do=20 + (as root): =20 -* Added pid file to stop multiple instances of btd running. +make devs =20 -* Improved error handling in both btd and kernel parts. +# Insert the module into the kernel (must be done as root): =20 -* Lots of bug fixes and smaller improvements to many to mention here. +insmod src/bt.o =20 +# To get debug messages in kernel start another window and issue: =20 -** Note 1 ** -This stack does not support using pcmcia drivers for any pcmcia based=20 -BT card and only supports the HCI interface towards that HW in terms of=20 -setting baudrate and other HW specific functions. However, if someone=20 -gets their hands on any pcmcia driver code for some bluetooth HW please -let us know or do it yourself :) +tail -f /var/log/messages=20 =20 -** Note 2 ** -Init option to btd (-i) is now removed and replaced by a define in=20 -btd.h and btconfig.h (kernel) which determines what type of init that=20 -should be done for each HW vendor (see section 6) +(or whatever file is set in /etc/syslog.conf) =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 -Please let us know if there are any unclear issues or errors in this=20 -README. Comments are appreciated and if there are someone that feels=20 -an urge of making it more complete please contact us or send us a text=20 -fragment and we will happily include it ! +2) Multi-Point Bluetooth Daemon application (btdm) +-------------------------------------------------- =20 -Best regards=20 -Bluetooth Team, -Axis Communications +2.1) How to start the btdm application? =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 -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + Both short and long options may be used whatever suits best. =20 + syntax: ./btdm [options] =20 -1) How to build and install the AXIS Bluetooth Stack ----------------------------------------------------- + options:=20 =20 -# Unpack the archive: + -u, --physdev <uart device> + sets which uart device that will be used by the stack + default: ttyS2 =20 -tar xvfz <name of archive> + -m, --modem + Use modem emulation (used when emulate modem in windows=20 + dialup.=20 + Can also be done from command line mode.=20 + default: on =20 -# Create the bluetooth stack module and all applications (both for use - with the kernel version of the stack and the user mode version): + -n, --local-name + prefix used for the local Bluetooth device name + default: nothing =20 -cd bluetooth -source init_env + -R, --reset + reset Bluetooth hardware before use + default: no reset =20 -(See section 6 on how to compile for different bluetooth HW) + -i, --initial-speed <speed | baudbase/divisor> + sets initial uart speed + default: 115200 baud =20 -make + -s, --speed <speed> + sets uart speed + 9600, 19200, 38400, 57600, 115200, 230400, 460800 + default: 115200 baud =20 -# Install the applications in /usr/local/bin and the SDP configuration - file in /etc (must be done as root): + -f, --noflow + force uart communication to not use CTS and RTS + default: flow control activated if defined hardware support = it =20 -make install + e.g if using module at 460800 baud and acting as server + ./btdm --speed 460800 =20 -# If the BT device nodes have not been created previously then do=20 - (as root): + if using non default devices + ./btdm --physdev /dev/ttyS2 [options...] =20 -make devs +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =20 -# Insert the module into the kernel (must be done as root): +2.2) How to setup a session between two units? =20 -insmod src/bt.o +Server side: =20 -# To get debug messages in kernel start another window and issue: +1. btdm --reset --speed 115200 =20 -tail -f /var/log/messages=20 +Client side: =20 -(or whatever file is set in /etc/syslog.conf) +1. bti --reset --speed 115200 +2. Connect to the other unit by executing + btcon -a <bd address> =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 +3) Bluetooth Daemon application (btd) +------------------------------------- =20 -2) Bluetooth Daemon application (btd)=20 + BTD IS OBSOLETE, AND SHOULD ONLY BE USED IN CASE BTDM DOES NOT + WORK AS EXPECTED. DO NOT EXPECT TO RECEIVE ANY SUPPORT FOR BTD. + ------------------------------------ =20 +3.1) How to start the btd application? + Both short and long options may be used whatever suits best. =20 syntax: ./btd [options] @@ -131,8 +134,8 @@ sets which uart device that will be used by the stack default: ttyS2 =20=09=20=20=20=20=20=20 - -b, --btdev <bluetooth device> - sets which bluetooth device that will be used from=20 + -b, --btdev <Bluetooth device> + sets which Bluetooth device that will be used from=20 application default: ttyBT0 =20 @@ -153,7 +156,7 @@ default: skip command line mode =20=20 -n, --local-name - prefix used for the local bluetooth device name + prefix used for the local Bluetooth device name default: nothing =20 "-r server", --server @@ -163,7 +166,7 @@ default: server =20 -R, --reset - reset bluetooth hardware before use + reset Bluetooth hardware before use default: no reset =20 -s, --speed <speed> @@ -181,7 +184,6 @@ Server listens on <:port>, client tries to connect to=20 <ipaddr:port>. (usermode stack only) =20 -=09=20=20=20=20=20=20 e.g if using module at 460800 baud and acting server ./btd --speed 460800 =20 @@ -201,12 +203,10 @@ same network Server : ./btd --cmdmode --tcpsock <:port>=20 Client : ./btd --cmdmode --tcpsocket <ipaddr:port> --client - -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =20 -3) What do the command menu options do ? ----------------------------------------- +3.2) What do the command menu options do in btd? =20 inq (inquiry scan) Performs an inquiry to see what other devices that are present @@ -252,12 +252,10 @@ quit =20 Just quit. - -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =20 -4) How to setup a session between two units --------------------------------------------- +3.3) How to setup a session between two units =20 Server side: =20 @@ -271,63 +269,52 @@ =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 - -5) How to use the stack in user mode instead of in the kernel +4) How to use the stack in user mode instead of in the kernel ------------------------------------------------------------- =20 -/* - * THE USERMODE STACK SHOULD ONLY BE USED FOR DEVELOPMENT AND - * TESTING OF BASIC STACK FUNCTIONALITIES AND DOES NOT PROVIDE - * THE FULL STACK FUNCTIONALITIES (blocking calls, multiple lines=20 - * etc etc). - */=20 + THE USERMODE STACK SHOULD ONLY BE USED FOR DEVELOPMENT AND + TESTING OF BASIC STACK FUNCTIONALITIES AND DOES NOT PROVIDE + THE FULL STACK FUNCTIONALITIES (blocking calls, multiple lines=20 + etc etc). =20 1) Build the applications according to the instructions above. =20 -2) Run btduser (as root) with the same options as with the standard +2) Run btduser (as root) with the same options as with the btd application (see above). =20 -If something isn't working look in /var/log/messages or whatever file is -syslogger is set to use (see /etc/syslog.conf)=20 +If something does not work, then look in /var/log/messages or whatever +file syslog is set to use (see /etc/syslog.conf)=20 =20 *** NOTE -- pppd must support running on pty:s (version >=3D 2.3.7) *** =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 - - -6) How do I setup the stack for different bluetooth hardware ------------------------------------------------------------- - -There are two files that needs to be changed =20 -Kernel : btconfig.h, set CONFIG_BLUETOOTH_<hardware> to whatever you are u= sing - -Usermode app : btd.c, set HW_CURRENT to whatever you are using=20 +5) How do I setup the stack for different Bluetooth hardware? +------------------------------------------------------------- =20 -** Note **=20 -If running usermode stack it is only necessary to change in btconfig.h +You need to modify btconfig.h, and define whichever of +CONFIG_BLUETOOTH_<hardware> that matches the hardware you are using. =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 -7) How to setup a session without any bluetooth hardware +6) How to setup a session without any Bluetooth hardware -------------------------------------------------------- =20 -To make the stack work without any hardware HCI_EMULATION must be=20 +To make the stack work without any hardware, HCI_EMULATION must be=20 switched on in the file btconfig.h and the stack must be recompiled. -You will see a note in the debug messages when starting the stack if hci +You will see a note in the debug messages when starting the stack if HCI emulation really is used or not. =20 ******** * Note * ******** =20 -The HCI emulation as of today simply converts some hci commands to the=20 -corresponding events and simply forwards all acl/sco data. +The HCI emulation as of today simply converts some HCI commands to the=20 +corresponding events and simply forwards all ACL/SCO data. If you get messages from the stack that something fails when initiating=20 -the stack it is because those hci commands are not supported in the=20 -hci emulator. -Anyone that wants are welcome to improve it and send us a patch. For=20 +the stack it is because those HCI commands are not supported in the=20 +HCI emulator. +Anyone who wants to is welcome to improve it and send us a patch. For=20 example, there could be network delays/ packet losses included and=20 different kinds of hardware can be simulated. =20 @@ -340,7 +327,7 @@ =20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =20 -7.1) Using a serial cable (null modem) +6.1) Using a serial cable (null modem) =20 Connect 2 Linux PC with a null modem cable, and start the btd=20 application as server as one side and btd as client on the other side. @@ -360,7 +347,7 @@ =20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =20 -7.2) Using a local unix socket on one computer +6.2) Using a local unix socket on one computer =20 Server side: 1. btd --cmdmode --unixsock @@ -374,7 +361,7 @@ =20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - =20 -7.3) Using a network tcp socket between two computers +6.3) Using a network tcp socket between two computers =20 if using the stack in user mode over a TCP socket. Do the following on separate computers connected to a network @@ -390,10 +377,9 @@ (BD address is ignored) =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 -8) It does not work, what am I doing wrong?=20 --------------------------------------------- +7) It does not work, what am I doing wrong?=20 +------------------------------------------- =20 FAQ=20 =20 @@ -423,106 +409,31 @@ pppd is started over /dev/ttyBT0 when a new rfcomm is discovered. If t= his=20 takes too long the data won't be lost. (Answer provided by Mattias Agr= en) =20 - - - o If you are having troubles with trashed data on the UART please look=20 at http://developer.axis.com/download/bluetooth/uart_problems =20 -o ... - -For debug when running in kernel look in /var/log/messages,=20 +For debug when running in kernel, look in /var/log/messages,=20 /var/log/debug or whatever file is specified in /etc/syslog.conf =20 If you think you have found a bug please switch on all debug in=20 btdebug.h and send the logs to blu...@ax... together with a=20 description of the problem. =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 - -9) OLD RELEASES - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 - -Nov 15 2000 - -*** Bug fixes after the Unplugfest 4 *** - -- Corrected C/R-bit in RFCOMM. -- Corrected browsing in SDP. -- Added all unplugtests in rfcomm and l2cap. -- Misc fixes in all layers. - -*** Other *** - -- Started restructuring of btd to make the application hardware=20 - independent and more readable. -- Restructuring will also be done in hci to make it hardware=20 - independent too. -- Added connect indication and disconnect indication in bluetooth.c. -- Added connection ID consisting of |PSM 16 bits|layer specific 16 bits|= =20 - The layerspecific field in RFCOMM is | line 8 bits | dlci 8 bits |. - In the other layers are the connection ID not used at all (yet). - -------------------------------------------------------------------------- - -Oct 30 2000 - -Finally, a new release! - -There has been quite a few changes and it is hard to include everything -in this text. However, we will try to make a quick introduction of the=20 -new functionality. - - -*** Kernel Stack *** - -- We now support the use of several tty:s (currently 7, ttyBT0-ttyBT6)=20 - and the control of the stack has been moved to a dedicated tty=20 - called ttyBTC (minor 7) -- Improved interface between user mode tty and kernel. -- More ioctls for HCI commands -- Improved SDP which now uses a user mode database for queries. -- Added functionality for choosing different HW (init stuff) -- Added scheduling of cmd queueing for USB -- Lots of bug fixes - -*** Comment *** - - As of today we have no client functionality in SDP due to changes - in the design. However, as server Serial/LAN/DialUP profile is=20 - supported. This will be fixed soon. - -*** User Mode Applications *** - -- New SDP server database application using XML files.=20 - See /apps/sdp_server/README for details. -- Command line history -- Now pppd works together with the user mode stack (using pty:s) -- Using syslog for most debug (see /var/log/messages) -- Added functionality to run usermode stack on both a local UNIX socket - and on a network socket (used with hardware emulation, HCI_EMULATION) - Please let us know if there are any unclear issues or errors in this=20 README. Comments are appreciated and if there are someone that feels=20 an urge of making it more complete please contact us or send us a text=20 fragment and we will happily include it ! =20 -There are still patches left to include but due to heavy workload we=20 -have not had time to add them all. However, in the future if a patch=20 -is sent to us reasonably fast (within 2 weeks) after a new release we=20 -should be able to merge it in the stack. - Finally, we would also like to thank all contributors on the stack for=20 -comments and patches etc. Once we get our open CVS up and running this=20 -stack should be very useful for any bluetooth developer !! +comments and patches etc. =20 Keep up the good work ! =20 Best regards=20 -Bluetooth Team, -Axis Communications +The Bluetooth Team, +Axis Communications AB =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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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-10-18 15:56:56
|
The following file was modified in apps/bluetooth/sdp_server: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use -MMD instead of -MD to generate dependency files, as -MMD does not generate dependencies to system includes. The diff of the modified file(s): --- Makefile 2001/06/18 13:59:58 1.11 +++ Makefile 2001/10/18 15:56:25 1.12 @@ -22,7 +22,7 @@ =20 SRCS =3D sdp_server.c sdp_parser.c =20 -CFLAGS +=3D -I$(INCDIR) -MD +CFLAGS +=3D -I$(INCDIR) -MMD LDFLAGS +=3D -L$(LIBDIR) LDLIBS +=3D -lxmlparse -lxmltok =20 |
From: Peter K. <pk...@us...> - 2001-10-18 15:56:56
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use -MMD instead of -MD to generate dependency files, as -MMD does not generate dependencies to system includes. The diff of the modified file(s): --- Makefile 2001/10/10 16:22:10 1.10 +++ Makefile 2001/10/18 15:56:25 1.11 @@ -46,7 +46,7 @@ CFLAGS +=3D -DCONFIG_BLUETOOTH_UNPLUG_TEST endif =20 -CFLAGS +=3D -MD +CFLAGS +=3D -MMD =20 all: $(PROGS) =20 |
From: Peter K. <pk...@us...> - 2001-10-18 15:56:55
|
The following file was modified in apps/bluetooth/btd: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use -MMD instead of -MD to generate dependency files, as -MMD does not generate dependencies to system includes. The diff of the modified file(s): --- Makefile 2001/05/07 11:25:59 1.10 +++ Makefile 2001/10/18 15:56:25 1.11 @@ -33,7 +33,7 @@ CFLAGS +=3D -DHAVE_READLINE -I$(prefix)/include endif =20 -CFLAGS +=3D -MD +CFLAGS +=3D -MMD =20 all: $(PROGS) =20 |
From: Peter K. <pk...@us...> - 2001-10-18 15:56:26
|
The following file was modified in apps/bluetooth/userstack: Name Old version New version Comment ---- ----------- ----------- ------- Makefile 1.24 1.25=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use -MMD instead of -MD to generate dependency files, as -MMD does not generate dependencies to system includes. The diff of the modified file(s): --- Makefile 2001/07/31 20:02:33 1.24 +++ Makefile 2001/10/18 15:56:25 1.25 @@ -22,7 +22,7 @@ srcdir =3D $(ELINUXDIR)/drivers/char/bluetooth incdir =3D $(ELINUXDIR)/include/linux/bluetooth =20 -CFLAGS +=3D -I$(prefix)/include -MD +CFLAGS +=3D -I$(prefix)/include -MMD LDFLAGS +=3D -L$(prefix)/lib else # In stand-alone tarball |
From: Peter K. <pk...@us...> - 2001-10-18 15:49:26
|
The following files were modified in linux/drivers/char/bluetooth: Name Old version New version Comment ---- ----------- ----------- ------- rfcomm.c 1.126 1.127=20=20=20=20=20=20=20=20=20=20=20 test.c 1.30 1.31=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Made it compile for user mode again. The diff of the modified file(s): --- rfcomm.c 2001/10/16 14:59:29 1.126 +++ rfcomm.c 2001/10/18 15:49:25 1.127 @@ -65,6 +65,9 @@ #include <stdlib.h> #include <string.h> #include <errno.h> + +#include <asm/unaligned.h> + #include "include/rfcomm.h" #include "include/rfcomm_sec.h" #include "include/btmem.h" --- test.c 2001/10/16 16:23:47 1.30 +++ test.c 2001/10/18 15:49:25 1.31 @@ -54,6 +54,7 @@ #include <linux/bluetooth/unplug_test.h> #else #include <string.h> +#include <errno.h> =20 #include "include/test.h" #include "include/btcommon.h" |
From: Peter K. <pk...@us...> - 2001-10-16 16:56:26
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- modememul.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Do not close btfd if bt_isconnected() returns false, as it is not open at that point. * Corrected exit values. The diff of the modified file(s): --- modememul.c 2001/10/16 16:18:49 1.14 +++ modememul.c 2001/10/16 16:56:25 1.15 @@ -120,8 +120,8 @@ speedstr =3D argv[2]; if(sscanf(argv[1], "/dev/ttyBT%d", &line) !=3D 1) { - syslog(LOG_INFO, "Invalid arguments to modememulator\n"); - exit(0); + fprintf(stderr, "Invalid arguments to modememulator\n"); + exit(1); }=20=20=20=20 =20 while (done !=3D START_PPP) @@ -130,9 +130,8 @@ =20 if(!bt_isconnected(-1, line)) { - D(syslog(LOG_INFO, "No BT connection, stopping modememulator\n")); - close(btfd); - _exit(0); + D(syslog(LOG_INFO, "No BT connection, stopping modememulator")); + exit(0); } =20 if ((btfd =3D open(argv[1], O_RDWR, 0)) < 0) @@ -156,7 +155,7 @@ execvp(PPPDCMD, argv /*pppd_options*/); =20=20=20 fprintf(stderr, "%s: no such file or directory\n", PPPDCMD); - _exit(0); + exit(1); } =20 int modem_emulator(int bt_fd) |
From: Anders J. <and...@us...> - 2001-10-16 16:37:52
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.40 1.41=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * bt_testcmd should now return correct errorcodes. * bt_isconnected accepts -1 as filedescriptor and will then open the=20 controltty to allow the ioctl to be sent. The diff of the modified file(s): --- bt_if.c 2001/10/15 08:48:53 1.40 +++ bt_if.c 2001/10/16 16:15:34 1.41 @@ -328,11 +328,12 @@ } =20 /* Check whether this line is lower connected in stack (rfcomm ready) */ -int bt_isconnected(int bt_fd, int line) +int bt_isconnected(int bt_cfd, int line) { + int fd =3D (bt_cfd < 0 ? bt_openctrl() : bt_cfd); int ret; #ifndef BT_USERSTACK - if ((ret =3D ioctl(bt_fd, BTISLOWERCONNECTED, &line)) < 0) + if (fd < 0 || (ret =3D ioctl(fd, BTISLOWERCONNECTED, &line)) < 0) { perror(__FUNCTION__); exit(1); @@ -341,6 +342,10 @@ fprintf(stderr, __FUNCTION__ ": not yet implemented...\n"); ret =3D -1; #endif + if (bt_cfd < 0) + { + close(fd); + } return ret; } =20 @@ -613,7 +618,7 @@ else printf("Success!\n"); #else - test_process_cmd(&tmp[1], tmp[0]); + ret_val =3D test_process_cmd(&tmp[1], tmp[0]); #endif return ret_val; } |
From: Anders J. <and...@us...> - 2001-10-16 16:37:51
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_errno.h 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20 bttest.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * bttest can now run with arguments, as example bttest 'rf_conn xx:xx:xx:xx= :xx:xx 1 0' will start bttest, run the cmd and then exit. * Added HCI_INQUIRY_FAILED. The diff of the modified file(s): --- bt_errno.h 2001/10/12 12:01:16 1.3 +++ bt_errno.h 2001/10/16 16:26:43 1.4 @@ -107,3 +107,4 @@ #define BT_ALREADYCONNECTED 0x2 #define BT_TIMEOUT 0x3 #define BT_LINE_BUSY 0x4 +#define BT_INQ_FAILED 0x5 --- bttest.c 2001/10/10 14:56:00 1.22 +++ bttest.c 2001/10/16 16:26:43 1.23 @@ -128,6 +128,7 @@ }; =20 static unsigned char hotlist[10][6]; +static int quit_bttest; =20 #if !defined(HAVE_READLINE) && !defined(HAVE_READLINE_READLINE) static void read_history(char *hist_file_name); @@ -150,10 +151,11 @@ } =20 int -main(void) +main(int argc, char **argv) { - int bt_cfd, i , j; + int bt_cfd, i , j, tmp; FILE *hotlist_fd; + quit_bttest =3D 0; =20 /* Open BT ctrl device */=20=20 if ((bt_cfd =3D bt_openctrl()) < 0) @@ -191,6 +193,17 @@ } } =20=20=20 + if(argc > 1) + { + for(i =3D 1 ; i < argc ; i++) + { + if((tmp =3D process_cmd(argv[i], bt_cfd)) < 0) + { + return -1; + } + } + return 0; + } =20 read_history(BTD_HISTORY_FILE);=20=20 =20=20=20 @@ -198,7 +211,6 @@ =20=20=20 while (1) { - int tmp; char *tmp_char, hotlist_entry; char tmp_line[200]; char *line =3D (char*) readline("> "); @@ -226,7 +238,7 @@ tmp =3D process_cmd(line, bt_cfd); } =20 - if (tmp =3D=3D QUIT_BTD) + if (quit_bttest =3D=3D QUIT_BTD) { break; } @@ -245,7 +257,7 @@ =20 if (!strncmp(buf, "quit", 4)) { - return QUIT_BTD; + quit_bttest =3D QUIT_BTD; } else if (sscanf(buf, "rf_conn %x:%x:%x:%x:%x:%x %d %d", &tmp[0], &tmp[1], &tmp[2], @@ -284,7 +296,7 @@ } else if (sscanf(buf, "inq %d %d", &tmp[0], &tmp[1]) =3D=3D 2) { - bt_inquiry(bt_cfd, tmp[0], tmp[1]); + retval =3D bt_inquiry(bt_cfd, tmp[0], tmp[1]); } else if (sscanf(buf, "rf_send %d %d %d", &i, &repeat, &line) =3D=3D 3) { @@ -295,7 +307,7 @@ btfd =3D open(dev, O_RDWR | O_NOCTTY); =20 if (btfd > 0) - bt_send(btfd, i, repeat); + return bt_send(btfd, i, repeat); else { perror("bt_send"); |
From: Anders J. <and...@us...> - 2001-10-16 16:37:48
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- modememul.c 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * Made the emulator check if we got any BT-connection to prevent it from=20 starting on a disconnected line. The diff of the modified file(s): --- modememul.c 2001/10/03 17:48:50 1.13 +++ modememul.c 2001/10/16 16:18:49 1.14 @@ -58,6 +58,7 @@ =20 #include "btd.h" #include "bt_misc.h" +#include "bt_if.h" =20 #define D(x) //x =20 @@ -111,15 +112,28 @@ int btfd; char *speedstr; int done =3D 0; + int line =3D -1; =20=20=20 setsid(); /* become session leader (to catch SIGHUPS) */=20=20 init_sighandler(); =20 speedstr =3D argv[2]; + if(sscanf(argv[1], "/dev/ttyBT%d", &line) !=3D 1) + { + syslog(LOG_INFO, "Invalid arguments to modememulator\n"); + exit(0); + }=20=20=20=20 =20 while (done !=3D START_PPP) { syslog(LOG_INFO, "Starting modem emulator on %s", argv[1]); + + if(!bt_isconnected(-1, line)) + { + D(syslog(LOG_INFO, "No BT connection, stopping modememulator\n")); + close(btfd); + _exit(0); + } =20 if ((btfd =3D open(argv[1], O_RDWR, 0)) < 0) { |
From: Peter K. <pk...@us...> - 2001-10-16 16:37:44
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_misc.c 1.22 1.23=20=20=20=20=20=20=20=20=20=20=20=20 bt_misc.h 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.c 1.30 1.31=20=20=20=20=20=20=20=20=20=20=20=20 bt_vendor.h 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.31 1.32=20=20=20=20=20=20=20=20=20=20=20=20 btinit.c 1.16 1.17=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Added option (-f) to disable flow control using CTS/RTS (suggested by Alain Paschoud). The diff of the modified file(s): --- bt_misc.c 2001/10/16 10:25:36 1.22 +++ bt_misc.c 2001/10/16 15:02:19 1.23 @@ -437,9 +437,9 @@ t.c_oflag =3D 0; /* turn off output processing */ t.c_lflag =3D 0; /* no local modes */ =20=20=20 - if (flow) + if (flow =3D=3D USE_FLOW_CTRL) t.c_cflag |=3D CRTSCTS; - else + else if (flow =3D=3D USE_NO_FLOW) t.c_cflag &=3D ~CRTSCTS; =20=20=20 if (tcsetattr(fd, TCSANOW, &t) < 0) --- bt_misc.h 2001/10/10 16:20:40 1.11 +++ bt_misc.h 2001/10/16 15:02:20 1.12 @@ -44,6 +44,7 @@ =20 #define USE_NO_FLOW 0=20 #define USE_FLOW_CTRL 1 +#define USE_CURRENT_FLOW 2 =20 #define CLIENT 0 #define SERVER 1 --- bt_vendor.c 2001/10/10 16:22:10 1.30 +++ bt_vendor.c 2001/10/16 15:02:20 1.31 @@ -58,62 +58,62 @@ =20 #define D(x) //x =20 -static void csr_init_phys(int fd); +static void csr_init_phys(int fd, int flow_control); static void csr_init_hw(int bt_cfd, int phys_fd, const char *speedstr); -static void digianswer_init_phys(int fd); +static void digianswer_init_phys(int fd, int flow_control); static void digianswer_init_hw(int bt_cfd, int phys_fd, const char *speeds= tr); -static void ericsson_init_phys(int fd); +static void ericsson_init_phys(int fd, int flow_control); static void ericsson_init_hw(int bt_cfd, int phys_fd, const char *speedstr= ); -static void infineon_init_phys(int fd); +static void infineon_init_phys(int fd, int flow_control); static void infineon_init_hw(int bt_cfd, int phys_fd, const char *speedstr= ); -static void usb_init_phys(int fd); +static void usb_init_phys(int fd, int flow_control); static void usb_init_hw(int bt_cfd, int phys_fd, const char *speedstr); -static void generic_init_phys(int fd); +static void generic_init_phys(int fd, int flow_control); static void generic_init_hw(int bt_cfd, int phys_fd, const char *speedstr); -static void no_init_phys(int fd); +static void no_init_phys(int fd, int flow_control); static void no_init_hw(int bt_cfd, int phys_fd, const char *speedstr); -static void unknown_init_phys(int fd); +static void unknown_init_phys(int fd, int flow_control); static void unknown_init_hw(int bt_cfd, int phys_fd, const char *speedstr); =20 -static void csr_change_if(int bt_cfd, int phys_fd, const char *speedstr); +static void csr_change_if(int bt_cfd, int phys_fd, const char *speedstr, i= nt flow_control); static int csr_set_max_power(int bt_cfd, short max_power); =20 void -init_phys(int fd) +init_phys(int fd, int flow_control) { switch (hw_vendor()) { case HW_CSR: - csr_init_phys(fd); + csr_init_phys(fd, flow_control); break; =20 case HW_DIGIANSWER: - digianswer_init_phys(fd); + digianswer_init_phys(fd, flow_control); break; =20 case HW_ERICSSON: - ericsson_init_phys(fd); + ericsson_init_phys(fd, flow_control); break; =20 case HW_INFINEON: - infineon_init_phys(fd); + infineon_init_phys(fd, flow_control); break; =20 case HW_USB: - usb_init_phys(fd); + usb_init_phys(fd, flow_control); break; =20 case HW_GENERIC: - generic_init_phys(fd); + generic_init_phys(fd, flow_control); break; =20 case HW_NO_INIT: - no_init_phys(fd); + no_init_phys(fd, flow_control); break; =20 case HW_UNKNOWN: default: - unknown_init_phys(fd); + unknown_init_phys(fd, flow_control); break; } } @@ -179,7 +179,7 @@ */ =20 void -init_failed(int bt_cfd, int phys_fd, const char *speedstr) +init_failed(int bt_cfd, int phys_fd, const char *speedstr, int flow_contro= l) { =20 static int did_restart =3D 0; /* only try once */=20=20 @@ -196,7 +196,7 @@ { case HW_CSR: /* Try changing interface BCSP<->H4 */ - csr_change_if(bt_cfd, phys_fd, speedstr); + csr_change_if(bt_cfd, phys_fd, speedstr, flow_control); did_restart =3D 1; =20 /* Restart btd */ @@ -261,10 +261,10 @@ =20 /* Set the phys device to CSR default, 115200 */=20 void -csr_init_phys(int fd) +csr_init_phys(int fd, int flow_control) { D(syslog(LOG_INFO, "Setting default speed 115200")); - fd_setup(fd, "115200", USE_FLOW_CTRL); + fd_setup(fd, "115200", flow_control); } =20 /* @@ -331,21 +331,21 @@ * Switches host interface in CSR HW (H4<->BCSP)=20 */ =20 -void csr_change_if(int bt_cfd, int phys_fd, const char *speedstr) +void csr_change_if(int bt_cfd, int phys_fd, const char *speedstr, int flow= _control) { /* 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, speedstr); + csr_bcsp_to_h4(bt_cfd, phys_fd, speedstr, flow_control); } else { - csr_h4_to_bcsp(bt_cfd, phys_fd, speedstr); + csr_h4_to_bcsp(bt_cfd, phys_fd, speedstr, flow_control); } } =20 -void csr_bcsp_to_h4(int bt_cfd, int phys_fd, const char *speedstr) +void csr_bcsp_to_h4(int bt_cfd, int phys_fd, const char *speedstr, int flo= w_control) { unsigned short ps_parbuf[10]; =20 @@ -355,9 +355,9 @@ bt_bcsp_mode(bt_cfd, 1); =20 if (speedstr) - fd_setup(phys_fd, speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, speedstr, flow_control); else - init_phys(phys_fd); + init_phys(phys_fd, flow_control); =20 reset_hw(); =20 @@ -413,7 +413,7 @@ shutdown_stack(bt_cfd); } =20 -void csr_h4_to_bcsp(int bt_cfd, int phys_fd, const char *speedstr) +void csr_h4_to_bcsp(int bt_cfd, int phys_fd, const char *speedstr, int flo= w_control) { unsigned short ps_parbuf[10]; =20 @@ -423,9 +423,9 @@ bt_bcsp_mode(bt_cfd, 0); =20 if (speedstr) - fd_setup(phys_fd, speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, speedstr, flow_control); else - init_phys(phys_fd); + init_phys(phys_fd, flow_control); =20 reset_hw();=20=20=20=20 =20 @@ -511,8 +511,7 @@ bt_set_baudrate(bt_cfd, speedstr); =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, speedstr, USE_FLOW_CTRL); - + fd_setup(phys_fd, speedstr, USE_CURRENT_FLOW); tcflush(phys_fd, TCIOFLUSH); =20 D(syslog(LOG_INFO, "Baudrate set")); @@ -553,9 +552,9 @@ =20 /* Set the phys device to Digianswer default, 9600 */=20 void -digianswer_init_phys(int fd) +digianswer_init_phys(int fd, int flow_control) { - fd_setup(fd, "9600", USE_FLOW_CTRL); + fd_setup(fd, "9600", flow_control); } =20 void @@ -578,7 +577,7 @@ } =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, speedstr, USE_CURRENT_FLOW); tcflush(phys_fd, TCIOFLUSH); } } @@ -589,9 +588,9 @@ =20 /* Set the phys device to Ericsson default speed, 57600 */ void -ericsson_init_phys(int fd) +ericsson_init_phys(int fd, int flow_control) { - fd_setup(fd, "57600", USE_FLOW_CTRL); + fd_setup(fd, "57600", flow_control); } =20 void @@ -617,7 +616,7 @@ usleep(10000); =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, speedstr, USE_CURRENT_FLOW); tcflush(phys_fd, TCIOFLUSH); } } @@ -626,9 +625,10 @@ /* 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*/ =20 -void infineon_init_phys(int fd) +void +infineon_init_phys(int fd, int flow_control) { - fd_setup(fd, "115200", USE_FLOW_CTRL); + fd_setup(fd, "115200", flow_control); } =20 void @@ -648,7 +648,7 @@ bt_set_baudrate(bt_cfd, speedstr); =20 /* Now set phys device speed to whatever HW was set to use */ - fd_setup(phys_fd, speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, speedstr, USE_CURRENT_FLOW); tcflush(phys_fd, TCIOFLUSH); } } @@ -658,9 +658,9 @@ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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) +usb_init_phys(int fd, int flow_control) { - fd_setup(fd, "115200", USE_FLOW_CTRL); + fd_setup(fd, "115200", flow_control); } =20 void @@ -689,9 +689,9 @@ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 -generic_init_phys(int fd) +generic_init_phys(int fd, int flow_control) { - fd_setup(fd, "115200", USE_FLOW_CTRL); + fd_setup(fd, "115200", flow_control); } =20 void @@ -712,7 +712,7 @@ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 -no_init_phys(int fd) +no_init_phys(int fd, int flow_control) { } =20 @@ -726,7 +726,7 @@ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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 -unknown_init_phys(int fd) +unknown_init_phys(int fd, int flow_control) { printf("ERROR: init_phys() not implemented!\n"); } --- bt_vendor.h 2001/10/10 16:22:10 1.11 +++ bt_vendor.h 2001/10/16 15:02:20 1.12 @@ -65,15 +65,15 @@ */ =20 void init_hw(int bt_cfd, int phys_fd, const char *speedstr); -void init_phys(int fd); -void init_failed(int bt_cfd, int phys_fd, const char *speedstr); +void init_phys(int fd, int flow_control); +void init_failed(int bt_cfd, int phys_fd, const char *speedstr, int flow_c= ontrol); =20 int bt_set_max_power(int bt_cfd, short max_power); =20 int hw_vendor(void); =20 -void csr_bcsp_to_h4(int bt_cfd, int phys_fd, const char *speedstr); -void csr_h4_to_bcsp(int bt_cfd, int phys_fd, const char *speedstr); +void csr_bcsp_to_h4(int bt_cfd, int phys_fd, const char *speedstr, int flo= w_control); +void csr_h4_to_bcsp(int bt_cfd, int phys_fd, const char *speedstr, int flo= w_control); =20 void csr_pskey(int bt_cfd, unsigned short ps_key, unsigned short rw_mode,= =20 unsigned short *ps_vals, unsigned short n_pars); --- btd.c 2001/10/15 13:50:39 1.31 +++ btd.c 2001/10/16 15:02:20 1.32 @@ -76,6 +76,10 @@ 9600, 19200, 38400, 57600, 115200, 230400, 460800 default: 115200 baud=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20 + -f, --noflow + force uart communication to not use CTS and RTS + default: flow control activated if defined hardware support it + e.g ./btdm --reset --speed 460800 --physdev /dev/ttyS0 --local-name OpenBT ./btdm --reset --speed 1000000/1 --physdev /dev/ttyS0 --local-name Open= BT @@ -172,6 +176,8 @@ static int modem_emul =3D 1; /* default modem emulation is enabled */ static char *init_hw_speedstr =3D NULL; /* not set */ =20 +static int flow_control =3D USE_FLOW_CTRL; + static char *physdev =3D DEFAULT_PHYS_DEV; static char *speedstr =3D DEFAULT_SPEED; static char local_name[LOCAL_NAME_LENGTH+1]; /* 'friendly' name in HW modu= le */ @@ -185,6 +191,7 @@ /* long option list */ static struct option long_options[] =3D { + { "noflow", 1, NULL, 'f' }, /* do not use flow control */ { "initial-speed", 1, NULL, 'i' }, /* initial uart speed */ { "physdev", 1, NULL, 'u' }, /* phys device used from stack */ { "modem-emul", 1, NULL, 'm' }, @@ -223,11 +230,17 @@ } =20=20=20 /* now parse options */ - while ((opt =3D getopt_long(argc, argv, "i:m:nRs:u:", + while ((opt =3D getopt_long(argc, argv, "fi:m:nRs:u:", long_options, &option_index)) !=3D -1) { switch(opt) { + case 'f': + /* do not use flow control */ + flow_control =3D USE_NO_FLOW; + D(syslog(LOG_INFO, "no flow control")); + break; + case 'i': /* uart device */ init_hw_speedstr =3D optarg; @@ -285,9 +298,9 @@ =20 /* Sets initial HW baudrate */ if (init_hw_speedstr !=3D NULL) - fd_setup(phys_fd, init_hw_speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, init_hw_speedstr, flow_control); else - init_phys(phys_fd); + init_phys(phys_fd, flow_control); =20=20 /* Set the current tty to the bluetooth discpline */ set_bt_line_disc(phys_fd, bt_disc, physdev); @@ -306,7 +319,7 @@ 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_speedstr); + init_failed(bt_cfd, phys_fd, init_hw_speedstr, flow_control); } } =20 --- btinit.c 2001/10/03 17:48:06 1.16 +++ btinit.c 2001/10/16 15:02:20 1.17 @@ -70,6 +70,10 @@ 9600, 19200, 38400, 57600, 115200, 230400, 460800 default: 115200 baud=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20 + -f, --noflow + force uart communication to not use CTS and RTS + default: flow control activated if defined hardware support it + e.g ./bti --reset --speed 460800 --physdev /dev/ttyS0 --local-name OpenBT ./bti --reset --speed 1000000/1 --physdev /dev/ttyS0 --local-name OpenBT @@ -110,6 +114,7 @@ static const char *init_hw_speedstr =3D NULL; /* not set */ static int do_hwinit =3D 1; /* do vendor specific initialization */ static int do_reset =3D 0; /* reset hw using I/O pins */ +static int flow_control =3D USE_FLOW_CTRL; static sigjmp_buf jmpbuffer; /* used to jump back in program after doing r= eset */ static int sdpsrv_pid =3D 0; int phys_fd =3D -1; /* physical device e.g ttyS0 */ @@ -117,6 +122,7 @@ /* long option list */ static struct option long_options[] =3D { + { "noflow", 1, NULL, 'f' }, /* do not use flow control */ { "initial-speed", 1, NULL, 'i' }, /* initial uart speed */ { "physdev", 1, NULL, 'u' }, /* phys device used from stack */ { "local-name", 1, NULL, 'n' }, /* set local bluetooth name */ @@ -149,11 +155,17 @@ } =20 /* now parse options */ - while ((opt =3D getopt_long(argc, argv, "i:nRs:u:", + while ((opt =3D getopt_long(argc, argv, "fi:nRs:u:", long_options, &option_index)) !=3D -1) { switch(opt) { + case 'f': + /* do not use flow control */ + flow_control =3D USE_NO_FLOW; + D(syslog(LOG_INFO, "no flow control")); + break; + case 'i': /* uart device */ init_hw_speedstr =3D optarg; @@ -207,9 +219,9 @@ /* Sets initial HW baudrate */ =20 if (init_hw_speedstr !=3D NULL) - fd_setup(phys_fd, init_hw_speedstr, USE_FLOW_CTRL); + fd_setup(phys_fd, init_hw_speedstr, flow_control); else - init_phys(phys_fd); + init_phys(phys_fd, flow_control); =20 /* Set the current tty to the bluetooth discpline */ set_bt_line_disc(phys_fd, bt_disc, physdev); @@ -228,7 +240,7 @@ 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_speedstr); + init_failed(bt_cfd, phys_fd, init_hw_speedstr, flow_control); } } =20 |