OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
> Socket Bluetooth Rev G working with BlueZ out of the box
tumnus
post Jan 11 2004, 05:06 PM
Post #1





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



I've release another package that replaces /etc/pcmcia/serial with a hacked version. The upshot of this is with the latest BlueZ packages, the Socket Rev G card should work out of the box, fingers crossed. For other CSR UART based cards see further down.

To summarize; uninstall any previous BlueZ packages and install the following packages:

http://www.cpinkney.org.uk/susp-resume_0.9-3.1.ipk
http://zaurus.newkirk.us/sudo_0.1_arm.ipk
http://community.zaurus.com/download.php/5...2.4.18d_arm.ipk (or http://community.zaurus.com/download.php/5...preempt_arm.ipk if you are using a pre-emptive patched kernel)
http://community.zaurus.com/download.php/4...z_0.9.1_arm.ipk
http://community.zaurus.com/download.php/5...ial_0.1_arm.ipk (NOTE: This replaces /etc/pcmcia/serial so you will lose any changes you have made to it and it is restored to the Sharp default if you uninstall this package)

Then follow this howto:
http://www.zaurususergroup.com/modules.php...ename=Bluetooth

This may make it easier to get other CSR UART based cards working too that are awkward like the Socket Rev G card (such as the Mavin, Brain Box, Billionton and Bluetake cards). With these cards you should only have to install the packages above, add a line to /etc/bluetooth/uart in the same format as the existing line and follow the howto above.

The format of /etc/bluetooth/uart is:

CODE
<Product_Info>:<hciattach parameters>


Where <Product_Info> is the product info text given by the command 'cardctl ident' with the CF card plugged in.

It is done like this as different CSR based cards seem to require different hciattach parameters, although all of them should start with "/dev/ttyS3" and some may only require that. You might have to search around a bit and play to find the correct hciattach parameters.

Please let me know if you get the Socket Rev G card working ok with these packages and if any other cards work with this.

One of these days I am going to get my finger out and finish my Bluetooth GUI so that all of this can be done with a nice graphical interface.

Enjoy smile.gif
Go to the top of the page
 
+Quote Post
doublec
post Jan 11 2004, 06:22 PM
Post #2





Group: Members
Posts: 92
Joined: 2-January 04
Member No.: 1,338



Some of these links seem to have '..' in them and they don't work as a result.
Go to the top of the page
 
+Quote Post
tumnus
post Jan 12 2004, 12:19 AM
Post #3





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



Oops. It was late and I copied and pasted my post from the DevNet forums. Thanks for pointing that out. I've fixed the post above.
Go to the top of the page
 
+Quote Post
n8a
post Jan 12 2004, 10:12 PM
Post #4





Group: Members
Posts: 235
Joined: 5-January 04
From: Chicago, Illinois
Member No.: 1,359



QUOTE
The format of /etc/bluetooth/uart is: 

Code: 
<Product_Info>:<hciattach parameters> 


Where <Product_Info> is the product info text given by the command 'cardctl ident' with the CF card plugged in. 

It is done like this as different CSR based cards seem to require different hciattach parameters, although all of them should start with "/dev/ttyS3" and some may only require that. You might have to search around a bit and play to find the correct hciattach parameters.


tumnus - I hate to admit it, but I may need the "for dummies" version of this. I do realize that you have better things to do, but humor me please wink.gif

My results of $ cardctl ident:
# cardctl ident
Socket 0:
product info: "AmbiCom BT2000C", "Bluetooth PC/CF Card
manfid: 0x022d, 0x2000
function: 2 (serial)
Socket 1:
no product info available
#

So, I would have to presume that the code that I would put in /etc/bluetooth/uart would be:

"AmbiCom BT2000C", "Bluetooth PC/CF Card":/dev/ttyS3 bcsp 230400

Then, for the first time ever, the following statement returned something:

# hciattach /dev/ttyS3 bcsp 230400

BCSP initialization timed out
#

Wow. Too bad it wasn't something better tongue.gif

I then started trying some additional points in the following thread:
http://www.zaurus.com/dev/board/index.php?...=5175&hl=socket (which you suggested checking out earlier)

I did the following:

# cd bluetooth
# ls
bluecard_cs.o bt950_cs.o dtl1_cs.o hci_vhci.o
bt3c_cs.o btuart_cs.o hci_uart.o
# cp /mnt/card/Documents/hci_bcsp.o .
# ls
bluecard_cs.o bt950_cs.o dtl1_cs.o hci_uart.o
bt3c_cs.o btuart_cs.o hci_bcsp.o hci_vhci.o
# depmod -a
# hciattach /dev/ttS3 bcsp 230400
Can't open serial port: No such file or directory
Can't initialize device: No such file or directory
#

You note the following in one of the posts in that thread:
"Oh, and remember to ensure that it uses the hci_uart driver too. That will probably require adding an entry to /etc/pcmcia/bluetooth.conf and a restart of pcmcia."

In /etc/pcmcia/bluetooth.conf, I found the following entry:
device "hci_uart"
class "bluetooth" module "hci_uart"

Is that sufficient for what you were getting at in that post?

I also tried the following:
# hciattach /dev/ttyS3 csr
Initialization timed out.
#

Also, when I restarted my Z, I got the following lines in my dmesg:

# dmesg
<cut most of output>
BlueZ Core ver 2.3 Copyright © 2000,2001 Qualcomm Inc
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
BlueZ L2CAP ver 2.3 Copyright © 2000,2001 Qualcomm Inc
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
BlueZ RFCOMM ver 1.0
Copyright © 2002 Maxim Krasnyansky <maxk@qualcomm.com>
Copyright © 2002 Marcel Holtmann <marcel@holtmann.org>
This function is not support 411c
#

Don't know what that last comment was about!?!

Again, I was surprised that I received a response at all from hciattach, but now I am again stumped... Anything additional? Could the problem be my hciattach parameters? Thanks much again for any help.
Go to the top of the page
 
+Quote Post
doublec
post Jan 13 2004, 12:59 AM
Post #5





Group: Members
Posts: 92
Joined: 2-January 04
Member No.: 1,338



># depmod -a
># hciattach /dev/ttS3 bcsp 230400
>Can't open serial port: No such file or directory
>Can't initialize device: No such file or directory

In the above you've got the device wrong. It should be /dev/ttyS3 and this is probably why it is saying no such file or directory. Maybe it was a typo when entering it into the forum but thought I'd better run it by you. I hope you get it working. I've got a billionton card which has the same manfid as yours so if you get yours working there's hope for me too.

Chris.
Go to the top of the page
 
+Quote Post
tumnus
post Jan 13 2004, 01:04 AM
Post #6





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



I'm not even sure the Ambicom BT2000C card uses the CSR chipset, but it was just something to try. 'cardctl ident' does say it is a serial card, which is promising. You got the format of /etc/bluetooth/uart correct, but it's simply a case of playing around with the hciattach paramters.

A lot of the stuff from that DevNet thread is old. I was just guessing at things for people to try. What you might need to do is remove the Ambicom entry (not the hci_uart entry) from /etc/pcmcia/bluetooth.conf and then run the following command as root and see if 'hciconfig' prints out anything:

/etc/rc.d/init.d/bluetooth restart

Maybe we need to ask Ambicom which chipset the BT2000C uses and if it does use CSR then what protocol it uses etc
Go to the top of the page
 
+Quote Post
tumnus
post Jan 13 2004, 03:29 AM
Post #7





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



Actually, I just realised there isn't an entry for the Ambicom BT2000C model in the current bluetooth.conf. So it should be registering as a serial CF card. You just need to search the web a bit or try different hciattach parameters like '/dev/ttyS3' on its own etc.
Go to the top of the page
 
+Quote Post
post Jan 13 2004, 09:35 AM
Post #8





Group:
Posts: 0
Joined: --
Member No.: 0



I also have one of these BT2000C cards, which I haven't yet got working. I have been following the recent threads and think I have tried most of what is here. I thought that I had struck gold when I managed to get a response from hciconfig but I don't seem to be quite there yet.

Here's what I have done:

1. emailed support@ambicom.com asking for technical info on the BT2000C, waiting for reply.

2. installed all the packages suggested by tumnus earlier in this thread.

3. discovered that something interestingly different happens if I

# modprobe hci_uart

before trying to use hciattach

4. run through all the different (are they?) protocols listed by

# hciattach -l

the results of this are as follows:
bcsp, csr, texas, bboxes, comone - all report a timeout
zircom - reports unknow device type or id
swave - reports failed to write init command: Success; can't initialize device: Success
any, digi, picocard, ericsson, inventel - all report nothing

and then when I do

5.
# hciconfig

I get some results:-

hci0: Type: UART
BD Address: 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:4 acl:0 sco:0 commands:1 errors:0

which looks like the card is not replying with anything sensible

6.
# hciconfig hci0 up

gives: Can't init device hci0. Connection timed out (110)

This seems to be a step forward from "device doesn't exist" that I got with this command previously.

7. Now the truth is that I don't really understand what's going on, I'm just trying things, but maybe someone with a better understanding can offer some further suggestions.

QUESTION:

Is hci_uart the correct kernel module to be using? It looks like it is, but I wouldn't know.

Tony
Go to the top of the page
 
+Quote Post
ajaustin
post Jan 13 2004, 09:37 AM
Post #9





Group: Members
Posts: 26
Joined: 11-November 03
Member No.: 881



Sorry, I forgot to login for previous post.
Go to the top of the page
 
+Quote Post
tumnus
post Jan 13 2004, 02:05 PM
Post #10





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



I don't know quite what is going on there, but you almost certainly need a BlueZ driver loaded to use any BT CF card. Whether the Ambicom BT2000C needs the hci_uart module and with what hciattach parameters I do not know. It is clearly a UART based card and there is only one other UART BlueZ driver, btuart, but that works like the rest of the BlueZ drivers and I thought had been tried.
Go to the top of the page
 
+Quote Post
doublec
post Jan 13 2004, 02:31 PM
Post #11





Group: Members
Posts: 92
Joined: 2-January 04
Member No.: 1,338



When I insert the Billionton card (same manfid as the BT2000C) demsg has a log note saying that the uart is a 16C950/954. If I run 'setserial /dev/ttyS3' it reports the uart is unknown. Trying 'setserial /dev/ttyS3 uart 16950' gives an error the it doesn't know what a 16950 is. Looking at the options for setserial it only knows up to 16750. Could this be causing a problem? Is a newer version of setserial (or related functions) available?

BTW, if you try the different hciattach options and then do a 'dmesg' you'll see a stream of errors for those that seems to work.
Go to the top of the page
 
+Quote Post
tumnus
post Jan 13 2004, 03:00 PM
Post #12





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



I don't know if it makes any difference, but the Billionton card will be recognised as a serial CF card, which means /etc/pcmcia/serial will be executed for it and that does some setserial stuff.

On another note, in the following two DevNet threads, the poster gurj seems to suggest the Bluetake card will work just by adding an entry for it to '/etc/bluetooth/uart' with the hciattach parameters '/dev/ttyS3 bcsp':

http://www.zaurus.com/dev/board/index.php?...?showtopic=4752
http://www.zaurus.com/dev/board/index.php?...?showtopic=4274
Go to the top of the page
 
+Quote Post
n8a
post Jan 13 2004, 04:03 PM
Post #13





Group: Members
Posts: 235
Joined: 5-January 04
From: Chicago, Illinois
Member No.: 1,359



As confirmation before I start to delve into all of the posts today, for the latest AmbiCom BT2000-CF © card, technical support confirmed that the chipset is CSR, which uses the standard 1.1 protocol.

I'm going to try to play around with the hciattach parameters now to see if I can achieve any different results.

tumnus - I definitely noticed that the DevNet posts were old, but it was certainly worth a try and with every additional attempt I'm learning a little more about the intricacies of devices on the Zaurus/Linux.

Cheers
Nate
Go to the top of the page
 
+Quote Post
n8a
post Jan 13 2004, 09:02 PM
Post #14





Group: Members
Posts: 235
Joined: 5-January 04
From: Chicago, Illinois
Member No.: 1,359



QUOTE
In the above you've got the device wrong. It should be /dev/ttyS3 and this is probably why it is saying no such file or directory. Maybe it was a typo when entering it into the forum but thought I'd better run it by you. I hope you get it working. I've got a billionton card which has the same manfid as yours so if you get yours working there's hope for me too.

Thanks, Chris - That was a command line error, and defn the reason that I got that different error message. I just tried it again (just in case) and got the following expected result:

# hciconfig
#
and
# hciattach /dev/ttyS3 bcsp 230400
BCSP initialization timed out
#
arrgh!!
Go to the top of the page
 
+Quote Post
n8a
post Jan 13 2004, 09:52 PM
Post #15





Group: Members
Posts: 235
Joined: 5-January 04
From: Chicago, Illinois
Member No.: 1,359



QUOTE
I'm not even sure the Ambicom BT2000C card uses the CSR chipset, but it was just something to try. 'cardctl ident' does say it is a serial card, which is promising. You got the format of /etc/bluetooth/uart correct, but it's simply a case of playing around with the hciattach paramters.


I confirmed with AmbiCom that the BT2000C card uses the CSR chipset. What would some additional parameters be that I could try? I have little experience with hciattach and the -h does not reveal much.

QUOTE
A lot of the stuff from that DevNet thread is old. I was just guessing at things for people to try. What you might need to do is remove the Ambicom entry (not the hci_uart entry) from /etc/pcmcia/bluetooth.conf and then run the following command as root and see if 'hciconfig' prints out anything:

/etc/rc.d/init.d/bluetooth restart


Did this and got the usual result:

# /etc/rc.d/init.d/bluetooth restart
Shutting down Bluetooth... Done.
Starting Bluetooth... Done.
# hciconfig
# hciattach /dev/ttyS3 bcsp 230400
BCSP initialization timed out
# hciattach -h

QUOTE
Maybe we need to ask Ambicom which chipset the BT2000C uses and if it does use CSR then what protocol it uses etc


BT2000C uses CSR chipset with the standard 1.1 protocol. Unfortunately, that means a lot more to you than me! wink.gif

It seems that CSR was a later chipset that replaced older (Z compatible) chipsets, and that it requires some special tweaks... at least that's what I'm learning. Any idea why Socket/AmbiCom and others are using that chipset rather than the old chipsets? Just curious.

I will try some more tweaks, but as usual if there is anything that you can think of, please let me know. Thanks-
Go to the top of the page
 
+Quote Post

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th May 2013 - 04:55 AM