Bluetooth support in Puppy

Under development: PCMCIA, wireless, etc.
Message
Author
giac_fab
Posts: 113
Joined: Thu 25 Jan 2007, 23:15

#46 Post by giac_fab »

I'm using puppy 3.01

An extrenal USB adapter

The problems were (see my old posts)
- PC (hci0) is not propely configured by hciconf ( class of device, added to script )
- PC is not visibile by default by other devices such as phone ( dbus-send --system -- ...... added to script)

I tried with a nokia and with a LG .... both work .

EDIT : I saw that It works only with xfce 441 installed ( it has an own dbus system installed )
: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
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#47 Post by Béèm »

I have a K700i mobile phone
I also have a USB bluetooth from iDream.
I installed the packaged referenced in this thread.
I can browse the phone and see what services are available.

I wanted to start with file transfer.
I issue: obexftp -b K700i -g "afbeelding(1)"
afbeelding(1) is the name of a picture file on the phone.
Then I get a message: Failed to connect to SDP server: File descriptor in bad state.

What does this mean and how can I correct?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

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

#48 Post by giac_fab »

I suppose that PUT to phone is ok ......

I don't know how obexftp can take files directly from phone .....

but you I use obexftpd ( you have it )

sh-3.00# obexftpd -c /root/ -b
Waiting for connection...

You PC will be visible from your phone ( like another phone) . Your files will be saved to "/root/"

Try
: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
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#49 Post by Béèm »

I don't know what you mean by 'put to phone'
A kinda command?

When I issue:

Code: Select all

# obexftp -b K700i -g "afbeelding(1)"
Scanning ...
Using   00:16:20:19:E8:89       K700i
Failed to connect to SDP server: File descriptor in bad state
# 
When I issue:

Code: Select all

# obexftpd -b K700i -g "afbeelding(1)"
register to SDP Server failed.
#
When I issue:

Code: Select all

# obexftpd -c/root/ -b
register to SDP Server failed.
# 
obexftp and obexftpd are both in /usr/bin
There is also a obex_test.
When I issue

Code: Select all

# obex_test -b
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.
> put bootmanager.png remote
PUT file (local, remote)> name=bootmanager.png, size=38009
Going to send 38009 bytes
Link broken!
Error while doing OBEX_HandleInput()
>
I have a hci0 device, but I don't understand this RFCOMM thing.
Should I define something for it, or do I have it already?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

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

#50 Post by tempestuous »

giac_fab wrote:EDIT : I saw that It works only with xfce 441 installed ( it has an own dbus system installed )
giac_fab,
It's strange that obexftp "push" works for you with the dbus contained in XFCE4.4.1, but fails with John Doe's dbus package.
I just checked, and both dbus versions are 1.0.2.

John Doe configured his dbus compilation like this

Code: Select all

./configure --prefix=/usr --localstatedir=/usr
because dbus-launch was trying to access the dbus pid/socket file in /usr/var/run/dbus
This might (?) be the cause of problems with other utilities (such as obexftp) because they may be looking in the conventional location of /var/run/dbus
So I have just compiled dbus now like this -

Code: Select all

./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
Would you test this version of dbus to see if obexftp "push" works?

You will still need the BlueZ libs/utilities/firmware from
http://www.murga-linux.com/puppy/viewto ... 474#115474

EDIT Dec 26 2007
dbus packages removed. Configuration problem identified, fix soon.
Last edited by tempestuous on Wed 26 Dec 2007, 10:31, edited 1 time in total.

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

#51 Post by giac_fab »

QUOTE = I don't know what you mean by 'put to phone'
A kinda command?

I'm talking about
obexftp -b xxx -put yyy # xxx=ADRESS OF DEVICE(hcitool scan) yyy=file

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

