Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 06-25-2013, 06:43 PM   #1
Registered: Jun 2008
Posts: 338

Rep: Reputation: 33
Obex push over bluetooth from cli in Slackware?

I need to obex push a file to a mobile phone from cli in Slackware. I'm trying to figure out:

1. What tools do I need.
2. If Slackware has them by default.

I assume I will have to scan for the phone and pair with it first using bluez and associated tools - I'm OK with that as I've stumbled (painfully) through it several times in the past for other projects - including connecting to a Bluetooth printer. My questions are:

a. I see Slackware includes "obexput" and "obexftp" commands. Are any of the two commands what I need to send a file to the phone - or is obexftp a different (but related) protocol.

b. Google searches mention a command called obex_push - is this something that is out of date or specific to other distro's - or should I try to get it installed on Slackware from somewhere.

Any advice form those who have dealt with this before is appreciated. I assume blueman would be able to do this - but I've managed to get my bluetooth stuff (eventually) sorted exclusively on the cli in the past - so I'd like to keep it that way - if possible.
Old 06-25-2013, 06:50 PM   #2
Didier Spaier
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 7,954

Rep: Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831Reputation: 2831
All obex commands available in Slackware have their own man page, to know more just type:
man obexftpd
man obexput
man obex-data-server
man obexls
man obexftp
man obexget
man obexrm

I think all you need is there.
Old 06-25-2013, 08:12 PM   #3
Registered: Jun 2008
Posts: 338

Original Poster
Rep: Reputation: 33
Thanks Didier. From what I can see, it seems that obexput, obexls, obexget and obexrm are wrappers around obexftp.

I've managed to pair up with the mobile. I've managed to send my .prov file to the phone with obexftp - I can upload it in the phone memory or on the microsd card. However, the phone is supposed to recognise this file automatically and import it as a SIP configuration file - according to my reading. I'm trying to push the the phone a .prov file containing SIP settings for the SIP client software on the phone (it is a Nokia).

As it stands, the file is on the phone, but the phone settings haven't been affected by it. If my understanding is correct, OBEX push is different from OBEX ftp - in that the phone is suppose to somehow recognise and act on the pushed file/object automatically. I think it can also be used to push business cards and other items between phones as well. However, I can't find a clear definition of all this.

Last edited by xj25vm; 06-25-2013 at 08:13 PM.
Old 06-25-2013, 09:25 PM   #4
Registered: Jun 2008
Posts: 338

Original Poster
Rep: Reputation: 33
Right! It seems this one has been cracked. For the benefit of others who might need this info, the short conclusions are:

1. OBEX push and OBEX file transfer are two different services.
2. obexftp can do both of them - with the correct command switches.

The steps:

a. Pair your phone with the computer. I won't go into great detail here - in short I just did on the laptop (after putting the phone in discoverable mode):

      hciconfig hci0 up
      hcitool scan
      simple-agent hci0 XX:XX:XX:XX:XX:XX
      test-device trusted XX:XX:XX:XX:XX:XX yes
The "XX.XX...." bit is your phone's bluetooth HW address - obtained with "hcitool scan". Input same PIN code on phone and computer (make one up) when prompted. "simple-agent" and "test-device" are python scripts which come with bluez sources, in the "test" folder. I downloaded bluez sources from ... erm, bluez website. The last command stops the computer from asking for the PIN every time the mobile connects to it.

b. Find out on what channel the OBEX PUSH service is offered on your device/mobile:

    sdptool search --bdaddr XX:XX:XX:XX:XX:XX OPUSH
Look in the output for a "Channel n"

c. Using the channel discovered with the command above, push the OBEX object to the phone:

obexftp  --nopath --noconn --uuid none --bluetooth -b  XX:XX:XX:XX:XX:XX -B 9 -put myfile.prov
In my case, channel 9 was the OBEX push channel - but amend as necessary. The first three options and the correct channel number are necessary for OBEX PUSH (as opposed to OBEX file transfer) in order for the phone to interpret the received file automatically and correctly and act on it. Otherwise the file gets transferred to the phone, but the phone doesn't do anything about it. Of course, the transferred file has to be in one of the formats recognised by the phone - in my case it is a SIP/Internet telephone settings file generated by a dedicated piece of software, and the phone automatically offers to import the settings contained in it - but that's a whole other story :-)

Hope the above will lighten the load for someone else :-)

Last edited by xj25vm; 06-25-2013 at 09:32 PM.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth and OBEX mobileMike Linux - Networking 2 07-01-2009 04:51 AM
obex problem and moto4lin (p2ktools) support via bluetooth dissident_goodchild Linux - Software 2 11-17-2007 02:46 PM
Where do bluetooth OBEX transfers from phone go? Guitarist88 Linux - Networking 2 01-11-2007 03:50 PM
Obex Push thoyyib Linux - Software 2 05-10-2006 09:12 AM
Bluetooth OBEX PUSH with Suse 9.3 JesperX Linux - Networking 1 07-31-2005 10:30 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration