LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-25-2013, 05:43 PM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
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, 05:50 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
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, 07:12 PM   #3
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
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 07:13 PM.
 
Old 06-25-2013, 08:25 PM   #4
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
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):

Code:
      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:

Code:
    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:

Code:
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 08:32 PM.
 
1 members found this post helpful.
  


Reply



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 03:51 AM
obex problem and moto4lin (p2ktools) support via bluetooth dissident_goodchild Linux - Software 2 11-17-2007 01:46 PM
Where do bluetooth OBEX transfers from phone go? Guitarist88 Linux - Networking 2 01-11-2007 02:50 PM
Obex Push thoyyib Linux - Software 2 05-10-2006 08:12 AM
Bluetooth OBEX PUSH with Suse 9.3 JesperX Linux - Networking 1 07-31-2005 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:58 PM.

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