Bluetooth & D-Bus, January 08

Core libraries and systems
Message
Author
klasu777
Posts: 17
Joined: Thu 09 Apr 2009, 04:12

#81 Post by klasu777 »

Cool, thanks. I installed the package and i think i'm halfway through it. I now have the following files in my installation:

/lib/modules/2.6.18.1/kernel/net/bluetooth
/lib/modules/2.6.18.1/kernel/net/bluetooth/bluetooth.ko
/lib/modules/2.6.18.1/kernel/drivers/bluetooth
/sys/bus/bluetooth
/sys/class/bluetooth
/sys/module/bluetooth
/sys/bus/platform/devices/bluetooth
/sys/devices/platform/bluetooth

My question is now, how do i move from there? Is the driver loaded automatically with the OS?

I tried the following commands and they went just fine (that is, without any output or complain):

modprobe bluetooth
modprobe l2cap
modprobe rfcomm
modprobe hci-usb

Do i need them at all? In contrary, the following commands are not available:

hcid, sdpd, hciconfig, hcitool, etc.

Are they only for most recent version of BlueZ?

I tend to remember that the original link that you posted included a start script. Could you share it again?

Klaus.

klasu777
Posts: 17
Joined: Thu 09 Apr 2009, 04:12

#82 Post by klasu777 »

I found the starting script that was posted with BlueZ 2.10 source code. the content is this:

insmod /lib/modules/2.6.18.1/kernel/net/bluetooth/bluetooth.ko
insmod /lib/modules/2.6.18.1/kernel/net/bluetooth/l2cap.ko
insmod /lib/modules/2.6.18.1/kernel/net/bluetooth/rfcomm/rfcomm.ko
insmod /lib/modules/2.6.18.1/kernel/drivers/bluetooth/hci_usb.ko

/bt/hciconfig hci0 up
/bt/rfcomm bind 0 00:17:D5:A6:29:60 1
hcid
/bt/sdpd
ln -s /dev/rfcomm0 /dev/modem
/bt/sdptool add lan
/bt/sdptool add nap
/bt/sdptool add gn

The five first instructions are not needed because pupget does this when installing the package. All other commands fail because there is no hciconfig, rfcomm, hcid, spdtool tools.

Klaus.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#83 Post by tempestuous »

klasu777 wrote:I now have the following files in my installation:
...
/lib/modules/2.6.18.1/kernel/net/bluetooth/bluetooth.ko
No no. These are the bluetooth kernel modules, which you probably got from
http://www.murga-linux.com/puppy/viewto ... 5384#85384
or
http://www.debernardis.it/dotpups/bluet ... 6.18.1.pup
but they are only missing in Puppy v2.12 and 2.13.
Puppy 2.14 already contains the bluetooth kernel modules as standard.
klasu777 wrote:the following commands are not available:
hcid, sdpd, hciconfig, hcitool, etc.
Then you're getting confused. These utilities are definitely contained in
http://www.debernardis.it/dotpups/experimental_BT_1.pup
Go back and install it again.
klasu777 wrote:I found the starting script that was posted with BlueZ 2.10 source code
Well the best (Puppy-compatible) bluetooth setup commands are in the first post in this thread ...
... but ignore the first D-Bus related commands, because these older bluetooth libraries are not dependent on D-Bus.

klasu777
Posts: 17
Joined: Thu 09 Apr 2009, 04:12

#84 Post by klasu777 »

You are right. Somehow things got mixed up here. I now installed the experiemental_BT_1.pup. The strange thing is that all tools supposed to enable automatic pup package installation aren't working.

Anyway i extracted the file and ran the dotpup.sh script. All the commands that i claim to be missing are there.

Now, the following line that i'm supposed to run to get things started is making problems:

insmod /lib/modules/2.6.18.1/kernel/drivers/bluetooth/hci_usb.ko

The hci_usb.ko file cannot be found.

As a consequence the command "hciconfig hci0 up" doesn't work. i get the error message: "Can't get device info: No such device".

Beside that, all other commands work except the last one that return "Failed to open control socket: Protocl not supported".

And the light on my USB dongle is still off.
Any clue?

Thanks,
Klaus.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#85 Post by tempestuous »

klasu777 wrote:The strange thing is that all tools supposed to enable automatic pup package installation aren't working.
Dotpups and dotpets will fail to install properly if they are located in a directory path containing spaces. Spaces should not be used for Linux files and directories.
klasu777 wrote:insmod /lib/modules/2.6.18.1/kernel/drivers/bluetooth/hci_usb.ko
The hci_usb.ko file cannot be found.
That's because with the Puppy 2.x series "non-standard" kernel modules were stored in a separate compressed file called "zdrv_..", and the insmod command does not have the logic to find them.

Where are you getting those instructions? Don't use them. Trust me - use the instructions in the first post in this thread. You will see that this is the command that should be used -

Code: Select all

modprobe hci-usb

klasu777
Posts: 17
Joined: Thu 09 Apr 2009, 04:12

#86 Post by klasu777 »

Thank you. That was an amazing service. My dongle is now turned on. Two more questions:

1) May i send you some bounty?
2) The package does not contain OBEX. Any idea how to install that?

