Hi Thanks for all the feedback we got. We've made the changes. About the URL where to get the howto, we think it would be the best way, to publish the howto with the OpenBT-Project. Luki and Dejan Content Security by MailMarshalHowto - CSR-Hardware and OpenBT
Lukas Valle & Dejan Miletic
This information is intended for Linux on the Intel platform. Much of this information may be applicable to Linux on other processors, but we have no first-hand experience or information about this. The description is based on OpenBT version 0.0.8 which was installed on a SuSE Linux 7.2 Professional with kernel version 2.4.10. It should run on most other systems and with any 2.x kernel although we haven't tested it. For the Casira-Box we used the firmware hci bc01_hci-branch-12.3_casira and the PS-Tool 1.5.
Miletic Dejan: Student from Univerity of Applied Sciences for Architecture, Technology, Business and Language in Winterthur (Switzerland). Finishing study computer science in November 2001. I will work as SW-Engineer.
Send comments, corrections and questions to the author at email@example.com, firstname.lastname@example.org
Peter Kjellerstedt, Anders Torbjörn Johansson and the other developers of OpenBT
Frank Kargl from Uni Ulm
Carl Orsborn and the staff at CSR
and the mailinglist
Unpack it in a directory using:
$ tar xvf openbt-20011021.tar.gz
Change into the directory and source the init_env file:
$ cd openbt
$ . init_env
Edit openbt/Makefile and add the line
make -C apps/bluetooth/sdp_server sdp_server
after line 13. The Makefile should look like this:
all: make -C linux/drivers/char/bluetooth make -C libs install make -C apps/bluetooth/userstack links make -C apps/bluetooth make -C apps/bluetooth/sdp_server sdp_user make -C apps/bluetooth/sdp_server sdp_server
In linux/drivers/char/bluetooth/Makefile you may need to comment out the modversions.h include, depending on wether your kernel was build with modversions or not.
#MODFLAGS = -DMODVERSIONS -include $(INCLUDEDIR)/linux/modversions.hSupply the path to your kernel include files on line 55:
# The INCLUDEDIR variable allows LSB compliant distros to be able to compile # the module correctly. Use 'make INCLUDEDIR=/usr/src/linux/include' where # /usr/src/linux/include is the directory that was used to build the kernel. INCLUDEDIR = /usr/src/linux/includeNext you have to change the default configuration from ERICSSON to CSR. Therefore edit openbt/linux/include/linux/bluetooth/btconfig.h, undefine CONFIG_BLUETOOTH_ERICSSON and define CONFIG_BLUETOOTH_CSR on line 62 & 64:
/* This sets current HW */ #undef CONFIG_BLUETOOTH_NOINIT #define CONFIG_BLUETOOTH_CSR #undef CONFIG_BLUETOOTH_DIGIANSWER #undef CONFIG_BLUETOOTH_ERICSSON #undef CONFIG_BLUETOOTH_INFINEON_BMI #undef CONFIG_BLUETOOTH_GENERIC #undef CONFIG_BLUETOOTH_USBMODULE /* Not implemented */
Now go to the chapter H4 or BCSP, depend
what you want to use. We recommend to start with H4.
$ . init_env $ make clean $ make $ su $ make install $ make devs $ exitImportant is that you change the settings on the Casira-Board. You can work with the PS-Tool 1.5.
Set the Host Interface to UART link running H4.
Set the value Uart Configuration
Bitfields to 168.
$ . init_env $ make clean $ make INCLUDE_BCSP_SUPPORT=1 $ su $ make install $ make devs $ exitChange the directory to openbt/apps/bluetooth/experimental/
$ make clean $ make INCLUDE_BCSP_SUPPORT=1Important is that you change the settings on the Casira-Board. You can work with the PS-Tool 1.5.
Set the Host Interface to UART link running BCSP.
Set the value Uart Configuration
Bitfields to 6.
You should copy openbt/linux/drivers/char/bluetooth/bt.o to your modules directory (usually /lib/modules/<kernelversion>/pcmcia/). Next you may want to insert
alias char-major-124 btin /etc/modules.conf and do a depmod -a to get the module loaded automatically. Otherwise you have to do an insmod bt.o manually.
Next you need to know on what serial device your card is bound. In case
of an serial device, this is easy. Just look what port you connected that
device to. In case of an pcmcia card, cardinfo should give you more information.
When using USB, perhaps usbview may help you. Due to a lack of USB Bluetooth
devices, we haven't tested that yet.
On senderside: When you find a byte under 20 hex: Send a 7dhex first, and XOR the founded Byte with 20h and send it too. The same with 7dhex
On the receiver side, search for 7dhex and read the next byte. XOR this byte with 20hex.
Change to Directory:
Start the Stack on both sides:
If you don't get any errormessages during the next seconds, the stack should work. For more Information look into /var/log/messages
Sender starts the Inquiry and return the address from the receiver device. For example 00:02:5b:ff:06:ae
Now you can set up an RFCOMM-Connection to the receiver:
./btcon -d /dev/ttyBT0 -p disable -a 00:02:5b:ff:06:ae -S 2
You will see the Message Connect, if the connection has been established.
Now you can try to send a few data over the link.
echo hallo > /dev/ttyBT0
Now you should see the hallo on the receiver side. Everything seems to work fine and you can disconnect the link.
./btdisc -d /dev/ttyBT0 -D 2
Shut down the stack with
|/usr/src/linux/include/linux/modversions.h no such file or directory||openbt/Makefile include directory on line 55 is probobly
$ locate modversions.h
and change to this directory.
|/usr/i486-suse-linux/bin/ld: cannot find -lreadline||You don't have readline. Download and install it.
Source Code: ftp://ftp.cwru.edu/pub/bash/readline-4.2.tar.gz
$ tar -xvzf readline-4.2.tar.gz
$ cd readline-4.2 $ ./configure $ make $ su $ make install $ make clean $ exit
|/usr/i486-suse-linux/bin/ld: cannot find -ltermcap||Copy Files to the correct location:
$su $ cp /usr/lib/termcap/* /usr/lib/ $ exit
|undefined reference to bt_dfu_mode||Edit File
Comment line 1902 & 1903
// if (bt_dfu_mode(-1)) // return 0;
|init_phys() not implemented||Change Directory
$ cd openbt/apps/bluetooth/userstack/
Edit File btd.c on line 3296:
else if (!strncmp(vendor, "CSR", 3));
|sdp_server: no such file or directory||Change Directory
$ cd /openbt/apps/bluetooth/sdp_server $ make $ su $ cp sdp_server /usr/sbin/ $ exit $ make install
|After make devs you see an error message
mknod -m 0666 /dev/ttyBT0 c 124 0
mknod: `/dev/ttyBT0': File exist already
make: *** [devs] Error 1
$ su $ rm /dev/ttyBT* $ make devs $ exit
|Could not open proc file: No such file or directory
Could not open /dev/ttyBTC
|You forgot to load the bt.o modul
$ insmod openbt/linux/drivers/char/bluetooth/bt.o
|Stack failed to initalize in BCSP-Mode||We are not sure, what exactly the problem is, but we have
made good experience with the following procedure:
Open Casira-Box Disconnect the Powercable Insert the Powercable Press Reset-Button on the board Start bti again
|/openbt/apps/bluetooth/userstack/hci_vendor.c:1029: undefined reference to `bt_use_bcsp'||Update to Version 0.0.8|