?? readme.txt
字號:
Introduction:-------------The driver files can be compiled to as a module or part of the kernelin the Redhat Linux operating system. The configuration must be as follows:1) ARCHITECTURE / PLATFORM : IBM compatible PC.2) OS : Redhat 7.0 Linux Kernel 2.4.6 with USB support. Files present in this directory:--------------------------------Driver Files:------------ 1. btusb.c 2. btusb.h 3. btusb_driver_dep.h 4. btusb_os_dep.h Test Stubs:---------- 1. HCI_Stub.c NOTE: The install and build procedures can be performed only by the "root" user.Install procedure:------------------1. Install the BT-USB Transport layer: 1. Copy the files btusb.c btusb.h btusb_driver_dep.h btusb_os_dep.h from <TEMP_DIR>/release/ to /usr/src/<Linux>/drivers/usb/ directory. 2. Edit the Makefile in /usr/src/<Linux>/drivers/usb and add the following at the end of the "Configuration Options"list. obj-$(CONFIG_BLUETOOTH)+= btusb.o 3. Edit the Config.in in /usr/src/<Linux>/drivers/usb. Inside the "if [ ! "$CONFIG_USB" = "n" ]; then " condition add the following: dep_tristate ' Bluetooth Support (EXPERIMENTAL)' CONFIG_BLUETOOTH $CONFIG_USB (Note: The previous line has been broken for readability. When adding this line to the Config.in file enter it as a single line.) 4. Edit the usb-core.c in /usr/src/<Linux>/drivers/usb directory. i) Add the following to the function declarations. int btusb_init(void); ii) Add the following in the usb_init function, under #ifndef CONFIG_USB_MODULE : #ifdef CONFIG_BLUETOOTH btusb_init(); #endif /* CONFIG_BLUETOOTH */ Before Building the driver:---------------------------1. Some USB Controller do not provide a SCO channel. A temporary work around has been provided for such condition. A TEMPORARY_FIX_FOR_SLOW_DATA_RATE has been defined in the btusb.h file(disabled by default). If you would want to test the transmission of SCO data over the BULK channel uncomment the macro and build the driver as per the instruction provided below.Note: The SCO transmission has not been tested and so behavior can be unpredictable.2. If building the driver for kernel versions 2.4.x and above, enable the macro LINUX_2_4 defined in the btusb_driver_dep.h file. Build procedure:----------------1. As a part of the Linux kernel. Go to the /usr/src/<Linux>/ by typing the following command at the prompt: cd /usr/src/<Linux>/ Execute the following commands in sequence. 1. make menuconfig i) This will open a user interface. Use the arrow keys to scroll down to USB Support and press enter to display the submenu. ii) Choose the "Support for USB". "UHCI Support", "OHCI Support" and "Bluetooth Support" options using "Y". iii) Save the changes and exit. 2. make dep 3. make bzImage 4. copy the built kernel image (bzImage) from the /usr/src/<Linux>/arch/i386/boot directory to the /boot directory as vmlinuz_Btusb_Support 5. Edit /etc/lilo.conf and add the following lines at the end of the file. image=/boot/vmlinuz_Btusb_Support label=linux-Bluetooth read-only Save the file. 6. Execute /sbin/lilo 7. Reboot the system. Choose linux-Bluetooth at the lilo prompt. 2. As a module that can be inserted into the Linux Kernel. (Recommended) Go to the /usr/src/<Linux>/ by typing the following command at the prompt: cd /usr/src/<Linux>/ Execute the following commands in sequence. 1. make menuconfig i) This will open a user interface. Use the arrow keys to scroll down to USB Support and press enter to display the submenu. ii) Choose the "Support for USB". "UHCI Support", "OHCI Support" and "Bluetooth Support" options using "M". iii) Save the changes and exit. 2. make modules 3. make modules_install 4. insmod /lib/modules/"VERSION NUMBER OF KERNEL"/usb/btusb.oHow to Compile the test stub:----------------------------- 1. Change to the directory containing the test stub. 2. Compile the HCI_Stub.c file using the compiler present on your Linux System. eg. cc HCI_Stub.c -o HCI_Stub.o 3. This is create the executable in the present directory.Test Set up:------------ 1. PC having Linux 2.4.6 installed on it and having a USB support. 2. A "Host Controller" with "Bluetooth Controller Stack" running. Execution Procedure:-------------------- 1. Connect the Bluetooth Test Controller to the "TEST" Host PC and start the stack. 2. Connect the Bluetooth Controller to the Linux PC running the BT HCI USB Transport Layer. 3. Execute the Test Application on the Linux Host. 4. Change to the directory holding the test stub. 5. Run the test stub executable using ./HCI_Stub.o 6. Continue using the menu. To Debug the Transport Layer:-----------------------------Print statements are provided in the transport layer to help in debugging. These statements are disabled by default. To enable the print statements, the following changes must be done to the code. 1. Edit the btusb.h file in /usr/src/<Linux>/drivers/usb directory. A macro "BTUSB_DEBUG" is defined within a "#if 0" precompiler option. Change the "#if 0" to "#if 1". This will define the "BTUSB_DEBUG" macro. 2. There are a list of variables defined at the end of the btusb.h file that can be used to enable the debug messages. The variable are their use is defined below. ---------------------------------------------------------- | Variable Name | Description | ---------------------------------------------------------- | debug_all | Enables all the debug messages in | | | the transport layer. | | | | | debug_init | Enables the messages only in the | | | btusb_init call. | | | | | debug_probe | Enables the messages only in the | | | btusb_probe call. | | | | | debug_fileops | Enables the messages only in the | | | btusb_open, btusb_close, | | | btusb_read and btusb_write calls. | | | | | debug_callbacks | Enables the messages only in the | | | btusb_read_callback and the | | | btusb_write_callback calls. | | | | | debug_disconnect | Enables the messages only in the | | | btusb_disconnect call. | | | | | debug_exit | Enables the messages only in the | | | btusb_exit call. | | | | | debug_unlink | Enables the messages only in the | | | btusb_unlink_urbs call. | ---------------------------------------------------------- --------------------------------------------------------------------1. Bluetooth is the registered trademark of the Bluetooth SIG.2. IBM is the registered trademark of IBM corporation.3. Redhat is the registered trademark of Redhat Inc.4. Linux is the registered trademark of Linux.org5. USB is the registered trademark of USB.org-------------------------------------------------------------------- *** End of the Document ***
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -