# Some Bluetooth Questions [Solved]

## kbranch

I've tried everything I can think of or find on Google to get my bluetooth card to work with no luck, so I figured I'd ask here.

First of all, I've been having some hardware specific problems.  I have a Socket Bluetooth CF card (revision G) that I'm using through a CF to PCMCIA adapter.  This card seems to work fine in Zaurus PDAs, but I just can't seem to get it to work on my laptop.  I've selected all of the options in the kernel config under "Bluetooth subsystem support", so I think I have all the necessary things installed.

My understanding is that I need to use hciattach to be able to use my card.  I get the following error when I run 'hciattach /dev/ttyS0 socket':

```
Can't get port settings: Input/output error

Can't initialize device: Illegal seek
```

I'm not really sure if this should work at this point or not, but here's the output of 'hcitool scan':

```
Device is not available: Success
```

And here's the output of 'cardctl info 0':

```
PRODID_1="Socket"

PRODID_2="CF+ Personal Network Card"

PRODID_3=""

PRODID_4=""

MANFID=0104,009f

FUNCID=254
```

Second of all, I could use some general info on how to use bluetooth to connect to a phone.  I managed to get everything working once, but I've managed to forget how I did it since then.Last edited by kbranch on Fri May 13, 2005 2:12 am; edited 1 time in total

----------

## XPrulez

And this is exactly why Linux will never beat Windows.  Not only is it hard to get things like this to work, but nobody in the community has any idea how to do it either.

In XP, you just plug it in and it works.  In Linux, you beat your head against a wall for a few days and give up.

----------

## Naib

 *XPrulez wrote:*   

> And this is exactly why Linux will never beat Windows.  Not only is it hard to get things like this to work, but nobody in the community has any idea how to do it either.
> 
> In XP, you just plug it in and it works.  In Linux, you beat your head against a wall for a few days and give up.

 

cor great first post!!!

FYI when i got a bluetooth device i got it working in linux pretty much straight away. i just had 2 recompile my kernel and as i added every bluetooth thing as a module I didnt even have 2 reboot when it finished compiling.

one config file to edit (since this is gentoo so all by hand) and it works!!!!

Now XP. boot into it. Insert USB bluetooth. 

"found new hardware" - need 2 reboot

so after reboot, 

"XP has finished installing new hardware, you must reboot"  FFS!!!

so after reboot

"XP has detected a new piece of hardware, USB dongle"

follow wizard.

"cannot install because a previous install needs a reboot"

so reboot

finally can install the drivers.

need a reboot.

then another!!!

Equally everytime i put teh dongle into a different USB port it goes throught the same thing.

This kind of CRAP is why Linux will prevail because ppl are getting hacked off with the MS bullshit and crap ways of doing things.

Now if you dont  have anything useful to post DONT!

Back on topic.

Have you compiled bluetooth into your kernel? and IF as modules are they loaded?

Also the majority of bluetooth is Cambridge RF based and the base bluetooth system works very well with the linux kernel. Do you have PCMCIA working? Do you have any other PCMCIA cards working (thus ruling out the PCMCIA interface)

Are you using DevFS or uDEV, if you are it will help in identifying what /dev entry is used by the bluetooth (ie watch a dynamic /dev adninsert the PCMCIA and see what is created).

As to connecting to phone (what I use BT for) I would suggest gnome-bluetooth (if u use gnome) or gammu/wammu for a GUI to save yr phone book and all that.

ftpobex is a very handy piece of software as well.

All work by providing them with the bluetooth MAC (equiv)

----------

## kbranch

Sorry about that, 'XPrules' was a creation of mine to test a theory.  Sorry if I offended anybody, but it certainly seems to have worked.

I started out compiling bluetooth support as modules, but I compiled everything directly into the kernel just to make sure I wasn't missing something.

PCMCIA is working fine, I can use my 512 MB CF card through this adapter without any trouble.

I'm not entirely sure, but I think I'm using DevFS.  Doing a diff between 'ls /dev' before and after inserting the card (via 'cardctl insert 0', not physically) shows no difference.  I assume this means that I don't have the correct driver for my card?  If so, does anybody have any idea where I might find a driver for my Socket CF card?  It works fine on Zaurus PDAs, so I know such a thing exists.

----------

## Naib

lol now that is just mean!!!

for your infomation looking at just the 1st post I would have replied.

If some1 doesnt know where to start or is not in the right frame of mind they will not reply. OR more likely the majority of the the case. IF they see it and think abt posting but go away, if the thread is pushed off the main page they will forget abt it.

Equally you have only waited a day, ppl hear give help freely.

Anyway.

a quick google.

Google is your friend

