Page 1 of 2 12 LastLast
Results 1 to 15 of 20

Thread: Bluetooth support in Oleg's firmware?

  1. #1
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    34

    Bluetooth support in Oleg's firmware?

    Hi Oleg,
    Could you compile bluetooth support directly in your firmware version?
    I think bluetooth is a widely requested feature; however, most of the people steer away from it because it's a hard task to implement and the success ratio is low.
    What's your opinion on the subject?

    Thanks for the precious work so far,

    MatB

  2. #2

    Bluetooth support

    I think it would be a great idea to have BT support in Oleg's brilliant firmware. Anybody else shares our interest? Oleg?

    Cheers,
    Ping

  3. #3
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    I don't have USB stick, as well the only bluetooth device which I'm owning is ipaq which has wi-fi too. So, no interest...

    BTW, what do you expect? Access point functionality for sharing internet connection? Just precompiled utilities?

  4. #4
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    34
    Quote Originally Posted by Oleg
    BTW, what do you expect? Access point functionality for sharing internet connection? Just precompiled utilities?
    Internet connection sharing would be very cool, but i think it's also harder to implement; the support for serial port profile (RFCOMM) would be also great.
    The problem of bluetooth on the wl500 is that a kernel module (possibly patched) is required; and the skills required by this task are way greater than the knowhow needed to compile user apps.
    The idea is that anyone with a bluetooth phone with the java bluetooth API could use the phone as graphic interface for the screenless router.
    I'm talking about a GUI to browse and play from one's mp3 collection (bemused client/server) or also a graphic interface for a voip softphone (linphone) or even a remote control for home automation (plug a usb parallel port with relais to switch stuff on and off). Whatever tickles your geek neuron... bt has a wide range of available devices waiting to be hacked.

  5. #5
    Quote Originally Posted by Oleg
    BTW, what do you expect? Access point functionality for sharing internet connection? Just precompiled utilities?
    For me is good to have ASUS in which I can insert bluetooth module and share internet connection with symbian mobile. I'm using GnuBox (http://gnubox.dnsalias.org/gnubox/) on my phone and there is a how to for linux - using 'DUN' profile. I try to downgrade to old firmware, install Affix, BlueZ, ... with no result. But I don't know anything about linux, I'm a Microsoft man ;o( There are many posts in this forum with bluetooth which is not working.

  6. #6
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    33
    Hi!

    Perhaps it may be interesting for you all to know, that I managed to compile the rfcomm.o kernel module for Oleg's firmware. I am not a great expert either in Linux or in the Bluetooth technology, so I might have taken the wrong way to do it. But as far as I tested it, this solution works fine. My router is WL-500gx, Bluetooth dongle is Bluetake BT009SX.

    Here is how I did it, step by step:

    1. Start with Oleg's firmware version 1.9.2.7-7f.
    2. Prepare the source code for compilation, as explained on http://oleg.wl500g.info/ .
    3. Download a Bluetooth patch for the Kernel 2.4.20 from here http://www.holtmann.org/linux/kernel/ . I used patch-2.4.20-mh4.gz as it was described on this page. It runs okay on my router, so I didn't try other patches. Most probably more recent ones will work too.
    4. Go to the Broadcom kernel source code directory (broadcom/src/linux) and extract the patch there.
    5. Make a copy of the linux directory under the name linux-2.4.20
    6. Apply the patch: patch -p0 < patch-2.4.20-mh4. It will say that some files are mismatched, but I didn't have any errors compiling them.
    7. Move your old linux directory to some safe location and replace it with the patched source tree instead.
    8. Go to the broadcom/src/gateway and run make menuconfig. You will see the RFCOMM option appear. Enable it, enable TTY support, save the configuration and recompile the firmware.

    My rfcomm.o module is in the attachment below. You may just put it on the router and use it, or recompile everything from scratch.
    Attached Files Attached Files
    Last edited by Gart; 23-02-2007 at 17:03.

  7. #7

    Wink

    Hello Garth.

    thanks for that.
    I tried that on my wl500g (oleg's 1.9.2.7-7f),
    but when I loaded the module I just got a bunch of errors:

    Code:
    [admin@wl500g tmp]$ insmod ./rfcomm.o
    insmod: unresolved symbol bluez_sock_unlink
    insmod: unresolved symbol bluez_accept_enqueue
    insmod: unresolved symbol bluez_sock_init
    insmod: unresolved symbol bluez_sock_link
    insmod: unresolved symbol bluez_accept_dequeue
    insmod: unresolved symbol bluez_sock_w4_connect
    insmod: unresolved symbol batostr
    insmod: unresolved symbol bluez_sock_register
    insmod: unresolved symbol bluez_sock_poll
    insmod: unresolved symbol bluez_sock_unregister
    any ideas?

    thanks
    [ WL-500G | fw: 1.9.2.7-7f ]

  8. #8
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    ipkg install bluez-utils

  9. #9
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    33
    Quote Originally Posted by gwl View Post
    Hello Garth.
    thanks for that.
    I tried that on my wl500g (oleg's 1.9.2.7-7f),
    but when I loaded the module I just got a bunch of errors:
    You need to load bluez.o first

  10. #10
    Quote Originally Posted by Gart View Post
    You need to load bluez.o first
    Quote Originally Posted by oleo View Post
    ipkg install bluez-utils
    thank you.
    I installed bluez-libs - 3.9-1 and bluez-utils - 3.9-1.
    And had bluez.o from bluez-1.9.2.7-6b.zip (I don't remember where I got this)
    (this zip includes bluez.o; bnep.o; hci_usb.o; l2cap.o)

    Now, after loading bluez.o, and then rfcomm.o, I don't get any errors.
    but when I plug in my bt dongle, I get in dmesg:
    hub.c: new USB device 00:04.0-1.3, assigned address 15
    usb.c: USB device 15 (vend/prod 0xa12/0x1) is not claimed by any active driver.

    I'm not sure if it's because of the bluez.o module I used...
    but my adapter (Conceptronic CBT200U2 ) should work...
    it's reported to work in the nslu2... http://www.nslu2-linux.org/wiki/Peri...uetoothAdapter

    could someone please upload bluez.o and other modules that might be needed for bluetooth? thank you.
    Last edited by gwl; 24-02-2007 at 18:03.
    [ WL-500G | fw: 1.9.2.7-7f ]

  11. #11
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    33
    Quote Originally Posted by gwl View Post
    thank you.
    Now, after loading bluez.o, and then rfcomm.o, I don't get any errors.
    but when I plug in my bt dongle, I get in dmesg:
    hub.c: new USB device 00:04.0-1.3, assigned address 15
    usb.c: USB device 15 (vend/prod 0xa12/0x1) is not claimed by any active driver.
    You also need to load hci_usb.o. This is the driver for the USB dongle itself.
    Here are the modules which might be needed for Bluetooth:
    bluez.o - main functionality
    hci_usb.o - USB dongle driver
    rfcomm.o - Radio COM-port
    bnep.o - Bluetooth network
    l2cap.o - L2CAP protocol, might be useful to ping Bluetooth devices
    sco.o - for Bluetooth audio
    After you load all the needed modules and insert the dongle it should print in the system log
    Code:
    Feb 23 21:39:48 kernel: BlueZ Core ver 2.2 Copyright (C) 2000,2001 Qualcomm Inc
    Feb 23 21:39:48 kernel: Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
    Feb 23 21:40:03 kernel: BlueZ L2CAP ver 2.1 Copyright (C) 2000,2001 Qualcomm Inc
    Feb 23 21:40:03 kernel: Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
    Feb 23 21:40:17 kernel: BlueZ SCO ver 0.3 Copyright (C) 2000,2001 Qualcomm Inc
    Feb 23 21:40:17 kernel: Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
    Feb 23 21:40:32 kernel: BlueZ BNEP ver 1.0
    Feb 23 21:40:32 kernel: Copyright (C) 2001,2002 Inventel Systemes
    Feb 23 21:40:32 kernel: Written 2001,2002 by Clement Moreau <clement.moreau@inventel.fr>
    Feb 23 21:40:32 kernel: Written 2001,2002 by David Libault <david.libault@inventel.fr>
    Feb 23 21:40:32 kernel: Copyright (C) 2002 Maxim Krasnyanskiy <maxk@qualcomm.com>
    Feb 23 21:40:38 kernel: BlueZ RFCOMM ver 0.4
    Feb 23 21:40:38 kernel: Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>
    Feb 23 21:40:38 kernel: Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org>
    Feb 23 21:40:44 kernel: BlueZ HCI USB driver ver 2.1 Copyright (C) 2000,2001 Qualcomm Inc
    Feb 23 21:40:44 kernel: Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
    Feb 23 21:40:44 kernel: usb.c: registered new driver hci_usb
    To make the router visible to other Bluetooth devices some additional steps may be required depending on your configuration

    1. The latest version of hcid daemon from bluez-utils needs to get dbus-daemon running. Its config file /opt/etc/dbus-1/system.conf expects the root user to be named "root" so you may need to change that to <user>admin</user>, and then start dbus-daemon --system

    2. Edit the hcid.conf file in /opt/etc/bluetooth . It's rather self-explanatory.

    3. Start the hcid daemon. If everything goes fine it should print in the system log
    Code:
    Feb 23 21:41:50 hcid[309]: HCI dev 0 registered
    Feb 23 21:41:50 hcid[309]: HCI dev 0 up
    Feb 23 21:41:50 hcid[309]: Device hci0 has been added
    Feb 23 21:41:50 input[311]: Bluetooth Input daemon
    Feb 23 21:41:50 hcid[309]: Starting security manager 0
    Feb 23 21:41:50 input[311]: Registered input manager path:/org/bluez/input
    Feb 23 21:41:50 hcid[309]: Device hci0 has been activated
    4. Type hciconfig hci0 up piscan to activate the dongle, and then hciconfig to check if the USB dongle is running. It should print something like this
    Code:
    hci0:   Type: USB
            BD Address: 00:02:5B:01:16:5E ACL MTU: 384:8 SCO MTU: 64:8
            UP RUNNING PSCAN ISCAN
            RX bytes:36390 acl:922 sco:0 events:1358 errors:0
            TX bytes:26231 acl:843 sco:0 commands:218 errors:0
    5. Start the sdpd daemon and use the sdptool to add local services to the Bluetooth dongle. For example, if you need a Bluetooth serial port on channel 2 type sdptool add --channel 2 SP

    6. After all that the router should be visible to other Bluetooth devices. You may use the rfcomm utility to make a serial port connection or dund to set up a PPP connection over Bluetooth.

    Any comments and suggestions are welcome.
    Attached Files Attached Files

  12. #12
    thanks Gart. great job.

    it's getting closer.
    now my BT adapter gets listed when I do hciconfig, I do get the MAC listed..
    and after I run "sdptool add --channel 2 SP", this adapter can be detected by other devices... (they display the my adapter's mac, and the name "CSR - bc4" (?!)

    but what I wanted was to link this BT adapter to a bluetooth GPS...
    the problem is that when I do:

    Code:
     [admin@wl blue]$ hcitool scan
    Scanning ...
    Inquiry failed: Success
    no devices are detected... but they're active.. and can be detected by another device...
    is there something else I should do, to be able to scan?

    thanks,



    UPDATE:
    although I can't detect the mac of the remote device, (by running "hcitool scan" on the router),
    I can do: "hcitool name <remote_MAC>", and I get the name of the device..
    "hcitool info <remote_MAC>" also works..

    but.. how can I search for the devices in the first place?
    Last edited by gwl; 25-02-2007 at 02:32.
    [ WL-500G | fw: 1.9.2.7-7f ]

  13. #13
    Join Date
    Feb 2006
    Location
    Moscow, Russia
    Posts
    33
    I have the same problem with "hcitool scan". I can't figure out why it fails to find anything... possibly it's a bug in the modules. At least you can connect directly to the device if you know its MAC address.

    This problem remains open for now. If somebody has any ideas, please help.

  14. #14
    Hello. I was compile bluez modules with recent patches (patch-2.4.20-mh18.gz) and problem with error "hcitool scan" seems to be resolved. On my WL-500gP with 1.9.2.7-7g firmware "hcitool scan" now shows correct list of available devices. Modules archive is attached to this post.
    Attached Files Attached Files
    Last edited by 3cky; 01-07-2007 at 10:45.

  15. #15
    Quote Originally Posted by 3cky View Post
    Hello. I was compile bluez modules with recent patches
    I have installed your modules and "hcitool scan" works well:
    Code:
    [admin@(none) root]$ hcitool scan
    Scanning ...
            00:16:41:05:DA:D7       RAKE
            00:01:E3:5F:BC:58       CX75
    But it fails during making serial port with rfcomm utility:
    Code:
    [admin@(none) root]$ rfcomm -A connect /dev/ttyU0 00:01:E3:5F:BC:58
    Can't connect RFCOMM socket: Resource temporarily unavailable
    In log I found stange lines after hcid has started:
    Code:
     
    hcid[16382]: Bluetooth HCI daemon
    hcid[16382]: Could not become the primary owner of org.bluez
    hcid[16382]: Unable to get on D-Bus
    Might the problem caused by pairing? How properly pair devices with BlueZ?
    Last edited by poptab; 25-07-2007 at 21:50.

Page 1 of 2 12 LastLast

Similar Threads

  1. Oleg's Firmware Wireless Driver Problem
    By tourettes in forum WL-500g Q&A
    Replies: 4
    Last Post: 05-05-2006, 12:20
  2. USB Auto Copy after Upgrading to Oleg's Firmware
    By tekfuel in forum WL-HDD Q&A
    Replies: 0
    Last Post: 26-02-2006, 22:21
  3. Replies: 0
    Last Post: 30-01-2006, 18:09
  4. Trying to get IDE working on Oleg's Firmware
    By hugo in forum WL-HDD Custom Development
    Replies: 34
    Last Post: 01-11-2004, 18:06
  5. Flashing Oleg's Firmware in WL HDD
    By hugo in forum WL-HDD Custom Development
    Replies: 29
    Last Post: 21-10-2004, 14:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •