I don't quite have this working the way I want it to yet, but it's close enough that I'm using it and probably won't work on it for a while. It has some room for improvement. For instance, my phone won't feed a file list to the computer through OBEX for some reason so I didn't include any way to browse the phone files. You just have to know the filename of any files you want to pull from the phone. It uses the obexftp utility because I didn't particularly feel like coding the actual file transfer from scratch, particularly since I'd have had to find and learn to use an obex library to do it.

#!/usr/bin/perl # #This script is intended to use obex to transfer files to and from my #cell phone, a Samsung MyShot (yes, I know it has a more accurate mode +l #number, but I'm writing this thing after having given up on sleep for + the night) use strict; use warnings; use Tk; use vars qw($file $mw $phoneAddr); #Set the bluetooth address of the phone $phoneAddr="Phone BT Address"; $mw=new MainWindow(-title=>"FoneFiles"); $file=$mw->Entry(); my $fileButton=$mw->Button(-text=>"Get File to Push",-command=>\&getFi +le); my $getPutFrame=$mw->Frame(); my $getButton=$getPutFrame->Button(-text=>"Get",-command=>\&getGo); my $putButton=$getPutFrame->Button(-text=>"Put",-command=>\&putGo); #Main window geometry $file->pack(); $fileButton->pack(); $getPutFrame->pack(); $getButton->pack(-side=>"left"); $putButton->pack(-side=>"left"); #sub to pick file to push to phone. I didn't write one to pick a file +to get #from the phone because it would work with my phone even if I did. sub getFile { my $filename=$mw->getOpenFile(); $file->configure(-text=>$filename); } #sub to get file from phone sub getGo { my $varFile=$file->get(); $varFile=~s/\ /\\ /; my $notice=$mw->Toplevel(-title=>"Getting"); my $lab=$notice->Label(-text=>"Getting file from your phone. Pleas +e wait")->pack; $mw->update; $notice->update; #obexftp is a command line obex utility. #This line will use the obex push protocol to get a file from +the phone `obexftp -b $phoneAddr --nopath --get $varFile`; destroy $notice; } #sub to send a file to the phone sub putGo { my $varFile=$file->get(); $varFile=~s/\ /\\ /; my $notice=$mw->Toplevel(-title=>"pushing"); my $lab=$notice->Label(-text=>"Pushing file to your phone. Please +wait")->pack; $mw->update; $notice->update; #This command uses obex push to push a file to the phone `obexftp -b $phoneAddr --nopath --put $varFile`; destroy $notice; } MainLoop;