Apparently you need not the following steps anymore to get Bluetooth to work on the H3870.
I would strongly advice you to check the Bluez mailing lists before following the steps listed. It has been a very long time since I
worked on this and will not be able to help you much. link
- Vijay
(3rd March, 2003)
Compaq H3870 has an internal bluetooth
radio for which support in linux was announced on 19th April, 2002. The
radio is a CSR connected to a high-speed, memory-mapped UART that is visible
as /dev/ttySB0. This document is an attempt to help you setup Bluez (available
from bluez.sourceforge.net)
to connect using this internal radio.
Steps to get Bluetooth running.
-
If you ave not already done it, upgrade your kernel to 2.4.18-rmk3-hh4.
Steps to upgrade your kernel is available in this document(will be up soon).I also have the compiled kernel and modules. Contact me if you want them.
-
Get the latest Bluez tools and libraries from here.
They are avaiable in the master package "task-bluez". So a simple
# ipkg update
# ipkg install task-bluez
should install the packages for you. For this to work, you must point
your ipkg to pull packages from http://familiar.handhelds.org/familiar/feeds/unstable/packages/armv4l.
You can set ipkg to pull of from a particular URL by modifying /etc/ipkg.conf.
-
The Bluetooth radio in H3870 runs by default in BCSP mode, while Bluez
supports H4 mode. So the radio has to be configured to run H4 mode before
it will work with Bluez. To do this, you need to use the "pskey" software
that is available with the "task-bluez" package. This tool re-writes the
firmware to work in H4. Please be careful when you do this!!! If you do
something strange to your chip, it's not clear it can be fixed.
-
Run pskey with the device as /dev/ttySB0 and speed at 230400
# pskey -b -d/dev/ttySB0 -s 230400
The -b tells it to run using BCSP which the default in the chip.
# pskey -b -d/dev/ttySB0 -s 230400
Physical device :/dev/tts/0
Speed :115200
Use BCSP :YES
<some more messages>
pskey>
-
Once you get this prompt, type
pskey>1f9 0003
Key 01f9 length 1
0001
The new length of key 1f9 will be 1
The new value will be 0003
Type yes to write those values, anything else
to cancel
yes or no>yes
This basically sets the key to H4. BCSP has a value of 0001 and H4
has value 0004.
-
Finally type
pskey>191 01d8 00a8 00fa 0014 0004 0000 0004
001e 0064 000a
Key 0191 length 10
03b0 0006 00fa 0014 0004 0000 0004 001e 0064
000a
The new length of key 191 will be 10
The new value will be 01d8 00a8 00fa 0014 0004
0000 0004 001e 0064 000a
Type yes to write those values, anything else
to cancel
yes or no>yes
This sets the speed to 115200 and to use H4. For further details on
what this means refer to [3].
-
Now you are in business. Include the following lines to /etc/modules.conf:
alias tty-ldisc-15 hci_uart
alias net-pf-31 bluez
alias bt-proto-0 l2cap
alias bt-proto-2 sco
- Type
# hciattach /dev/ttySB0 csr
This will load the modules and start the device.
- Execute hcid
# hcid
-
Execute hciconfig and get the local address.
# hciconfig hci0
You can also use hcitool for setting up connections, to inquire, and
to get the local address. Once you have another device also running, you
can do l2ping etc. For more on Bluez, look at the [4].
Acknowledgements.
This would not have been possible if not for the help of Porlin Kang,
Andrew Christian and Sam J.Engström.
References.
[1]. Andrew's
post on the newsgroup.
[2]. Sam Engström's
page on Bluetooth.
[3]. Fabrizio
Gennari notes on the mailing list.
[4]. Bluez
HowTo.
[5]. Handhelds.org.