Klaus.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#87 Post by tempestuous »

Older versions of OpenOBEX now here -
http://www.murga-linux.com/puppy/viewto ... 5384#85384

jakfish
Posts: 762
Joined: Fri 18 Jul 2008, 19:09

#88 Post by jakfish »

Just a note to say that because of the work of so many and the great pets listed in this thread, it's possible to connect Puppy 4.1.2 to a Ericsson T39m via bluetooth and surf/email. Here are the configured files:

/etc/bluetooth/hcid.conf

#
# HCI daemon configuration file.
#

# HCId options
options {
# Automatically initialize new devices
autoinit yes;

# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security user;

# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;

# Default PIN code for incoming connections
passkey "1234";
}

# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "BlueZ (%d)";

# Local device class
class 0x000100;

# Default packet type
#pkt_type DH1,DM1,HV1;

# Inquiry and Page scan
iscan enable; pscan enable;

# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept,master;

# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
}


/etc/bluetooth/rfcomm.conf

#
# RFCOMM configuration file.
#

rfcomm0 {
# # Automatically bind the device at startup
bind yes;
#
# # Bluetooth address of the device
device 00:80:37:01:86:E6;
#
# # RFCOMM channel for the connection
channel 1;
#
# # Description of the connection
comment "Example Bluetooth device";
}


/etc/wvdial.conf

[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Carrier Check = no
Dial Command = ATDT
Phone = *99***1#
Username = web
Password = web
Stupid Mode = yes
Auto Reconnect = no


And here is the script I use to start things up:

rm -f /var/run/dbus/*
dbus-uuidgen --ensure
dbus-daemon --system
sleep 1
modprobe bluetooth
modprobe l2cap
modprobe rfcomm
modprobe hci-usb
sleep 2
hcid
sdpd
passkey-agent --default 1234 &
sleep 1
rfcomm bind /dev/rfcomm0 00:80:37:01:86:E6 1


Addendum 1: in the helpful experimental bluetooth wiki, it's suggested that you pair THROUGH THE PHONE, and that worked for me.

Addendum 2: obviously, dialed number/password/etc are country/user specific. But what is interesting with the Ericson T39m (and perhaps other phones), if you program the APN/DSN addresses into the phone, you do not need to include this info in your pupdial modem dialout or anywhere else in puppy. I found that by simply dialing the GPRS number, the T39m did the rest.

I realize this is an ancient phone (I need a phone with infrared to connect to my Psion), but perhaps this will help other users nonetheless, and my gratitude to the many who helped out with puppy bluetooth.

Jake

User avatar
didik
Posts: 44
Joined: Mon 05 Jan 2009, 10:34
Location: Bandung, Indonesia
Contact:

#89 Post by didik »

klasu777 wrote: Do i need them at all? In contrary, the following commands are not available:

hcid, sdpd, hciconfig, hcitool, etc.

Are they only for most recent version of BlueZ?

Klaus.
So, where are hcid, sdpd commands?
bluez-4.40 doesn't include those daemons.

-eko didik widianto
bandung@indonesia

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#90 Post by Chewi »

Stereo Bluetooth is another name for A2DP so yes. I think most Bluetooth capable phones have it so I wouldn't say it's anything special.
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#91 Post by edoc »

limberly wrote:What's the difference between Bluetooth and Stereo Bluetooth?
I'm planning on buying a new cell phone, and one of the features is stereo Bluetooth. The phone can also play MP3s, so does this mean I can listen to music through my Bluetooth earpiece?[/url]
No.

You must get a device specifically equipped with the chipset for listening to music - it is kinda dumb but for some reason they have locked-out the freedom to stream mono-audio to regular Bluetooth devices. Sigh.

Most of the devices capable of music get poor reviews for comfort, durability, and/or quality of sound and all appear to be dual-ear (which means unsafe when driving or biking).
[b]Thanks! David[/b]
[i]Home page: [/i][url]http://nevils-station.com[/url]
[i]Don't google[/i] [b]Search![/b] [url]http://duckduckgo.com[/url]
TahrPup64 & Lighthouse64-b602 & JL64-603

dogle
Posts: 409
Joined: Thu 11 Oct 2007, 12:41

Bluetooth

#92 Post by dogle »

I've been trying unsuccessfully to set up Bluetooth in 4.3.1 using tempestuous' .pets as described in this thread. (I'm aware that jemimah has been doing further work in connection with pupeee but gather that Bluetooth wise this is still a work in progress more generally).

Although the said .pets were intended to play happily with 4.x series, with the advent of 4.3 the kernel was upgraded from 2.6.25.16 to 2.6.30.5. With my 4.3.1, the requisite modprobes seem unable to find the requisite kernel modules.

Has anyone been able to use tempestuous' excellent work to kick off Bluetooth after 4.2?

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#93 Post by tempestuous »

I haven't used Bluetooth since way back in Puppy 3.x, so I just booted the Puppy 4.3 CD now and I see that these modules are still present:
bluetooth
l2cap
rfcomm

but the hci-usb module is missing.
Google tells me that this module has been replaced in more recent kernels by the btusb module. I have just updated the first post with this information.

Post Reply