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

RE: [bluetooth-dev] Stack freezes with CSR in BCSP ?



csr_waitcmdnum() waits for the module to send an event telling
us that there is now one HCI command buffer free. Sometimes
this does not occur as the stack expects and then it hangs.
In the current code in CVS there is a timeout to prevent 
this from happening. So either you can upgrade to the lastest
code in CVS, or you can comment out the entire csr_waitcmdnum()
function.

//Peter

> -----Original Message-----
> From: Alain Paschoud [mailto:alain.paschoud@xxxxxxx.ch]
> Sent: 14 February 2002 17:34
> To: bluetooth-dev@xxxxxxx.com
> Subject: [bluetooth-dev] Stack freezes with CSR in BCSP ?
> 
> 
> Hello,
> 
> I have a problem using the stack with the CSR module from my 
> embedded device. I had from time to time the same problem 
> when I used the chip from the PC. But on my embedded system, 
> I always have this problem.
> The BCSP synchronisation succeed, but it stops after it 
> indicates a "HCI: csr_waitcmdnum" in the logs.
> 
> Does someone already experienced something like that ? If 
> yes, what could be the reason ?
> 
> -- Here are the logs (with I think enough debug) --
> 
> BT SYS: Initialising Bluetooth Stack
> BT SYS: Current HW: CSR
> BT SYS: Initialising BTMEM [2500 bytes]
> BT SYS: Initializing BCSP
> BCSP:      bcsp_write_lower: Outgoing data:
> 
> bcsp_write_lower (10):
> 0xc0 0x00 0x41 0x00 0xbe 0xda 0xdc 0xed 0xed 0xc0 
> BCSP:      bcsp_receive_lower: Incoming data:
> 
> bcsp_receive_lower (30):
> 0xc0 0x00 0x41 0x00 0xbe 0xda 0xdc 0xed 0xed 0xc0 0xc0 0x00 
> 0x41 0x00 0xbe 0xda 
> 0xdc 0xed 0xed 0xc0 0xc0 0x00 0x41 0x00 0xbe 0xac 0xaf 0xef 0xee 0xc0 
> BCSP:      bcsp_write_lower: Outgoing data:
> 
> bcsp_write_lower (10):
> 0xc0 0x00 0x41 0x00 0xbe 0xac 0xaf 0xef 0xee 0xc0 
> BCSP:      bcsp_receive_lower: So far handled: 10 bytes
> BCSP:      bcsp_write_lower: Outgoing data:
> 
> bcsp_write_lower (10):
> 0xc0 0x00 0x41 0x00 0xbe 0xac 0xaf 0xef 0xee 0xc0 
> BCSP:      bcsp_receive_lower: So far handled: 20 bytes
> BT SYS: BCSP initialized and syncronized
> BCSP:      bcsp_receive_lower: So far handled: 30 bytes
> BCSP:      bcsp_receive_lower: Incoming data:
> 
> bcsp_receive_lower (12):
> 0xc0 0x80 0x65 0x00 0x1a 0x0f 0x04 0x00 0x01 0x00 0x00 0xc0 
> BCSP:      bcsp_write_lower: Outgoing data:
> 
> bcsp_write_lower (6):
> 0xc0 0x08 0x00 0x00 0xf7 0xc0 
> HCI: release_cmd_timer
> HCI: process_event: COMMAND_STATUS
> BCSP:      bcsp_receive_lower: So far handled: 12 bytes
> HCI: csr_waitcmdnum
> BCSP:      bcsp_receive_lower: Incoming data:
> 
> bcsp_receive_lower (10):
> 0xc0 0x00 0x41 0x00 0xbe 0xad 0xef 0xac 0xed 0xc0 
> BCSP:      bcsp_receive_lower: So far handled: 10 bytes
> BCSP:      bcsp_receive_lower: Incoming data:
> 
> bcsp_receive_lower (10):
> 0xc0 0x00 0x41 0x00 0xbe 0xad 0xef 0xac 0xed 0xc0 
> BCSP:      bcsp_receive_lower: So far handled: 10 bytes
> 
> -- End of the logs ---
> 
> And then, nothing more happen. I have of course to reboot my 
> device to use the bt driver again.
> 
> -- 
> Alain Paschoud                      SMARTDATA SA
> alain.paschoud@xxxxxxx.ch         PSE-A
> http://www.smartdata.ch             1015 Lausanne
> Phone +41-21-693'84'98              
> Fax   +41-27-693'84'91              
> -
> 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