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. |
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. |
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. |
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 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 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 Hope the above will lighten the load for someone else :-) |
All times are GMT -5. The time now is 04:24 PM. |