#! /bin/sh
hcid
modprobe rfcomm
modprobe hci-usb
hciconfig hci0 up
modprobe bluetooth
modprobe l2cap
sdpd
#next lines added by me (from internet)
dbus-send --system --dest=org.bluez /org/bluez/hci0 \ # this line make pc visibile to the phone
org.bluez.Adapter.SetMode string:discoverable # like previus line
sleep 3
hciconfig hci0 class 0x3e0100 # this line seems not be load automaticaly from hcid.conf

You need to see if this script when executed shows up some errors ( I think you get an error with red line)

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

I taken only varius pieces and I put them together ...... I posted only the way that worked for me :cry:

I spent a lot of time to find where problems were and to find the trhee or four lines I added to starting script.... so I thought that add them to forum could be useful for someone.




# obexftpd -c /root/ -b
register to SDP Server failed.
# obexftpd -c /root/ -b

Now If you did all that I wrote on my post I don't know how to help you :cry:

EDIT :

Tried again..... The error shows up if I kill sdpd ......

# obexftpd -c /root/ -b
register to SDP Server failed.
# sdpd
# obexftpd -c /root/ -b
Waiting for connection...
: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.

tantor
Posts: 1
Joined: Tue 11 Mar 2008, 08:03

#52 Post by tantor »

Problem finaly solved with my sony ericsson k800i

BlueZ-utils-3.24 solved the passkey/pin issue for me.
http://www.murga-linux.com/puppy/viewto ... 225a1026d1
(found on http://www.murga-linux.com/puppy/viewto ... =862185957)

From scratch;
in /etc/bluetooth/hcid.conf
# Default PIN code for incoming connections
passkey "1234";


in rxvt;
rm -f /var/run/dbus/*
dbus-uuidgen --ensure
dbus-daemon --system
hcid
modprobe rfcomm
modprobe hci-usb
modprobe bluetooth
hciconfig hci0 up
modprobe l2cap
sdpd
dbus-send --system --dest=org.bluez /org/bluez/hci0 \
org.bluez.Adapter.SetMode string:discoverable
sleep 3
hciconfig hci0 class 0x3e0100
hcid -n
passkey-agent --default 1234 &
obexftp -b 0:19:63:1C:ED:CF -c / -l (change mac adr)

when i did the next line, i got an error," /root/mnt/bluetooth", so i took the easy way, and made an shortcut to mnt/bluetooth in root folder.. lol (i'm a newbie)

obexfs -b 00:19:63:1C:ED:CF -B 7 ~/mnt/bluetooth (change mac adr and '7' to the channel came up in the scanning)

so.. that made my day.. opened rox file manager, and go to mount/bluetooth..

again, im a newbie, maybe someone can make a script or something,if this work for you to?

wap_dude
Posts: 3
Joined: Sat 09 Aug 2008, 10:02
Location: Aix-en-Provence, France

succesful modem connection over bluetooth with a LG KU990

#53 Post by wap_dude »

Hello to you all
I just wanted to report a succesful internet modem connection via bluetooth with a mobile
my computer is an ASUS W7J laptop with a broadcom BT chipset, mobile phone is a LG KU990(viewty), puppy 4.0 kernel 2.6.21.7.
operator is french vodafone (SFR) in 3G (illimythics)

I installed Bluez as shown in the first posts

My bluetooth config file :

/etc/bluetooth

options {
autoinit yes;
security auto;
pairing multi;
passkey "0000";
}

device {
name "BlueZ (%d)";
class 0xff0100;
iscan enable; pscan enable;
lm accept, master;
lp rswitch,hold,sniff,park;
}


to launch bluetooth modules and hcid I use this script:

#!/bin/sh -x
rm -f /var/run/dbus/*
dbus-uuidgen --ensure
dbus-daemon --system
modprobe bluetooth
modprobe l2cap
modprobe rfcomm
modprobe hci-usb
hcid

Then scan with
# hcitool scan
gets the BT adress


#sdbtool browse
To get the channel in the LG dial-up networking service paragraph ("8" for me)

prepare modem connection by editing

etc/bluetooth/rfcomm.conf
with
rfcomm0 {
bind yes;
device 00:11:22:33:44:55;
channel 8;
comment "Bluetooth PPP connection";
}

Then connect phone (I had to pair first from the phone. funny thing each time I connect under MSwindows I have to re-pair afterward-from the phone-, I guess the phone gets confused having the same bt adress with two names)

# hcitool cc 00:11:22:33:44:55

then connect modem

# rfcomm connect rfcomm0 00:11:22:33:44:55 8

Creates a modem in dev/rfcomm0

then edit etc/wvdial.conf with:

Modem = /dev/rfcomm0
Baud = 115200
FLOWCONTROL = NOFLOW
Init1 = AT+CGDCONT=1,"IP","wapsfr" #last one is the access point
Init2 = AT&F&D2&C1S0=0
Dial Command = ATD
Phone = *99#
Username = dummy
Password = dummy
ask password = 0
stupid mode = 1
Auto DNS = off

and it works perfectly.
hope this helps anyone who owns a LG phone

I got this little script for the second part

hcitool cc 00:11:22:33:44:55
wait
rfcomm connect rfcomm0 00:11:22:33:44:55 8 &
sleep 3
echo "lancement wvdial"
wvdial


works perfectly...

I just love my puppy even more now!!

wap_dude

Caneri
Posts: 1513
Joined: Tue 04 Sep 2007, 13:23
Location: Canada

#54 Post by Caneri »

Hi All, (SOLVED) look here..http://www.murga-linux.com/puppy/viewto ... 850#222850


Has anyone had luck with a bluetooth mouse?

I get as far as hcitool scan and this sees my bluetooth travel mouse. There must be something I'm missing as the mouse still doesn't work.

Best,Thanks,
Eric
[color=darkred][i]Be not afraid to grow slowly, only be afraid of standing still.[/i]
Chinese Proverb[/color]

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

bluetooth ache

#55 Post by ktat »

I'm not sure if I'm in the right place, very new to puppy.

Once I enter bluetoothd into a terminal the bluetooth manager will start from the menu list. However, after finding devices that I can connect to and accepting the pairing. When I try to send a file, no Banana.

Here's some, what I hope is useful, output:

Code: Select all

root# blueman-applet 
Loading configuration plugins
_________
<module> (/usr/lib/python2.7/dist-packages/blueman/main/Config.py:20)
Skipping plugin Gconf
No module named gconf 
blueman-applet version 1.23 starting
Using file config backend
_________
Load (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:54)
['TransferService', 'ShowConnected', 'Headset', 'KillSwitch', 'AppIndicator', 'RecentConns', 'Networking', 'ExitItem', 'PPPSupport', 'SerialManager', 'DBusService', 'StatusIcon', 'NetUsage', 'PulseAudio', 'NMPANSupport', 'Menu', 'StandardItems', 'DhcpClient', 'AuthAgent', 'NMDUNSupport', 'DiscvManager', 'PowerManager'] 
Using file config backend
_________
Load (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:54)
Unable to load plugin module AppIndicator
No module named appindicator 
_________
Load (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:54)
Unable to load plugin module NMPANSupport
No module named gconf 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.StatusIcon.StatusIcon'> 
Using file config backend
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.DBusService.DBusService'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.Headset.Headset'> 
Using file config backend
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.Networking.Networking'> 
Using file config backend
_________
load_nap_settings (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/Networking.py:30)
Loading NAP settings 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.PulseAudio.PulseAudio'> 
Using file config backend
_________
pa_context_event (/usr/lib/python2.7/dist-packages/blueman/main/PulseAudioUtils.py:306)
1 
_________
pa_context_event (/usr/lib/python2.7/dist-packages/blueman/main/PulseAudioUtils.py:306)
5 
_________
on_load (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/PulseAudio.py:160)
PulseAudio version: [4, 0, 0] 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.Menu.Menu'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.PowerManager.PowerManager'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.TransferService.TransferService'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.KillSwitch.KillSwitch'> 
Using file config backend
_________
on_load (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/KillSwitch.py:25)
Using the new killswitch system 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.AuthAgent.AuthAgent'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.ShowConnected.ShowConnected'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.DhcpClient.DhcpClient'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.SerialManager.SerialManager'> 
Using file config backend
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.RecentConns.RecentConns'> 
Using file config backend
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
Not loading PPPSupport because it's conflict has higher priority 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.StandardItems.StandardItems'> 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.DiscvManager.DiscvManager'> 
Using file config backend
_________
update_menuitems (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/DiscvManager.py:114)
warning: Adapter is None 
_________
__load_plugin (/usr/lib/python2.7/dist-packages/blueman/main/PluginManager.py:127)
loading <class 'blueman.plugins.applet.NMDUNSupport.NMDUNSupport'> 
ERROR:dbus.proxies:Introspect error on org.blueman.Mechanism:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.blueman.Mechanism was not provided by any .service files
_________
update_state (/usr/lib/python2.7/dist-packages/blueman/main/KillSwitchNG.py:162)
State: True 
_________
on_switch_added (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/KillSwitch.py:45)
killswitch registered 1 
_________
on_obex_owner_changed (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/TransferService.py:70)
obex owner changed:  
_________
on_dbus_name_owner_change (/usr/bin/blueman-applet:81)
org.bluez owner changed to  
_________
update_menuitems (/usr/lib/python2.7/dist-packages/blueman/plugins/applet/DiscvManager.py:114)
warning: Adapter is None
also:

Code: Select all

root# bluez-test-adapter list
Traceback (most recent call last):
  File "/usr/bin/bluez-test-adapter", line 12, in <module>
    manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

root# rfkill list
0: phy0: wlan
	Soft blocked: no
	Hard blocked: no
1: hci0: bluetooth
	Soft blocked: no
	Hard blocked: no
some specs:

Code: Select all

root# lsusb
Bus 005 Device 002: ID 0b05:b700 ASUSTek Computer, Inc. Broadcom Bluetooth 2.1

-Version-
Kernel		: Linux 3.14.56 (i686)
Version		: #1 SMP PREEMPT Mon Dec 21 14:52:08 GMT 2015

-Computer-
Operating System		: tahrpup - 6.0.5

blueman-1.23_tahr

bluez_4.101
If there isn't enough (I hope not too much) information, I'm happy to furnish more if it will help.

Pelo

bluetooth_5.5.sfs: 3484 K

#56 Post by Pelo »

bluetooth_5.5.sfs: 3484 K
What i can say is that hungarian Puppy developers aimed to blue tooth usage by their precise 5.7.1
Sfs is included in the ISO
Unfortunately i don't have any bluetooth item at home.
Hungarian topic ask csipesz how far the hungarian team is with Bluetooth.
Hum :idea: they are quite leaders in cutting edge stuff ....
Bletooh is on test bench here, click and see

ktat
Posts: 20
Joined: Mon 07 Oct 2013, 09:27

#57 Post by ktat »

I sent a PM to csipesz, unfortunately wasn't able to help.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#58 Post by Semme »

Nope! This is an EIGHT YEAR OLD THREAD you've posted in!
I'm not sure if I'm in the right place, very new to puppy..
Yeah, we could sense this. I answered you elsewhere..
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

noalternative
Posts: 104
Joined: Wed 11 Nov 2009, 03:45
Contact:

#59 Post by noalternative »

steevieb wrote:downloaded
bluez-firmware-1.2.pet
bluez-libs-3.9.pet
bluez-utils-3.9.pet
dbus-1.0.2.pet

installed bluez-firmware-1.2.pet
installed dbus-1.0.2.pet
installed bluez-libs-3.9.pet
installed bluez-libs-3.9.pet
using petget, restarted X.
Where can I download these if I am using a puppy based on xenial pup and they are not in the pet-get repos?

I know I could install ubuntu stuff but most of bluetooth debs seems to require that I download half of ubuntu too!

Post Reply