[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] _IOW(BT_IOC_MAGIC, 0x58, unsigned char[8]) ..!



Sir,
    I tried the format you have told,but still Iam not
able to set the link supervision timeout.My dmesg on
BT dev board shows the following error even if the
device is connected:
BT SYS: ERROR: process_return_param:    
WRITE_LINK_SUPERVISION_TO: No Connection
    The following are the macro for this parameter and
the function bt_write_link_supervision_to.Could you
please tell me how can I use this function correctly..
    Can I define my timeout as u_int32_t timeout = 20
in this case??

#define HCIWRITELINKSUPERVISIONTO _IOW(BT_IOC_MAGIC,
0x58, unsigned char[8])

void
bt_write_link_supervision_to(int bt_cfd, unsigned
char* link_to)
{
#ifndef BTD_USERSTACK
  if (ioctl(bt_cfd, HCIWRITELINKSUPERVISIONTO,
link_to) < 0)
  {
    perror(__FUNCTION__);
  }
#else
  fprintf(stderr, __FUNCTION__ ": Not yet
implemented...\n");
#endif
}
         The following is my dmesg...
       
bd (6):
0x00 0xde 0x17 0xc6 0x10 0x00
l2ca_connect_req: wait baseband, sleep on wq
0xc03d2c33
 
hci_link_key_request_negative_reply:  BD_addr (6):
0x00 0xde 0x17 0xc6 0x10 0x00
hci_link_key_request_negative_reply: Returned from
send_secblock
 
hci_pin_code_request_reply: New pin is
 (4):
0x30 0x30 0x30 0x30
 
hci_pin_code_request_reply:  BD_addr (6):
0x00 0xde 0x17 0xc6 0x10 0x00
 
hci_pin_code_request_reply:  pin (4):
0x30 0x30 0x30 0x30
lp_connect_cfm (pos), wake up wq 0xc03d2c33
l2ca_connect_req: wait baseband, woke up !
l2ca_connect_req: wait rsp, sleep on wq 0xc03d2c33
rfcomm_connect_pnd : reason 2
l2cap con rsp, wake up wq 0xc03d2c33
 
l2cap options:  (0):
l2ca_connect_req: wait rsp, woke up !
BT SYS: ERROR: process_return_param:
WRITE_LINK_SUPERVISION_TO: No Connection
 


--- Peter Kjellerstedt <peter.kjellerstedt@xxxxxxx.com> 
> 
> Call it as:
> 
> 	u_int32_t timeout = 20;
> 	bt_write_link_supervision_to(bt_cfd, (unsigned
> char*)&timeout);
> 
> (And yes, the API for those functions sucks.)
> 
> //Peter


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com