provided some good info

http://affix.sourceforge.net/support_hw.shtml

Eqaully when it comes to bluetooth the main thing is BLUEZ (in portage) 

Since you are playing around with BLuetooth you MUST have this emerged

anyway looks like yr card is supported straight from bluez

http://www.holtmann.org/linux/bluetooth/features.html

Now since it is supported by Bluez so it is not that much more to get working, and since you were cocky and breaking forum rules in making more then one account, ill leave you to figure the rest out...

----------

## kbranch

Again, sorry if you were offended by that troll post.  I really didn't mean a word of it.  I fully understand that nobody has an obligation to answer my posts immediately and that many people around here know what they're doing.

I spent several hours on Google and these forums, but I guess I didn't try looking for Affix info.  I've emerged BlueZ, but I'm not having any luck.  Would I have to reemerge BlueZ after recompiling the kernel?

I'm not entirely clear on the procedure for getting a bluetooth connection working.  Should just plugging in the card and firing up a GUI program like gnome-bluetooth work?  I had thought that I needed to do something with hciattach or something similar first.  If so, then some thing's wrong (see the error in my first post).

----------

## Naib

Ha, gotcha.

I dont mind helping.. But i got u on a guilt-trip so that made my night  :Wink: 

anyway.

IF you emerge gnome-bluetooth this would have emerge the base bluetooth stuff. What you need is the bluez-drivers (bluez-kernel) to provide the kernel-level drivers for the bluetooth adapter outside of the vanilla kernel tree. THIS will have to be re-emerged every kernel compile/upgrade btw.

This should provide you with the drivers needed by teh kernel to talk to yr card.

Next you need to ensure yr card is working.

The best bet is actually to follow this tread

https://forums.gentoo.org/viewtopic-t-232495-highlight-6230.html

Basically carry on from 

```
hciconfig -a
```

IF you execute that commadn after compiling the Bluez-kernel and modprobed the modules (cant help on which 1 relevant), it will list the data on yr adaptor. Get info back and you have bluetooth all but working!!!

Next it is just config files, the main one being /etc/bluetooth/hcid

...

now dont do it again

----------

## kbranch

Thanks for the help, that thread looks useful.

'hciconfig -a' still returns nothing even after reemerging bluez-kernel, but I think I've found out why it's not working.  According to this page, there's a bug in the 2.6 kernels that messes up the Socket CF card.  I'm applying the patch from that page and recompiling right now, so hopefully that'll do it.

----------

## kbranch

Well, that patch didn't seem to help.  hciconfig -a still returns nothing and hciattach (which that page I got the patch from said was necessary) still returns to following:

```
Can't get port settings: Input/output error

Can't initialize device: Illegal seek
```

I'm using the 2.6.10 kernel while that patch was for 2.6.11.  It doesn't seem like that'd really be a problem, but is that a possibility?  I seem to recall having problems with 2.6.11 on my laptop, so that's hardly the best option.

Does anybody have an idea as to what might be wrong?  I've googled for the error that hciattach returns, but I'm not getting anything useful.

----------

## Naib

Well for starters you applied the patch against the wrong kernel tree!

are you 100% sure that everything of relevance to this Bluetooth card is exactly the same in the 2.6.11 as in 2.6.10?

I would not dare say that.

Apply the patch to a 2.6.11 kernel and then IF you have problems then it can be solved. As you can see someone has got it working But on a 2.6.11 kernel!!! so it is not impossible, bu tit might be with a 2.6.10

----------

## kbranch

Well, I still get the same error with the patched 2.6.11 installed.  2.6.11 also broke my video drivers, so I think I'll be going back.

Any other ideas?

----------

## kbranch

Wow, I feel stupid now.  I had thought the person I bought this card from said it was a revision G card, but I don't see any mention of what version it is in our messages.  It turns out it's a revision F card (which uses a completely different chipset than the G cards).

So now that I set it up for the right card, things seem to be working fairly well.  I now need to figure out why it won't pair with my phone, but that's probably not a big issue.

Edit: Turns out I just needed to load another module, everything's working perfectly now.

----------

## yem

 *XPrulez wrote:*   

> In XP, you just plug it in and it works.  In Linux, you beat your head against a wall for a few days and give up.

 Jeez what an idiot.

1) If you get that I/O & seek error, try some other ports. /dev/ttyS4 works for me.

2) My 3Com bluetooth card does NOT work in XP! Surprised? Well I guess 3Com couldn't be bothered releasing proper working drivers for XP so you're stuck with a piece of crap 3rd party software that demands a license key (which I don't have and cannot obtain). Lucky linux has good hardware support eh?

----------

