OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Debian => Topic started by: Khepri on August 01, 2008, 04:06:48 am

Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: Khepri on August 01, 2008, 04:06:48 am
Installed bluez etc.  Drivers won't load.


dmesg:

Bluetooth: Core ver 2.11
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.9
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.8



and when I take the card out and reinsert it:

pccard: card ejected from slot 1
pccard: PCMCIA card inserted into slot 1
pcmcia: registering new device pcmcia1.0



Tried playing around with hciattach and setserial, with no success.

Is this an issue with the kernel? I read about a bug (here and elsewhere) in 2.6 kernels that prevents some Socket BT cards from working, but I'm not really up to configuring a kernel for my Z from scratch, not knowing every relevant switch I should temper with in the config.

Any ideas?


Here's some output:

Zaurus:~# hciattach /dev/ttyS4 socket
Can't get port settings: Input/output error
Can't initialize device: Illegal seek
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: Khepri on August 01, 2008, 06:09:03 am
Rebooted and serial_cs drivers were loaded for the Socket BT card.

I'm not used to rebooting, I run a freakin' Linux after all!
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: Khepri on August 03, 2008, 07:49:28 am
I am stuck again.

I execute "rfcomm connect 0 <bdaddr>".
The phone asks if I want to bond with the Z, I say Yes.
I enter the same pin code on the phone that I have in /etc/bluetooth/hcid.conf
The phone says "Verifying PIN... Please Wait".

A couple seconds pass, the connection fails and Z says:

Can't connect RFCOMM socket: Operation now in progress

Why!?
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: Khepri on August 04, 2008, 03:23:51 pm
Just reporting in that I got it to work.

It was an issue with HALd not loading correctly at boot because it hadn't loaded dbus first.
I also had to install the passkey-agent and run the process in the background while binding the devices.

Then I did:

hciattach /dev/ttyS4 socket
hciconfig hci0 up
rfcomm connect rfcomm0


I had so many different problems during setting this up that if I can gather some energy I will write a thorough tutorial on it.
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: ant on August 08, 2008, 05:09:08 am
This should be valid for debian too:

/etc/sysconfig/bluetooth
BLUETOOTH=yes
BLUETOOTH_PORT=/dev/ttyS4
#BLUETOOTH_SCRIPT=
BLUETOOTH_SPEED=230400
BLUETOOTH_PROTOCOL=bcsp
#
#
#BLUETOOTH_SPEED=921600
#BLUETOOTH_PROTOCOL=socket

/etc/rfcomm.conf
# RFCOMM configuration file.
#
 
rfcomm0 {
#       # Automatically bind the device at startup
        bind yes;
#
#       # Bluetooth address of the device
        device 00:xx:xx:xx:xx:xx;
 
#
#       # RFCOMM channel for the connection
        channel 1;
#
#       # Description of the connection
        comment "My Nokia xxxx";
}
 
rfcomm1 {      
        bind yes;
        device 00:xx:xx:xx:xx:xx;
        channel 1;
        comment "My BT-GPS-xx";
}


Then, but this is using Angstrom, rfcomm is not pulled automatically though bind=yes, so add the two calls in

/etc/init.d/bluetooth
 
start)
        ...
        rfcomm bind all
 
stop )
       ...
        rfcomm release all
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: Raul on August 09, 2008, 06:24:22 pm
#I had so many different problems during setting this up that if I can gather some energy I will write a thorough tutorial on it.
Could you? I had many problems myself and it didn't work.
Which version is your card?
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: alexl on September 09, 2008, 04:36:19 am
I have a Bluetooth CF card on Angstrom on SL-C860.

ant, thanks for your script as it was enough to get my card working.  I have no idea what manufacturer the card is - it doesn't return an ID, other than 'Bluetooth CF card', when I do 'pccardctl ident'.

This worked though:

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']modprobe serial_cs
modprobe hci_uart
hciattach -s 115200 /dev/ttyS4 socket 230400
hciconfig hci0 up[/div]

Perhaps I should post this on an Angstrom forum but it's late in the day and I am dozing off at the keyboard.

Lex
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: HRH_H_Crab on July 24, 2009, 03:27:48 pm
O.K.

I too have managed to get things working.
It's a lot better than my bluetooth dongle was, doesn't flap around all over the place.
One thing though, I cant seem to get it working after a suspend without a reboot.
Is there a trick to this that anyone knows?
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: HRH_H_Crab on July 24, 2009, 05:22:19 pm
Figured it out.
killall hciattach to sort out the hciattach, and pccardctl eject 1 to eject the card safely.
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: pelrun on July 28, 2009, 03:54:25 am
I modified my apm suspend/resume scripts to eject/insert the card automatically; it seems to work fairly well.
Title: Socket Bluetooth Cf Card Not Working (surprise!)
Post by: HRH_H_Crab on August 07, 2009, 10:36:58 am
Wicked idea!
I'll look in to this and see if I can figure it out.