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

Re: [bluetooth-dev] connecting to AXIS 9010




Hi, 
you can't schedule (which is what happens when using send_cmd_block in 
hci_pin_code_ ... cmd) when your not in the context of a user mode process. 
Try using send_cmd() instead of send_cmd_block() in function 
hci_pin_code_request_reply() and let me know how you progress.
If it doesn't work you need to create a simple btsec app which 
in turn calls the hci_pin_code_... function (see previous mail
about this matter).

brgds
Mattias

> -----Original Message-----
> From: Andreas Petralia [mailto:petralia@xxxxxxx.ch]
> Sent: den 16 juli 2001 12:22
> To: bluetooth-dev@xxxxxxx.com
> Subject: [bluetooth-dev] connecting to AXIS 9010 
> 
> 
> hi all
> 
> i can almost connect to the AXIS 9010 gateway, but i have problem with
> the PIN_CODE_REQUEST:
> --------------------------------------------------------------
> ----------------
> ...
> ...
> HCI: process_event, REMOTE_NAME_REQUEST_COMPLETE AXIS 9010
> (129.132.164.116)
> HCI: send_cmd_queue, start: Num_HCI_Command_Packets=1
> BT DATA <--|X|      8
> HCI: send_cmd_queue, end : 0 cmds left in queue
> HCI: send_acl_data_task, 0 bytes
> BT DATA -->|X|      9
> hci_receive_data, hci-9
> HCI: hci_receive_data, WAIT_FOR_PACKET_TYPE
> HCI: hci_receive_data, WAIT_FOR_EVENT_TYPE
> HCI: hci_receive_data, WAIT_FOR_EVENT_LENGTH
> HCI: process_event, COMMAND_COMPLETE
> HCI: <CC>
> process_return_param, WRITE_LINK_POLICY_SETTINGS
>  HCI: update_nhcp, Num_HCI_Command_Packets=1
> HCI: send_cmd_queue, start: Num_HCI_Command_Packets=1
> HCI: send_cmd_queue, end : 0 cmds left in queue
> BT DATA -->|X|      9
> hci_receive_data, hci-9
> HCI: hci_receive_data, WAIT_FOR_PACKET_TYPE
> HCI: hci_receive_data, WAIT_FOR_EVENT_TYPE
> HCI: hci_receive_data, WAIT_FOR_EVENT_LENGTH
> HCI: process_event, PIN_CODE_REQUEST forwarding event to security
> manager
> Called my_sec_man
> We are in SEC_MAN_LOOPBACK mode ...
> --------------------------------------------------------------
> --------------
> 
> This is my sec_manager:
> --------------------------------------------------------
> void
> my_sec_man(BD_ADDR bd_addr)
> {		
> 	BD_ADDR address;
> 	char pin[]="123";
> 	char len = 3;
> 	printk("We are in SEC_MAN_LOOPBACK mode ...\n");
> 
> 	memcpy(address, bd_addr, BD_ADDRESS_SIZE);
> 	hci_pin_code_request_reply(address, pin, len);
> }
> --------------------------------------------------------
> 
> 
> and this is, what i get:
> -------------------------------------------
> We are in SEC_MAN_LOOPBACK mode ...
>  
> hci_pin_code_request_reply, New pin is (3):
> 0x31 0x32 0x33
>  
> hci_pin_code_request_reply,  BD_addr (6):
> 0x73 0x85 0x58 0x8c 0x40 0x00
>  
> hci_pin_code_request_reply,  pin (3):
> 0x31 0x32 0x33
> HCI: start_cmd_timer
> HCI: insert_cmd
> Aiee: scheduling in interrupt 90066664
> Aiee: scheduling in interrupt 90066664
> Aiee: scheduling in interrupt 90066664
> Aiee: scheduling in interrupt 90066664
> Aiee: scheduling in interrupt 90066664
> Aiee: scheduling in interrupt 90066664
> Aiee: scheduling in interrupt 90066664
> ....
> --------------------------------------------
> 
> 
> if i disable my_sec_man, then i get this:
> -------------------------------------------
> We are in SEC_MAN_LOOPBACK mode ...
> BT SYS: wq_timeout
> Connect failed [Unknown layer - unknown reason ((-1))]
> >                                                     
> -------------------------------------------
> 
> 
> can someone tell me, what the problem is, and how i can 
> answer correctly
> to the PIN_CODE_REQUEST?
> 
> 
> Thanks in advance!
> andreas
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> bluetooth-dev" in
> the body of a message to majordomo@xxxxxxx.com
> 
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com