Bluetooth support in Puppy

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
edoc
Posts: 4729
Joined: Sun 07 Aug 2005, 20:16
Location: Southeast Georgia, USA
Contact:

#21 Post by edoc »

[quote="steevieb"]I do not have that folder either. My main folder seems to be /usr/include/dbus-1.0/dbus/

Did you download
bluez-firmware-1.2.pet
dbus-1.0.2.pet
bluez-libs-3.9.pet
bluez-utils-3.9.pet
from http://www.murga-linux.com/puppy/viewto ... 474#115474
[//quote]

OK, went back, downloaded and installed those and walked through the
steps:

sh-3.00# modprobe bluetooth

sh-3.00# modprobe l2cap

sh-3.00# dbus-daemon --system
sh-3.00# hcid
sh-3.00# modprobe rfcomm

sh-3.00# modprobe hci-usb

sh-3.00# hciconfig hci0 up
Can't get device info: No such device

I didn't have the USB-Bluetooth Adapter inserted, did so then tried again ...

sh-3.00# hciconfig hci0 up
sh-3.00# hcitool scan
Scanning ...
00:0A:3A:1F:D5:8A BT GPS
sh-3.00# sdptool browse 00:0A:3A:1F:D5:8A #<-BT
Browsing 00:0A:3A:1F:D5:8A ...
sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A 9 #<-BT GPS
sh: obex_test: command not found

Downloaded & installed openobex-1.3+apps.pet ...

sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A 9 #<-BT GPS
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.
>

HOORAY! No more errors. :-)

Now what, please?

My GPS Bluetooth Atmel Antaris4 still does not connect with my generic
USB-Bluetooth Adapter.

Do I need to open GPSdrive?
[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

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#22 Post by steevieb »

Yes, open GPSdrive first.

Just enter
sh-3.00# sdptool browse 00:0A:3A:1F:D5:8A
This should give you a channel number.
Then enter
sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A
with a space and then your channel number on the end, eg;
sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A 1


The only obex commands I know are;

c to connect
x <filename> to push file to phone eg; > x /root/bluetooth2
p to push a file to phone
g to get a file from phone (not tried this yet)
q to quit

so once obex is running enter c
then enter x <filename>

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

#23 Post by edoc »

steevieb wrote:Yes, open GPSdrive first.

Just enter
sh-3.00# sdptool browse 00:0A:3A:1F:D5:8A
This should give you a channel number.
Then enter
sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A
with a space and then your channel number on the end, eg;
sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A 1


The only obex commands I know are;

c to connect
x <filename> to push file to phone eg; > x /root/bluetooth2
p to push a file to phone
g to get a file from phone (not tried this yet)
q to quit

so once obex is running enter c
then enter x <filename>
(NOTE: Something, perhaps GPS-drive, perhaps one of the Bluetooth apps,
is slamming my laptop -- extremely high resource usage -- caused the laptop
to shut down earlier. I have a cooling rack from the Out house under the laptop
at the moment!

Anyhow, here is what happens when I go through the steps ...

sh-3.00# modprobe bluetooth

sh-3.00# modprobe l2cap

sh-3.00# dbus-daemon --system
Failed to start message bus: The pid file "/usr/run/dbus/pid" exists, if the message bus is not running, remo ve this file
sh-3.00# hcid
sh-3.00# modprobe rfcomm

sh-3.00# modprobe hci-usb

sh-3.00# hciconfig hci0 up
sh-3.00# hcitool scan
Scanning ...
00:0A:3A:1F:D5:8A BT GPS
sh-3.00# sdptool browse 00:0A:3A:1F:D5:8A
Browsing 00:0A:3A:1F:D5:8A ...
sh-3.00# obex_test -b 00:0A:3A:1F:D5:8A 1
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.
> c
Unknown event 05!
Error while doing OBEX_HandleInput()
>

I was afraid that the stress was going to crash my laptop so I rushed my
post.

When I looked closely I noticed that I was never given a Channel Number,
only "BT" and "GPS".

I tried Channels 1 through 6 and received
"Transport connect error! (Bluetooth)"

I also tried "BT" with the same result.

How do force OBEX to reveal the Channel Number?

Is 1 - 6 the full range of available Channel Numbers?
[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

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#24 Post by John Doe »

check this out:

http://www.elisanet.fi/tapio.tolvanen/g ... readme.txt

not sure where that gps.id goes.

I thought I saw somewhere a way to link /dev/rfcomm0 to tty0 or something and GpsDrive would see it that way.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#25 Post by John Doe »

edoc wrote:I was afraid that the stress was going to crash my laptop so I rushed my
post.
open xterm and type 'top' next time to see what's running the processor so hard.

Do you have acpi going (if you have it)?

Code: Select all

#!/bin/sh
modprobe ac
modprobe battery
modprobe fan
modprobe processor
modprobe thermal
#/proc/acpi/thermal_zone/THM0/polling_frequency
wmpower -no-meddling &

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#26 Post by steevieb »

BT GPS is the bluetooth name of the remote device (GPS receiver)
My phone has channel numbers up to 10, my GPS seems to have only one.
In total I believe there are 16 channels.

try this (with no channel number)

sh-3.00# rfcomm connect rfcomm0 00:0A:3A:1F:D5:8A


It should then give something like;

Connected /dev/rfcomm0 to 00:02:C7:2A:4B:91 on channel 1
Press CTRL-C for hangup


It seems to find the channel automatically this way.

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

#27 Post by edoc »

John Doe wrote:
edoc wrote:I was afraid that the stress was going to crash my laptop so I rushed my
post.
open xterm and type 'top' next time to see what's running the processor so hard.
It was two sessions of GSP-drive, actually it showed up as three of one and
two of another but when I killed the first one the others did not respond
saying that they had already been killed and the same happened with the
second set of two.
John Doe wrote: Do you have acpi going (if you have it)?

Code: Select all

#!/bin/sh
modprobe ac
modprobe battery
modprobe fan
modprobe processor
modprobe thermal
It appears that I do not ...

sh-3.00# modprobe ac
FATAL: Module ac not found.
sh-3.00# modprobe battery
FATAL: Module battery not found.
sh-3.00# modprobe fan
FATAL: Module fan not found.
sh-3.00# modprobe processor
FATAL: Module processor not found.
sh-3.00# modprobe thermal
FATAL: Module thermal not found.
John Doe wrote:

Code: Select all

#/proc/acpi/thermal_zone/THM0/polling_frequency
wmpower -no-meddling &
Here is what shows up in my acpi folder ...

sh-3.00# cd /proc/acpi/
sh-3.00# ls
alarm embedded_controller fadt power_resource wakeup
dsdt event info sleep
sh-3.00#
[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

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

#28 Post by edoc »

steevieb wrote:BT GPS is the bluetooth name of the remote device (GPS receiver)
My phone has channel numbers up to 10, my GPS seems to have only one.
In total I believe there are 16 channels.

try this (with no channel number)

sh-3.00# rfcomm connect rfcomm0 00:0A:3A:1F:D5:8A


It should then give something like;

Connected /dev/rfcomm0 to 00:02:C7:2A:4B:91 on channel 1
Press CTRL-C for hangup


It seems to find the channel automatically this way.
I get this:

sh-3.00# rfcomm connect rfcomm0 00:0A:3A:1F:D5:8A
Can't connect RFCOMM socket: Host is down
[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

schapus
Posts: 1
Joined: Mon 04 Jun 2007, 07:32

Bluetooth with several USB dongles

#29 Post by schapus »

Dear all,

I use Puppy 2.16, and so far I've been successful with getting bluetooth working - thanks to everyone here ! :)

Puppy is amazing : as soon as I plug a dongle, it works ! But now, what if I need to use several bluetooth USB dongles ?

I need to use obex, so I've installed obex_test, but I don't know how to say to obex_test which dongle I want to use.

This is supposed to work this way : obex_test -u interface_number

But I've tried 283592385925 ways of interface_number, and I only get a "invalid interface number" error message...

With hci commands, this seems to be better.

I stop the first dongle :
# hciconfig hci0 down

Then, I start the second one :
# hciconfig hci1 up

Then, I scan
# hcitool scan

And it works !

But this is because when I run a "hcitool scan" command, I don't need to indicate which dongle I want to use.

Anyone knows, with HCI or anything else (ideally Obex...) how I could choose which Dongle I want to use for each operation ?

To make it clear : I need to be able to send a file to every bluetooth device that can be detected around. Each, say, 5 minutes, I need perform a scan. And then, to (try to) send a file to any available bluetooth device that has not received it yet. So, depending on the number of targets, I might need to use 2 or 3 dongles at a time...

Long life to Puppy ! :)
Steph

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

Re: Bluetooth with several USB dongles

#30 Post by edoc »

schapus wrote:Dear all,
I use Puppy 2.16, and so far I've been successful with getting bluetooth working - thanks to everyone here ! :)
I didn't know that 2.16 had been released!


WHY can we not receive a "push-mail" notifying us of such important events?

I will download and upgrade and see what happens.

Thanks for the heads-up ... sure is a very odd and ineffective way to communicate version upgrades to users! :roll:
[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

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#31 Post by steevieb »

edoc wrote:

I get this:

sh-3.00# rfcomm connect rfcomm0 00:0A:3A:1F:D5:8A
Can't connect RFCOMM socket: Host is down
Did you enter all the commands again? Seem to need to do this every boot.
Edit: I got this error when I tried to connect the computer to the GPS when there was already a connection made with the phone. Seems it thinks it is down when it is busy.

BTW, I now get no GPS data from the GPS although bluetooth connects ok. It was very hot last time I used used it so it may have overheated, or I may have to reset it somehow. I have tried taking the battery out for a while.

I made a script that runs from the desktop for the bluetooth commands. Open Geany, copy and paste, save it, open Rox, drag file to desktop, right click and make executable. I also added a bluetooth logo.

One click now sets up my bluetooth devices and opens rxvt ready for commands.
Is there any way to enter a command automatically when rxvt starts?

Code: Select all

#! /bin/sh
dbus-daemon --system
hcid
modprobe rfcomm
modprobe hci-usb
hciconfig hci0 up
modprobe bluetooth 
modprobe l2cap
exec rxvt

Attachments
bt-logo.png
bluetooth logo
(2.43 KiB) Downloaded 3938 times

giac_fab
Posts: 113
Joined: Thu 25 Jan 2007, 23:15

#32 Post by giac_fab »

Hi

Bluetooth on my pc is working .... I can upload to my phones any file ( to a NOKIA with obex_test to a LG with obexftp ) but I can't download from my phone anything .....

I found with google some how-to ( obexserver, opd daemon ) .... but is impossible (for me) compile that apps .....

Anyone can help me ????

Thanks
:oops: I know, my english is very bad :oops:
Give a man a fish and he eats for a day, teach a man to fish and he eats for a lifetime.

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#33 Post by steevieb »

I can't download from my phone
/usr/etc/bluetooth/hcid.conf should have a reference to pin_helper, which should pop up a window on the pc, to enter the same password as just entered on the phone, to allow connection. Puppy does not seem to have pin_helper, so, as no password is, or can be, entered it refuses the connection.

Have just d/loaded bluez-pin from http://t2-project.org/packages/bluez-pin.html
Will install and see what happens.

Following is a part of a working hcid.conf file from an Ubuntu forum
http://ubuntuforums.org/showpost.php?p= ... ostcount=7
# PIN helper
pin_helper /usr/lib/kdebluetooth/kbluepin;
#pin_helper /usr/bin/bluepin;
#pin_helper /usr/lib/blues-pin;

# D-Bus PIN helper
#dbus_pin_helper;
}
There is nothing like this in Puppy ..yet

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#34 Post by steevieb »

Have just d/loaded bluez-pin from http://t2-project.org/packages/bluez-pin.html
Will install and see what happens.
Got these errors
checking for BLUEZ_PIN... configure: error: Package requirements (gtk+-2.0 dbus-glib-1 libglade-2.0 bluez gconf-2.0) were not met:

Package dbus-glib-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-glib-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'dbus-glib-1' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables BLUEZ_PIN_CFLAGS
and BLUEZ_PIN_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

giac_fab
Posts: 113
Joined: Thu 25 Jan 2007, 23:15

#35 Post by giac_fab »

Do you think that the problem is so little ?

I can bring to you an help and you to me the final solution =)

you can use the debian-package (GOOGLE) that have also al the missing libraires

OR (BETTER)

You can by-pass bluez-pin installation , it's unuseful .... it only echoes "PIN:XXXX"
You only need an script named pin like the one below (this is what various how-to tell ) into /usr/etc/blutooth:

#!/bin/bash
echo PIN:XXXX

and into hcid.conf you need to add this line :

# PIN helper
pin_helper /usr/etc/bluetooth/pin;

I think that puppy-bluetooth don't execute "pin_helper" so phone and PC can't pair together......

so we need only to execute pin_helper when it's needed .....
:oops: I know, my english is very bad :oops:
Give a man a fish and he eats for a day, teach a man to fish and he eats for a lifetime.

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#36 Post by steevieb »

You can by-pass bluez-pin installation
Tried scripts and altering hcid.conf in many ways - nothing working.
Tried d/loading obexftp 0.20 which is for file transfer from http://sourceforge.net/project/showfile ... e_id=62937

Instructions here;
http://dev.zuckschwerdt.org/openobex/wi ... Installing
* make sure you have installed OpenObex and BluezLib
* download obexftp here
* extract the tarball to a temporary folder
* execute the following

export OPENOBEX_LIBS="-L/usr/lib -lopenobex"
export OPENOBEX_CFLAGS="-I/usr/include/openobex/ -I/usr/include"
./configure --prefix=/usr
make
make install

But I need Python as I get this error;
configure: error: cannot find Python include path

giac_fab
Posts: 113
Joined: Thu 25 Jan 2007, 23:15

#37 Post by giac_fab »

It's strage for me explain someting.... :lol:

Try :

./configure --prefix=/usr --disable-perl --disable-python --disable-tcl

OR

download debian package from here :
http://http.us.debian.org/debian/pool/m ... 7_i386.deb

undeb it
copy it to / ....
obexftp

I think that only who made bluetooth-puppy support can help us to pair our phone ...... probably he missed something ....
:oops: I know, my english is very bad :oops:
Give a man a fish and he eats for a day, teach a man to fish and he eats for a lifetime.

User avatar
steevieb
Posts: 289
Joined: Sun 31 Dec 2006, 00:11
Location: Poole, Dorset. UK

#38 Post by steevieb »

It's strage for me explain someting..
I know nothing about coding, I just try things and see if it works.

Installed MU's Python 2.4 but get
configure: error: cannot find Python library path

Tried ./configure options for obexftp, did make and make install but gave a lot of errors.

Downloaded debian package, clicked on it to start puppy deb installer, and is working, but fails where it asks for password as before.
Same with a Samsung phone, except it wants channel 7.
sh-3.00# obexftp -b 00:60:57:D3:9C:24 -l
Browsing 00:60:57:D3:9C:24 ...
Channel: 10
Connecting...failed: connect
Still trying to connect
Connecting...failed: connect
Still trying to connect
Connecting...failed: connect
Still trying to connect
sh-3.00#

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

#39 Post by tempestuous »

EDIT Jan 1st 2008 - obexftp attachment deleted.
Revised bluetooth libaries and obexftp here
http://www.murga-linux.com/puppy/viewtopic.php?t=25009
Last edited by tempestuous on Tue 01 Jan 2008, 01:20, edited 1 time in total.

giac_fab
Posts: 113
Joined: Thu 25 Jan 2007, 23:15

#40 Post by giac_fab »

EDIT :

It's strange but an earlier bluetooth support works better yhan a new one......

with http://www.debernardis.it/dotpups/experimental_BT_1.pup

I can pair my phone ...... !!

I can upload files to phone

I can download but :

NOKIA

obexftp ecc ecc -l >>>> list of files >>>> obexftp ecc ecc -g xxx >>>> OK

LG

obexftp ecc ecc -l >>>> STOP ( Nothing to do )

-------------------------------

If I try with obexftpd my phone can't see my PC

# obexftpd -b
Waiting for connection...
Last edited by giac_fab on Fri 14 Sep 2007, 20:34, edited 1 time in total.
:oops: I know, my english is very bad :oops:
Give a man a fish and he eats for a day, teach a man to fish and he eats for a lifetime.

Post Reply