|
From: Mattias A. <mat...@us...> - 2001-03-21 17:29:56
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.h 1.1 1.2=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: added return value on bt_disconnect changed defines for l2cap error codes changed ioctl define for sending raw hci data minor changes The diff of the modified file(s): --- bt_if.h 2001/03/02 10:59:57 1.1 +++ bt_if.h 2001/03/21 17:29:55 1.2 @@ -92,10 +92,12 @@ #define MSG_LAYER_TCS 8 =20 /* Result in responses in L2CAP */ -#define RES_PSMNEG 0x02 -#define RES_SECNEG 0x03 -#define RES_NOSRC 0x04 +#define L2CAP_PSMNEG 0x02 +#define L2CAP_SECNEG 0x03 +#define L2CAP_NOSRC 0x04 =20 +#define L2CAP_CON_UNRESPONSIVE 0xf1 + /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ /* IF Macros */ =20 @@ -185,8 +187,10 @@ =20 #define HCISETBAUDRATE _IOW(BT_IOC_MAGIC, 0x70, int) #define HCIWRITEBDADDR _IOW(BT_IOC_MAGIC, 0x71, unsigned char[6]) -#define HCISENDRAWDATA _IOW(BT_IOC_MAGIC, 0x72, unsigned char[256]) =20 +/* | len 1 byte | 4 bytes hci header | data (max 256) | */ +#define HCISENDRAWDATA _IOW(BT_IOC_MAGIC, 0x72, unsigned char[261]) + /* Used to calculate opcode for HCI commands using raw interface */ #define OPCODE_MSB(ocf, ogf) ((ocf) & 0xff) #define OPCODE_LSB(ocf, ogf) (((ocf) >> 8) | (((ogf) & 0x3f) << 2)) @@ -245,21 +249,23 @@ */ =20 int bt_connect(int bt_fd, unsigned char *bd, unsigned int con_id); -void bt_disconnect(int bt_fd, unsigned int con_id); +int bt_disconnect(int bt_fd, unsigned int con_id); =20 void bt_waitline(int bt_fd, int line); void bt_waitconnection(int bt_fd, int line); void bt_waitnewconnections(int bt_fd); int bt_isconnected(int bt_cfd, int line); int bt_send(int fd, int len, int repeat); +void bt_showstatus(void); =20 /*=20 * HCI command functions=20 */ =20 +int bt_send_raw_hci(int bt_cfd, unsigned char *data, char len); void bt_inquiry(int bt_cfd, int nbr_rsp, int t); int bt_set_baudrate(int bt_cfd, int spd); -void bt_set_bd_addr(int bt_cfd, int* bd); +void bt_set_bd_addr(int bt_cfd, unsigned char *bd); void read_local_bd(int bt_cfd, unsigned char *bd_addr); void read_remote_bd(int bt_cfd, unsigned char *bd_addr); void role_switch(int bt_cfd, unsigned char *bd_addr, int role); @@ -270,6 +276,9 @@ unsigned char major_class,=20 unsigned char minor_class,=20 unsigned char format); + +void enable_dut(int bt_cfd); + =20 /* Sets friendly name in HW to hostname */ void set_local_name(int bt_cfd, const char *local_name); |