LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slack 12 and Obextool (https://www.linuxquestions.org/questions/slackware-14/slack-12-and-obextool-581779/)

mdg 09-03-2007 02:05 AM

Slack 12 and Obextool How to
 
This is a relatively simple way to transfer files between Slackware 12 and your mobile phone.
I'm no expert and I'm sure there are better methods out there, but this worked for me. There's no compiling involved and the end result allows you to send and receive files with a GUI (tested with two phones, Nokia 6230i and Samsung E250)
Also, I did give kdebluetooth a try and I would have preferred using it, but I couldn't get it to work.

Just for the record, when I installed Slackware, I did a full install and I had no dependency problems setting up Obextool. YMMV


  • Installing packages for Bluetooth
If you did a full Slack 12 install, you should already have everything set up. If not, you'll need to install these packages from the install cd or from the Slack 12 mirrors:

dbus
bluez-libs
bluez-utils

You can check in /var/log/packages if they already exist.

  • Installing packages for Obextool
The packages you need are:

tcl
tk
BWidget
tablelist
openobex
obexftp
obextool

The good news is most of those should already be installed in a full install. If not, these are the packages to install from the install cd:

tcl
tk
openobex
obexftp

Again, first check if you have them.

Next, we need to get BWidget from Sourceforge
Untar the tarball to /usr/lib/tcl<version>


Now we get tablelist from http://www.nemethi.de/ Again, untar to /usr/lib/tcl<version>

You should now have two new directories (BWidget and tablelist) in /usr/lib/tcl No compiling required.


Finally, we get obextool (the GUI frontend for obexftp) from here Untar to /usr/share

There are some files that need to be copied over, so, as root, make a new directory in /etc:
Code:

mkdir /etc/obextool
Copy all the files in /usr/share/obextool/etc to /etc/obextool
Code:

cd /usr/share/obextool/etc
Code:

cp *.* /etc/obextool

As root, make a link from /usr/share/obextool/contrib/startup/obextool to /usr/bin/obextool
Code:

ln -s /usr/share/obextool/contrib/startup/obextool /usr/bin/obextool
This will be the obextool executable.


  • Configure
Now we set a passkey (PIN code). As root, edit the
/etc/bluetooth/passkeys/default file and enter the passkey you want. The Readme file in /etc/bluetooth gives more detail:
Code:

since bluez 3.0 the old pin_helper script has been replaced by
the dbus interface.  To add a default passkey for every outgoing
request (e.g. the old /etc/bluetooth/pin file) drop it into
/etc/bluetooth/passkeys/default. (e.g. echo -n "1234" >
/etc/bluetooth/passkeys/default )
To add a passkey for a specific outgoing connection replace default
with the device's address. ( /etc/bluetooth/passkeys/aa:bb:cc:dd:ee:ff
will contain passkey for aa:bb:cc:dd:ee:ff ).
After adding a passkey you should restart bluetooth with

/etc/init.d/bluetooth restart

You'll also need to edit /etc/bluetooth/hcid.conf to add in the same passkey:
Code:

# Default PIN code for incoming connections
        passkey "<your passkey>";

  • Start bluetooth
Make sure your bluetooth dongle is connected to the computer and your phone has bluetooth activated.

Starting the bluetooth service: (root)
Code:

/etc/rc.d/rc.bluetooth start
Get bluetooth to recognize your dongle:
Code:

hciconfig -a
The device is usually seen as "hci0". If yours has a different name, change the next command accordingly.
Activate the dongle:
Code:

hciconfig hci0 up
If everything went smoothly, you can now type "obextool" at the command prompt and you should be able to send and receive.
When downloading files from the phone, the files will be downloaded to whatever directory you were in when you started obextool. There is a post at the obextool forum on how to set the download directory.
  • Command Line
For those who are happy with a CLI, you only need openobex and obexftp (along with bluetooth, of course). Once bluetooth is running, typing
Code:

obexftp --help
will tell you what you need to know.

Hope this proves useful, if anyone has constructive comments to make, feel free.

dreyfuss 09-04-2007 11:42 AM

Hello from Italy,mdg.When you say about BWidget and tablelist "untar to /usr/lib/tcl<version>",could you pls tell me the right command?What version do you mean?The one of tcl?This is 8.4.15-i486-1.Thanx so much.Bye.

mdg 09-04-2007 02:00 PM

Yes, it's the same version. So you would cd into the /usr/lib/tcl8.4 directory and untar the BWidget and tablelist tar.gz files to there.
Code:

cd /usr/lib/tcl8.4
As root:
Code:

tar xvzf  /path/to/BWidget-1.8.0.tar.gz
Code:

tar xvzf /path/to/tablelist4.8.tar.gz
The /path/to is where you downloaded the tar.gz files to

dreyfuss 09-05-2007 10:29 AM

Many thanks,mdg.

perry 09-13-2007 10:50 AM

Seems to connect... nothing happens!
 
I have a Samsung LG CX245 and while it connects, doesn't seem to want to show any files...

Perhaps I can do a software upgrade on it. As I read somewhere in the manual that there are problems with the Canadian version.

- Perry

mdg 09-14-2007 01:50 AM

I'm not familiar with your phone (search turns up a home entertainment center?), but you could try
Code:

obexftp -b -l
after your bluetooth is up and running, ie service, dongle and phone. This should give a listing of the directories on your phone.

Code:

obexftp --help
will list all the CLI options/switches. There are some other examples at Openobex wiki

SCerovec 04-18-2008 03:11 PM

sorry to bother...
 
I did it for a fifth or so time in a row and always had my "blutonium" hanging there...
:-(
So I finally got it working by:

Code:

# hciconfig -a
<here I got a error>
# hciconfig uhci0 up

# hciconfig uhci0 down
<this actually made a change ;-) >

# hciconfig uhci0 up
<finally w/o the error>

Hope it helps a bit?


All times are GMT -5. The time now is 02:59 AM.