Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Dec 2014, 19:47
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Bluetooth support in Puppy
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 4 [54 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Mon 14 May 2007, 02:41    Post subject:  Bluetooth support in Puppy
Subject description: Need Testers!!
 

A couple of use have been working on bluetooth support (although none have bluetooth).

We need testers, packages are here:

http://www.murga-linux.com/puppy/viewtopic.php?p=115474#115474

We're pretty sure you have to start dbus first with one of these:

Code:
sh-3.00# dbus-daemon --system
sh-3.00# hcid
sh-3.00#

or:

sh-3.00# dbus-launch --exit-with-session
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Ri4IJxUbkr,guid=2114154d3e6ee1760e981200462cf51b
DBUS_SESSION_BUS_PID=22649
sh-3.00# hcid
sh-3.00#


Then you run:
Code:
modprobe rfcomm


Then you have to mess with hciconfig, maybe something like:
Code:
hciconfig hci0 up


This is where it gets hazy...maybe hciconfig --help to figure it out.

If you have bluetooth, please give this a try and post back here. We'll try our best to help get it going for everyone.
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Tue 15 May 2007, 17:40    Post subject:  

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.

Entered following commands;
sh-3.00# dbus-daemon --system
sh-3.00# hcid

sh-3.00# modprobe rfcomm
sh-3.00# modprobe hci-usb #need this as I have a usb bluetooth adapter
sh-3.00# hciconfig hci0 up
sh-3.00# hciconfig

hci0: Type: USB
BD Address: 00:08:1B:C0:4F:8F ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING
RX bytes:71 acl:0 sco:0 events:8 errors:0
TX bytes:27 acl:0 sco:0 commands:7 errors:0

sh-3.00# hcitool scan
Scanning ...
00:60:57:D3:9C:24 Me 2 #Address and bluetooth name of phone

sh-3.00# hcitool info 00:60:57:D3:9C:24
Requesting information ...
BD Address: 00:60:57:D3:9C:24
Device Name: Me 2
LMP Version: 1.1 (0x1) LMP Subversion: 0x248
Manufacturer: Nokia Mobile Phones (1)
Features: 0xbf 0x28 0x21 0x00 0x00 0x00 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <sniff mode> <SCO link>
<HV3 packets> <CVSD>

sh-3.00# hcitool cc 00:60:57:D3:9C:24
sh-3.00#

But this is as far as I get, cannot pair with phone (Nokia 6600) or connect with it.
Using 2.15CE live cd
Back to top
View user's profile Send private message 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Tue 15 May 2007, 20:39    Post subject:  

Great feedback. Thanks.

steevieb wrote:
But this is as far as I get, cannot pair with phone (Nokia 6600) or connect with it.
Using 2.15CE live cd


Check out the link here, this user connected to a Nokia 9950 with GPRS.

http://puppylinux.org/wikka/ExperimentalBT

You look like you are right at the part where you have to get and set the channel of the phone:

Key commands look like:

Code:
sdptool browse 00:0E:ED:AE:D7:3B <-with your MAC

and

rfcomm bind /dev/rfcomm0 00:0E:ED:AE:D7:3B 2 <-your MAC and channel


(don't worry about mknod, that's node is added for you already)

Not sure about these two, they are listed there:

Code:
modprobe bluetooth
modprobe l2cap


Then you just have to set up the ppp connection and fire it up.
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Wed 16 May 2007, 16:47    Post subject:  

Quote:
sh-3.00# sdptool browse 00:60:57:D3:9C:24
Browsing 00:60:57:D3:9C:24 ...
Service Name: Fax
Service RecHandle: 0x10000
Service Class ID List:
"Fax" (0x1111)
"Generic Telephony" (0x1204)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Fax" (0x1111)
Version: 0x0100

Service Name: Dial-up Networking
Service RecHandle: 0x10001
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

Service Name: Bluetooth Serial Port
Service Description: Bluetooth Serial Port
Service Provider: Symbian Ltd.
Service RecHandle: 0x10002
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100

Service Name: OBEX File Transfer
Service RecHandle: 0x10003
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 10
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10004
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 9
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100

Service Name: Handsfree Audio Gateway
Service RecHandle: 0x10005
Service Class ID List:
"Handfree Audio Gateway" (0x111f)
"Generic Audio" (0x1203)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Handsfree" (0x111e)
Version: 0x0101


Sdptool browse gives above result then
sh-3.00#modprobe bluetooth
sh-3.00#modprobe l2cap

sh-3.00# modprobe obex
FATAL: Module obex not found.

sh-3.00# rfcomm bind /dev/rfcomm0 00:60:57:D3:9C:24 2
sh-3.00#

sh-3.00# rfcomm connect rfcomm0 00:60:57:D3:9C:24 2 #Asks for a password on the phone for Bluez(0)
Can't connect RFCOMM socket: Connection refused
sh-3.00#



Do I need Obex? The serial port I think might work if I knew the password in Bluez. Tried 12345 and 00000 and 123 and 88888.
I am more interested in getting the serial port/file transfer working than GPRS, as I have Mobi Reader, an e-book reader on my phone, which I use a lot. And it seems a bit silly using GPRS through a server on a broadband connection Smile
Back to top
View user's profile Send private message 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Wed 16 May 2007, 17:40    Post subject:  

steevieb wrote:

Sdptool browse gives above result then
sh-3.00#modprobe bluetooth
sh-3.00#modprobe l2cap


Once we get it going, it would be neat to go back and test without these also. Since you got the list above, it seems the bluetooth stack hci layer must be inplace already, see here (real good graphic at bottom of middle content):
http://www.developers.net/external/1084

Although those are probably needed to navigate further protocols.

steevieb wrote:

sh-3.00# rfcomm connect rfcomm0 00:60:57:D3:9C:24 2 #Asks for a password on the phone for Bluez(0)
Can't connect RFCOMM socket: Connection refused
sh-3.00#


Thanks for noting that. I'll remember when looking up info.

steevieb wrote:

Do I need Obex? The serial port I think might work if I knew the password in Bluez....


Here is a great article on obex "CLI Magic: Access your Bluetooth phone via the command line"
http://enterprise.linux.com/article.pl?sid=07/02/20/1436253&from=rss

Leads to this utility at the end for using obex to send files to the phone:
http://www.bindshell.net/tools/obexsend

steevieb wrote:
I am more interested in getting the serial port/file transfer working than GPRS...it seems a bit silly using GPRS through a server on a broadband connection Smile


Understood. I just assumed a modem was what the phones where used for, file transer didn't even cross my mind as I've never gone through this (and don't have that phone).

YES, GPRS would be silly with a broadband connection around Smile

Yet might be a good second excercise. We had a really bad ice storm here last year and it knocked out the power, phones and internet for three days but my cell phone still worked. I hooked it up with my laptop and a generator and got online to pass some time.
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Thu 17 May 2007, 19:01    Post subject:  

These commands are the same for different types of connection, apart from the channel no at the end.
ie; 2 is serial port, 1 is Dial up networking, 9 is obex, etc. http://wiki.bluez.org/wiki/Serial

sh-3.00# rfcomm bind /dev/rfcomm0 00:60:57:D3:9C:24 2
sh-3.00# rfcomm connect rfcomm0 00:60:57:D3:9C:24 2

http://wiki.bluez.org/wiki/Serial
http://wiki.bluez.org/wiki/HOWTO/SerialConnections

The openobex link is a .bz2 file - is this ok? Will try to install tommorow - late here now
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5293
Location: Australia

PostPosted: Fri 18 May 2007, 07:22    Post subject:  

EDIT: Attachment deleted.
Last edited by tempestuous on Sat 19 May 2007, 05:38; edited 1 time in total
Back to top
View user's profile Send private message 
flappers

Joined: 18 May 2007
Posts: 1
Location: Cape Town

PostPosted: Fri 18 May 2007, 12:15    Post subject:
Subject description: bluetooth gprs sought
 

Hi

I have downloaded the bluez pets and stuff and hope to connect a P2-450MHZ with 256mb ram and voodo3 16mb agp with Puppy2.16 to my Nokia N80 via BAFO bluetooth usb dongle.

Aim to try obex 1st as its less complicated I think.

This is an excellent thread to find! Was starting to lose hope in respect of bluetooth and Puppy.

Must dash!

flappers
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Fri 18 May 2007, 17:38    Post subject:  

This page seems to have lot of useful info
http://mazzanet.id.au/bluetooth.php

tempestuous, do you have the openobex apps as well?

Still stuck at the password screen. Sad
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5293
Location: Australia

PostPosted: Sat 19 May 2007, 05:47    Post subject:  

EDIT Jan 1st 2008 - openobex attachment deleted.
Revised bluetooth libaries and openobex here
http://www.murga-linux.com/puppy/viewtopic.php?t=25009

Last edited by tempestuous on Mon 31 Dec 2007, 21:18; edited 1 time in total
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Sat 19 May 2007, 12:26    Post subject:  

Using Obex I get the following;
Quote:
sh-3.00# obex_test -b 00:60:57:D3:9C:24 10
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.
> c
Transport connect error! (Bluetooth)

Using Rfcomm I get a brief connection;
Quote:

sh-3.00# hcitool cc 00:60:57:D3:9C:24
sh-3.00# hcitool con
Connections:
< ACL 00:60:57:D3:9C:24 handle 42 state 1 lm MASTER
sh-3.00#
sh-3.00# hcitool lq 00:60:57:D3:9C:24
Link quality: 220

sh-3.00# hcitool rssi 00:60:57:D3:9C:24
RSSI return value: -3
sh-3.00#

Could not find bluez-pin so downloaded from
http://www.t2-project.org/packages/bluez-pin.html
It should put up a box to enter the same password as entered on the phone. Not sure it installed properly though.
bluez-pin.png
 Description   
 Filesize   2.81 KB
 Viewed   5486 Time(s)

bluez-pin.png

Back to top
View user's profile Send private message 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Sat 19 May 2007, 12:30    Post subject:  

tempestuous wrote:
I doubt that this is the case with John Doe's ClawsMail/JPilot package.


You are correct. I will fix this up for the next "release".

I'm going to drop those nodes in there also.

Little sister is back from school for the weekend, so it will be a day or two.
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Sat 19 May 2007, 17:47    Post subject:  

SUCCESS!
Read instructions from http://david.wragg.org/blog/ and realised I was using the wrong channel Embarassed Needed to be Obex Object Push
Quote:
sh-3.00# obex_test -b 00:60:57:D3:9C:24 9
Using Bluetooth RFCOMM transport
OBEX Interactive test client/server.
> c
Connect OK!
Version: 0x10. Flags: 0x00
> x /root/bluetooth2
PUSH filename> name=/root/bluetooth2, size=1685
Going to send /root/bluetooth2(bluetooth2), 1685 bytes
Filling stream!
Made some progress...
Filling stream!
PUT successful!
>

Although it is only from the computer to the phone there is no password involved
Thanks, tempestuous and John Doe for all your help, and sorry if some of my posts were a bit long. Hard to know what is important info. Let me know if you want me to try any thing else.
Back to top
View user's profile Send private message 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Sun 20 May 2007, 02:26    Post subject:  

steevieb wrote:
...sorry if some of my posts were a bit long. Hard to know what is important info...


They were great.

Thanks for the help. You verifed the basic bluetooth and also raised the bar on the pack.

I'm going to tune up some packages and then appeal for some more help on getting info for a script together.

We've yet to cover bluetooth:

keyboards
mice
gps
palm
modem
etc...
Back to top
View user's profile Send private message 
steevieb


Joined: 30 Dec 2006
Posts: 288
Location: Poole, Dorset. UK

PostPosted: Sun 20 May 2007, 14:11    Post subject:  

GPS seem to work as well. Turned on the GPS then I entered these commands as before

Quote:
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
sh-3.00# modprobe bluetooth
sh-3.00# modprobe l2cap

Scanning for devices gives
Quote:
sh-3.00# hcitool scan
Scanning ...
00:02:C7:2A:4B:91 BlueGPS 2A4B91 #GPS receiver for (phone)sat nav
00:60:57:D3:9C:24 Me 2 #Nokia 6600 (phone)
sh-3.00# hcitool inq
Inquiring ...
00:60:57:D3:9C:24 clock offset: 0x60c1 class: 0x500204
00:02:C7:2A:4B:91 clock offset: 0x67f4 class: 0x001f00

sh-3.00# hcitool info 00:02:C7:2A:4B:91
Requesting information ...
BD Address: 00:02:C7:2A:4B:91
Device Name: BlueGPS 2A4B91
LMP Version: 1.1 (0x1) LMP Subversion: 0x291
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
<power control> <transparent SCO>
Seems to connect OK with hcitool and rfcomm
sh-3.00# hcitool cc 00:02:C7:2A:4B:91
sh-3.00# hcitool con
Connections:
< ACL 00:02:C7:2A:4B:91 handle 42 state 1 lm MASTER

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

sh-3.00# l2ping 00:02:C7:2A:4B:91
Ping: 00:02:C7:2A:4B:91 from 00:08:1B:C0:4F:8F (data size 44) ...
44 bytes from 00:02:C7:2A:4B:91 id 0 time 37.83ms
44 bytes from 00:02:C7:2A:4B:91 id 1 time 39.91ms
44 bytes from 00:02:C7:2A:4B:91 id 2 time 29.81ms
44 bytes from 00:02:C7:2A:4B:91 id 3 time 42.72ms
44 bytes from 00:02:C7:2A:4B:91 id 4 time 44.62ms
5 sent, 5 received, 0% loss

GPS seems to connect the same as a phone but without a password, and on channel 1 which is DUN/general network on my phone.
I assume from the ping result it is a 2-way connection, but cannot test this as I do not have a sat nav/gps program on the computer. The GPS unit is paired with the phone.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 4 [54 Posts]   Goto page: 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1201s ][ Queries: 12 (0.0118s) ][ GZIP on ]