# PCMCIA bluetooth problem

## sinops

What I have:

Dell D800

3Com Wireless Bluetooth PC Card Version 3.0 3CRWB6096B

I have enabled as a module PCMCIA support in the kernel. I have been to the bluez website and my card seems supported. I added bt3c.conf to the /etc/pcmcia directory.

The related modules loaded by me are:

yenta_socket

ds

also pcmcia_core is loaded

Modules loaded by pcmcia:

serial

serial_cs

tail -f /var/log/everything/current shows me

Jan  5 17:30:22 [kernel] cs: socket f7b72800 timed out during reset.  Try increasing setup_delay.

Jan  5 17:30:23 [cardmgr] socket 0: Serial or Modem

Jan  5 17:30:23 [cardmgr] executing: 'modprobe serial_cs'

Jan  5 17:30:23 [cardmgr] executing: './serial start ttyS17'

Jan  5 17:30:23 [kernel] ttyS17 at port 0x0100 (irq = 0) is a 16C950/954

Jan  5 17:30:23 [kernel] Trying to free nonexistent resource <00000100-00000107>

                - Last output repeated twice -

Jan  5 17:30:23 [cardmgr] executing: './serial start ttyS18'

Jan  5 17:30:23 [kernel] Trying to free nonexistent resource <00000108-0000010f>

a symlink is created from ttyS18 to /dev/modem

I have disabled the onboard modem because I don't use it!

The onboard ir port is enabled and is ttyS1

The onboard serial port is enabled and is ttyS0

I have emerged all but the bluez-kernel, bluez-pan, and bluez-hciemu related to bluez ebuilds.

Kernel version: 2.4.22-ac4

As this is in between to projects I don't know who to ask, so since I'm using gentoo I'll ask it here.

Anyone think that irq=0 is strange???

Why does pcmcia think I have a modem???

What should I check to get this working???

I tried disabling the various items in the kernel and let pcmcia build the appropriate drivers. I get the same results. 

I have tried to follow the many websites out there that posted information as to how to get this working, but I have not succeeded. Some people make reference to a bluetooth startup script that exists in one of the masked ebuilds, so has anyone got that to work??

All I want is to browse the web using gprs via my t68 (soon to be a z600) with the hardware that I have.

Thanks,

SinOps

----------

## thesnowman

Looking at the bluez hardware support page I see your card uses hci_uart.  I'm using hci_uart with my bluetooth CF card on my iPAQ (running familiar http://www.handhelds.org), so I'll try and help you out because the set-up should be very similar.

These are the steps I had to go through to get it working:

* Ensure the card manager recognises the card as a serial card.  The pcmcia scripts will then create a serial device, call setserial to configure the baud rate of the new serial device call hciattach to initialise the serial port.

* Configure hotplug so when your card is plugged in it starts any bluez programs you want to run, ie. sdps, pand, etc.

I got mine going by manually running all these commands (lots of trial and error involved), before trying to get cardmgr and hotplug to do it all automagically.

Have a look at the scripts in /etc/pcmcia/serial and /etc/pcmcia/serial.opts to see the syntax of the commands that cardmgr will be running.  Post the contents of the bt3c.conf that you copied to your /etc/pcmcia directory as this may be confusing cardmgr.

Use the cardctl program to see how your card is identifying itself:

```
cardctl ident/info
```

Don't worry about the bluetooth startup script.  This simply starts the hcid daemon, which can be done with hotplug once it's working correctly.

Let me know how you get on with the above.  I'm sure you can get it working with a little perserverance.

I recently upgraded my T68i to a Z600 (after leaving my T68i in a taxi DOH!) and it's a great phone - I love it.

----------

## sinops

So I inserted the card and pcmcia picked it up as a serial card

It did not load the hci_uart module.

So I did:

```

modprobe hci_uart

setserial /dev/ttyS18 baud_base 9121600

hciattach /dev/ttyS18 any 921600

hcid

```

```

cardctl ident

Socket 0:

  product info: "3Com", "3CRWB6096B Bluetooth PC Card", "", ""

  manfid: 0x0101, 0x0041

  function: 2 (serial)

Socket 1:

  no product info available

```

```

cardctl info

PRODID_1="3Com"

PRODID_2="3CRWB6096B Bluetooth PC Card"

PRODID_3=""

PRODID_4=""

MANFID=0101,0041

FUNCID=2

PRODID_1=""

PRODID_2=""

PRODID_3=""

PRODID_4=""

MANFID=0000,0000

FUNCID=255

```

```

hciconfig

hci0:   Type: UART

        BD Address: 00:00:00:00:00:00 ACL MTU: 0:0  SCO MTU: 0:0

        DOWN

        RX bytes:0 acl:0 sco:0 events:0 errors:0

        TX bytes:8 acl:0 sco:0 commands:2 errors:0

```

bt3c.conf:

device "bt3c_cs"

  module "bt3c_cs"

card "3Com Bluetooth PC Card"

  version "3COM", "*", "Bluetooth PC Card"

  bind "bt3c_cs"

I have never even been this far. The setserial and hciattach helped at least create the hci0 device. Now the only thing is to get hciconfig to see the device and I should be all set.

This looks promising:

```

lsmod

Module                  Size  Used by    Tainted: PF

l2cap                  14380   1  (autoclean)

hci_uart                5036   4

bluez                  28676   3  [l2cap hci_uart]

serial_cs               4496   0  (unused)

...

```

This seems to indicate that hci_uart recognizes the device. So I have moved forward a little. You suggest using hotplug, but I have found hotplug to hang on shutdown so I am avoiding it for now. I will try and use it later.

----------

## thesnowman

I would put hci_uart in modules.autoload.  It can be loaded even if it is not being used.

Have a look at the man page for hciattach and try each of the various different types of devices, checking the output of your syslog for each one.  I think the one you want is bcsp, not any.

Once you get hciattach working correctly and hciconfig recognises your card you can then customise /etc/pcmcia/serial.opts to do call hciattach automatically (it will call setserial for you as well).

This is what my serial.opts looks like:

```

# Serial device configuration

#

# The address format is "scheme,socket,instance".

#

case "$ADDRESS" in

*,*,*)

    INFO="Default modem setup"

    # Symbolic link to dialout device

    LINK="/dev/modem"

    # Options for 'setserial'

    SERIAL_OPTS=""

    # Should we create an inittab entry for this port?

    #INITTAB="/sbin/mgetty"

    # Card eject policy options

    NO_CHECK=n

    NO_FUSER=n

    ;;

esac

start_fn() { hciattach /dev/tts/0 bcsp 1152000 ; }

INFO="Bluetooth CF Card"

LINK=""

SERIAL_OPTS="baud_base 1152000"

NO_CHECK=n

NO_FUSER=n

```

Basically I've just hardcoded the parameters I need.  I couldn't get it to work using the manfid info.

I've just found this page http://www.holtmann.org/linux/bluetooth/bt3c.html which says you also need the firmware from the windows driver disc.  This is confusing because I don't know how the bt3c_cs driver interfaces with hci_uart, or if it replaces it.  Good luck.

----------

## sinops

hciattach does not seem to recognize the card. I will try to google around and see whether someone else has had this problem and a solution.

Thank you for all your help!

If you have any other suggestions please let me know.

SinOps

----------

## ShaneO

Anyone got this card woking with the new 2.6.14 kernel and pcmciautils?

----------

## nic01

Works fine here with kernel 2.6.14-suspend2.

You have any troubles?

/Nic

EDIT: and pcmciautils of course.

----------

