How to run up CSR chip without eeprom with BLUEZ ?

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

 



Hi
 
    I post this question on bluez-user before , But I think here might be the right place , so I put it here again.
 
    My chip is CSR's bc4 A06 Rom which do not have eeprom and need to send pskey to init after power up.
 
   Thanks to attaboyu and henry , They told me a way to do it with following process :
 
1. add --enable-bccmd feature while configure the bluez-utils
2. use bccmd after hci0 is up:
3. $bccmd -t hci psload -r /csr.psr
 
   But I try it , and meet some problem:
 
   the bluez-utils/tools/example.psr seems not comply with my chip, so I write another one as:
 
// PSKEY_ANA_FREQ
&01fe = 0FA0
 
// PSKEY_UART_BAUD_RATE
&01be = 0EBF
 
And then after hciconfig hci0 up I use
 
bccmd -t hci psload -r csr.psr
the two key is write successfully , but if I enable the debug I can see the chip continue to receive messages , seems something wrong with the head.
 
I remove the debug message so that you can see the log more clear:
 
~ #
~ # bccmd -t hci psload csr.psr
Loading PSKEY_ANA_FREQ ... done
Loading PSKEY_UART_BAUDRATE ... done
 
if I using -r in psload the result is :
 
~ # bccmd -t hci psload -r csr.psr
Loading PSKEY_ANA_FREQ ... done
Loading PSKEY_UART_BAUDRATE ... done
~ #
~ # bcsp_recv: Error in BCSP hdr checksum
 
both one could not work for hcitool scan:
 
~ # hcitool -i hci0 scan
Scanning ...
Inquiry failed: Connection timed out
 
and as long as this bcsp_recv: Error in BCSP hdr checksum happen
the bcsp interface seems dead , type bccmd again will show :
 
~ # bccmd -t hci psload -r csr.psr
Can't read version info for hci0: Connection timed out (110)
 
seems after warm reset the connection is bad.
 
So , I wonder, when using hciattach the baudrate is set to 115200
but after the uart_baudrate is set, the baudrate is set to 921600 it might cause the problem
 
Then I set &01be = 01d8 to keep the baudrate as 115200
 
But still the same.
 
Then if I remove the uart_baud_rate setting from the psr file
 
the warm reboot is ok:
 
~ # bccmd -t hci psload -r csr.psr
Loading PSKEY_ANA_FREQ ... done
 
but the chip seems to lost the sync and go back to the tshy state !
 
~ # hcitool -i hci0 scan
Scanning ...
bcsp_pkt_cull: Peer acked invalid packet
bcsp_handle_le_pkt: Found a LE sync pkt, card has reset
bcsp_pkt_cull: Peer acked invalid packet
bcsp_handle_le_pkt: Found a LE sync pkt, card has reset
bcsp_pkt_cull: Peer acked invalid packet
.
.
.
.
 
 
what is the right process ? Can any one help me out ?
Thanks
 
Raymond
 
 
 
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bluez-devel

[Index of Archives]     [Linux Bluetooth Devel]     [Linux USB Devel]     [Network Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux