Author Topic: Socket Bluetooth Rev G working with BlueZ out of the box  (Read 10589 times)

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Socket Bluetooth Rev G working with BlueZ out of the box
« on: January 11, 2004, 08:06:03 pm »
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: [Select]
:

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
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

doublec

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://radio.weblogs.com/0102385/categories/zaurus/index.html
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #1 on: January 11, 2004, 09:22:35 pm »
Some of these links seem to have \'..\' in them and they don\'t work as a result.

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #2 on: January 12, 2004, 03:19:10 am »
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.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #3 on: January 13, 2004, 01:12:28 am »
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

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

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.

doublec

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://radio.weblogs.com/0102385/categories/zaurus/index.html
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #4 on: January 13, 2004, 03:59:17 am »
]# 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.

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #5 on: January 13, 2004, 04:04:00 am »
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
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #6 on: January 13, 2004, 06:29:48 am »
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.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

Anonymous

  • Guest
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #7 on: January 13, 2004, 12:35:46 pm »
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

ajaustin

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • http://
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #8 on: January 13, 2004, 12:37:33 pm »
Sorry, I forgot to login for previous post.
UK SL5500 with tkcROM 2.0alpha3 - /home on SD, eXpansys (\"integral\" brand) 256MB SD card,
AmbiCom WL1100C-CF WiFi card, Blue Monkey LSE039 Bluetooth CF Card,
32MB SanDisk CF card to flash from.
Gentoo Linux 1.4 on my PCs.

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #9 on: January 13, 2004, 05:05:01 pm »
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.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

doublec

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://radio.weblogs.com/0102385/categories/zaurus/index.html
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #10 on: January 13, 2004, 05:31:25 pm »
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.

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #11 on: January 13, 2004, 06:00:46 pm »
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
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #12 on: January 13, 2004, 07:03:22 pm »
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

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #13 on: January 14, 2004, 12:02:00 am »
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!!

n8a

  • Full Member
  • ***
  • Posts: 235
    • View Profile
    • http://
Socket Bluetooth Rev G working with BlueZ out of the box
« Reply #14 on: January 14, 2004, 12:52:26 am »
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!

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-