* Re: [Bluez-users] mx27, csr and bluez: initialisation timed out
[not found] <OF57915B80.8FBC7A49-ON802573DF.003F8EDF-802573DF.003FEE1C@camcon.co.uk>
@ 2008-01-29 12:35 ` Tim Chick
2008-01-29 16:42 ` Peter Wurmsdobler
2008-01-29 18:29 ` Peter Wurmsdobler
0 siblings, 2 replies; 4+ messages in thread
From: Tim Chick @ 2008-01-29 12:35 UTC (permalink / raw)
To: bluez-users
> [Bluez-users] mx27, csr and bluez: initialisation timed out
> From: Peter Wurmsdobler <peter@wu...> - 2008-01-22 13:46
>
> The kernel boots, and the bluetooth related facilities printk some
> messages such as HCI UART driver ver 2.2, H4 and BCSP protocol
> initialised. Since the BlueTooth module does not know the clock
> frequency it is using, or the baud rate of the host, I need to
> "configure" the BlueCore and warm-reset it:
>
> mx27# bccmd -t BCSP -d /dev/ttymxc1 psload config.psr warmreset
>
What you actually want is:
bccmd -t BCSP -d /dev/ttymxc1 psload -r config.psr
as bccmd can only perform one command at a time.
> However, the only message I get is: "Initialization timed out",
> which, looking through the code, is generated in
> bluez/tools/csr_bcsp.c in the open function. But why?
>
There appear to be some races in the BCSP, which may not cause a problem
on a PC. I have some changes and will publish to the devel list.
As a work around, the following works reliably for me:
hciattach /dev/ttyS0 bcsp
bccmd -t HCI psload -r my.psr
killall hciattach
hciattach /dev/ttyS0 bcsp
Cheers,
Tim
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Bluez-users] mx27, csr and bluez: initialisation timed out
2008-01-29 12:35 ` [Bluez-users] mx27, csr and bluez: initialisation timed out Tim Chick
@ 2008-01-29 16:42 ` Peter Wurmsdobler
2008-01-29 18:29 ` Peter Wurmsdobler
1 sibling, 0 replies; 4+ messages in thread
From: Peter Wurmsdobler @ 2008-01-29 16:42 UTC (permalink / raw)
To: BlueZ users
Thanks for the hints.
> hciattach /dev/ttyS0 bcsp
> bccmd -t HCI psload -r my.psr
> killall hciattach
> hciattach /dev/ttyS0 bcsp
hciattach, most of the time, does not work:
peter@linuxpc:> hciattach /dev/ttyS0 bcsp
Initialization timed out
On one occasion, which I cannot reproduce, hciattach actually worked to
some extent:
peter@linuxpc:> hciattach /dev/ttyS0 bcsp
peter@linuxpc:> hciconfig
hci0: Type: UART
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:15 acl:0 sco:0 events:0 errors:0
TX bytes:8 acl:0 sco:0 commands:0 errors:0
Any subsequent call to download the psr file failed:
peter@linuxpc:> bccmd -t hci psload my.psr
Device not available
peter@linuxpc:> bccmd -t hci -d /dev/ttyS0 psload my.psr
Device not available
I also tried to connect from a Windows PC using BTcli:
btcli (built Jan 17 2007, 15:35:14)
Version 1.24
BSCP on COM1 at 38400 bps
rba
command_complete nhcp:0x01 read_bd_addr success ba 0x00025b00a5a5
Why is it impossible for the Linux host to communicate with the BC4-ROM?
What do I miss?
Thanks for any hints,
peter
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bluez-users] mx27, csr and bluez: initialisation timed out
2008-01-29 12:35 ` [Bluez-users] mx27, csr and bluez: initialisation timed out Tim Chick
2008-01-29 16:42 ` Peter Wurmsdobler
@ 2008-01-29 18:29 ` Peter Wurmsdobler
1 sibling, 0 replies; 4+ messages in thread
From: Peter Wurmsdobler @ 2008-01-29 18:29 UTC (permalink / raw)
To: BlueZ users
Hello,
> hciattach /dev/ttyS0 bcsp
> bccmd -t HCI psload -r my.psr
> killall hciattach
> hciattach /dev/ttyS0 bcsp
When the BC4-ROM is powered up, it does not know the values for certain
keys, such as:
PSKEY_LC_COMBO_DOT11_CHANNEL_PIO_BASE
PSKEY_UART_BAUDRATE
PSKEY_ANA_FREQ
So I connected the apm module (with the BC4-ROM in it) to the WindowsXP
host, powered it up, then used the PStool to convince myself that this
is true. Indeed it is.
Then I downloaded a socalled psr file containing these keys, and indeed,
the values for these keys were differend. So the download must have worked.
Having power cycled the module, I tried once more on Linux:
peter@linuxpc:~$ hciattach /dev/ttyS0 bcsp
peter@linuxpc:~$ hciconfig
hci0: Type: UART
BD Address: 00:02:5B:00:A5:A5 ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:1058 acl:0 sco:0 events:22 errors:0
TX bytes:684 acl:0 sco:0 commands:21 errors:0
peter@linuxpc:~$ bccmd -t HCI psload -r apm6628BT-UART.psr
Loading PSKEY_LC_COMBO_DISABLE_PIO_MASK ... failed
Loading PSKEY_LC_COMBO_DOT11_CHANNEL_PIO_BASE ... failed
Loading PSKEY_LC_ENHANCED_POWER_TABLE ... failed
Loading PSKEY_UART_BAUDRATE ... failed
Loading PSKEY_HOST_INTERFACE ... failed
Loading PSKEY_ANA_FREQ ... failed
Loading PSKEY_USE_EXTERNAL_CLOCK ... failed
Loading PSKEY_CLOCK_REQUEST_ENABLE ... failed
Loading PSKEY_CLOCK_REQUEST_FEATURES ... failed
peter@linuxpc:~$ bccmd -t bcsp psload -r apm6628BT-UART.psr
Initialization timed out
Apparently, on linux I cannot establish a reliable connection and
download the settings.
Any ideas?
peter
--
apm6628BT-UNIF.psr:
// PSKEY_LC_COMBO_DISABLE_PIO_MASK
&0028 = 0200
// PSKEY_LC_COMBO_DOT11_CHANNEL_PIO_BASE
&002a = 0011
// PSKEY_LC_ENHANCED_POWER_TABLE
&0031 = 0400 0000 3f00 4500 e800 0900 0000 3f00 4700 ec00 0f00 0000 3f00
4a00 f000 1600 0000 3f00 4d00 f400 1e00 0000 3f00 5000 f800 2600 0000
3f00 5500 fc00 2e00 0000 3f00 5b00 0000 5000 0000 3f00 6900 0400
// PSKEY_UART_BAUDRATE
&01be = 01d8// 115.2 kbaud
// PSKEY_HOST_INTERFACE
&01f9 = 0001// BCSP link
// PSKEY_ANA_FREQ
&01fe = 4e20
//PSKEY_USE_EXTERNAL_CLOCK
&023b = 0001//true
//PSKEY_CLOCK_REQUEST_ENABLE
&0246 = 0003
// PSKEY_CLOCK_REQUEST_FEATURES
&03b6 = 0000
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bluez-users] mx27, csr and bluez: initialisation timed out
@ 2008-01-22 13:46 Peter Wurmsdobler
0 siblings, 0 replies; 4+ messages in thread
From: Peter Wurmsdobler @ 2008-01-22 13:46 UTC (permalink / raw)
To: bluez-users
Hello,
I am using a combined WiFi/BlueTooth module called apm6628, integrating
the CSR BlueTooth silicon which is connected over a serial cable to my
i.MX27 ADS development board, running linux 2.6.19.2. I have bluez
support compiled into the kernel and the bluez-utils installed using
LTIB (not to forget with the --enable-bccmd in the spec file).
The kernel boots, and the bluetooth related facilities printk some
messages such as HCI UART driver ver 2.2, H4 and BCSP protocol
initialised. Since the BlueTooth module does not know the clock
frequency it is using, or the baud rate of the host, I need to
"configure" the BlueCore and warm-reset it:
mx27# bccmd -t BCSP -d /dev/ttymxc1 psload config.psr warmreset
However, the only message I get is: "Initialization timed out", which,
looking through the code, is generated in bluez/tools/csr_bcsp.c in the
open function. But why?
I then tried to compile bluez-utils on my linux host. For some reason,
".configure --enable-bccmd" does not generate the bccmd options in the
tools/Makefile. Any idea why that is so?
Alternatively to bccmd, could I simply use
"hciattach -s 230400 -d /dev/ttymxc1 csr"
in order to create a hci0 device?
Am I missing something in the way the kernel creates bluetooth devices?
Is there a good (up-to-date) documentation on this matter?
Regards,
peter
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-29 18:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <OF57915B80.8FBC7A49-ON802573DF.003F8EDF-802573DF.003FEE1C@camcon.co.uk>
2008-01-29 12:35 ` [Bluez-users] mx27, csr and bluez: initialisation timed out Tim Chick
2008-01-29 16:42 ` Peter Wurmsdobler
2008-01-29 18:29 ` Peter Wurmsdobler
2008-01-22 13:46 Peter Wurmsdobler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox