Bluetooth in Puppy 5.2.8 with Blueman + Python

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
alwaysalonee
Posts: 62
Joined: Tue 28 Feb 2012, 04:16

Bluetooth in Puppy 5.2.8 with Blueman + Python

#1 Post by alwaysalonee »

Hello there !

The most updated article will always be here :
http://themikex.blogspot.in/2012/11/blu ... linux.html

This article explains you 'how to connect to the Internet with your Bluetooth and mobile when you are using XFCE Window Manager.
If you don't use XFCE window manager then it's better follow this
because it's easy and its Bluetooth files will take small space.

Note :
I am using Lucid Puppy 5.2.8 With XFCE Window Manager
I suggest you to create a save file at-least 512 MB because blueman+python .pet will take big space

Step 1 :
install following pet and Reboot
http://hotfile.com/dl/129175521/d604f21 ... 8.pet.html
http://hotfile.com/dl/117232563/c197fe0 ... 6.pet.html

Step 2 :
You may get error saying 'failed to apply network setting' simply press OK
select menu go to setting and select wm switcher, select jwm and press Restart X

Step 3 :
in 'jwm' right click select utility and open 'roxterm'
and copy and paste following code

#!/bin/sh
dbus-uuidgen --ensure &
dbus-daemon --system
modprobe bluetooth
modprobe l2cap
modprobe rfcomm
modprobe btusb
/usr/local/sbin/hciconfig hci0 up
/usr/local/sbin/hciconfig hci0 class 0x3e0100
mknod -m 666 /dev/rfcomm0 c 216 0
/usr/local/sbin/bluetoothd
mkdir /root/a
hcitool scan
blueman-applet

If you get error 'failed to apply network settings' than again press OK and you will find bluetooth manager icon as per picture shown below ..

Check The Attachment For Image

if you dont get that icon than close roxterm in which you pasted above code and open new roxterm and type lxtask and search for blueman-applet if you find it than right click and kill it than redo this step

Step 4 :
now click on that icon and select search and pair your mobile device
(if it does not scan a bluetooth device make sure you have selected always visible or discoverable in your mobile device. if it still is not scanning make sure the bluetooth device of your computer is on and attached properly. You can check if puppy linux has detected your computer's bluetooth device in Menu->System->HardwareInfo in that select USB to check.)

Step 5 :
Now navigate to the /etc/ppp from your file manager.
in ppp goto chatscripts directory, now right click and select create new file named gprs and paste following code ..

ABORT ERROR
ABORT RING
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO ANSWER"
#ABORT "NO DIALTONE"
REPORT CONNECT
"" "ATZ"
OK 'AT+cgdcont=1,"IP","enter your ISP APN here"'
OK ATD*99***1#
TIMEOUT 60
CONNECT \c

you'll need to provide APN address in my case it looks like this ..
OK 'AT+cgdcont=1,"IP","tata.docomo.internet"'
or may be even change the dial number though *99***1# should work, if not try *99#

did that ? ok, now go to ppp again and goto peers directory and right click to create new file and name it gprs and paste following code ..

noauth
connect "/usr/sbin/chat -v -f /etc/ppp/chatscripts/gprs"
/dev/rfcomm0
1152000
defaultroute
noipdefault
user
usepeerdns

Step 6 :
Now click console icon from desktop and type hcitool scan it would be like ..

sh-4.1# hcitool scan
Scanning ...
18:14:56:CA:9E:42 Yo

18:14:56:CA:9E:42 is mac address of my mobile bluetooth device and Yo is my mobile bluetooth's name copy the mac address and browse your mobile also save mac address somewhere you'll need it in next steps e.g.

sh-4.1# sdptool browse 18:14:56:CA:9E:42
Browsing 18:14:56:CA:9E:42 ...

Service Name: Dial-up networking
Service RecHandle: 0x10003
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

It'll list all services your mobile provides. scroll down and find Service Name: Dial-up networking and channel number in my case it is Channel: 1, save or remember channel number you'll need it in next step.

Step 7 :
Now click file icon on desktop and right click , select create new script with name Connect and paste following code ..

#!/bin/sh
modprobe bluetooth
modprobe l2cap
modprobe rfcomm
modprobe hci_usb
mknod -m 666 /dev/rfcomm0 c 216 0
hcid

# in the following line change mac address and channel number for your phone
rfcomm bind /dev/rfcomm0 18:14:56:CA:9E:42 1

rxvt -bg "light yellow" -geometry 134x20 -title GPRS_connection_tail -e tail -n 20 -f /var/log/messages &
pppd call gprs
gxmessage -center -bg "light green" -title "PPPD calling..." -buttons "EXIT" "PPPD calling...press EXIT for exiting GPRS connection"
killall pppd
rfcomm release /dev/rfcomm0
killall rfcomm
killall hcid
kill $(ps|grep GPRS_co)
exit

in above script, in bold and italic line :P , you'll need to change the mac address and channel number as you saved it, Ok so now we all set up , you just need to click Connect and it'll connect to your mobile and will create internet connection.

if it is not connecting to your mobile first try following in console
rfcomm connect 0 your-mac-address chennal-number
e.g. rfcomm connect 0 18:14:56:CA:9E:42 1
and then click Connect script file it should work fine ..


Some Resource and HELP links :
http://www.murga-linux.com/puppy/viewtopic.php?t=67113
http://puppylinux.org/wikka/ExperimentalBT
http://www.murga-linux.com/puppy/viewtopic.php?p=396249

Thanks to master wrong ,seeme , trapster , puppy linux forum members
You can now Enjoy Intenet on Puppy Linux :)
Enjoy Puppy Linux With Internet :)
Attachments
foo.jpg
(78.07 KiB) Downloaded 2181 times
Last edited by alwaysalonee on Tue 03 Sep 2013, 16:34, edited 2 times in total.

Master_wrong
Posts: 452
Joined: Thu 20 Mar 2008, 01:48

#2 Post by Master_wrong »

hi,

thanks for the tutorial...

btw i want to add few thing

A. giving right to every user at /usr/libexec/dbus-daemon-launch-helper will remove error at startup

B. to browse phone:
1. install blueman
2. after run bllueman-applet, right-click on applet ---> select local service
3. select transfer, click on advanced
4. set advanced ----> obexfs -b %d /root/a
5. create /root/a
6. click browse
7. open rox /root/a
Cluster-Pup v.2-Puppy Beowulf Cluster
[url]http://www.murga-linux.com/puppy/viewtopic.php?p=499199#499199[/url]

User avatar
mister_electronico
Posts: 969
Joined: Sun 20 Jan 2008, 20:20
Location: Asturias_ España
Contact:

The links are broken.

#3 Post by mister_electronico »

The links are broken.

nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

Re: The links are broken.

#4 Post by nancy reagan »

mister_electronico wrote:The links are broken.
If I remember well this puppy -includes- blueman.

http://www.murga-linux.com/puppy/viewtopic.php?t=92607

User avatar
mister_electronico
Posts: 969
Joined: Sun 20 Jan 2008, 20:20
Location: Asturias_ España
Contact:

#5 Post by mister_electronico »

Thanks nancy regan but I prefer a pet, Whenever I get some time I will try to make a Pet.

see you.

nancy reagan
Posts: 544
Joined: Thu 22 Jan 2009, 14:20

#6 Post by nancy reagan »

mister_electronico wrote:Thanks nancy regan but I prefer a pet, Whenever I get some time I will try to make a Pet.

see you.
If I remember well,he's packed it in an sfs placed it somewhere under "programs" ?

Post Reply