Zaczynamy od instalacji libopenobex1 i obexftp:
Wchodzimy w konsolę i wpisujemy:
-
$ sudo apt-get install libopenobex1 obexftp
-
$ obex_test -u
-
Using USB transport, querying available interfaces
Interface 0: Nokia Nokia 6630 SYNCML-SYNC
Interface 1: Nokia Nokia 6630 PC Suite Services
Use '~/usbobex/bin/obex_test -u interface_number' to run interactive OBEX test client
-
$ lsusb
-
Bus 001 Device 006: ID 0421:0410 Nokia Mobile Phones 6630 Imaging Smartphone
-
$ sudo gedit /etc/udev/rules.d/020_permissions.rules
-
BUS=="usb", SYSFS{idVendor}=="0421", SYSFS{idProduct}=="0410", GROUP="grupa", USER="użytkownik"
Restatrujemy udev i sprawdzamy połączenie z telefonem:
-
$ sudo /etc/init.d/udev restart
$ obexftp -u 1 -c C:/ -l
Jeśli uzyskamy wynik podobny do tego:
-
Superuser privileges are required to access USB.
Connecting...done
Sending "C:"... done
Receiving "(null)"...
]>
oznacza to, że wszystko działa.
Jednak korzystanie z tego w trybie tekstowym jest niezbyt wygodne, więc zainstalujemy program ObexTOOL.
Ściągamy ObexTOOL i TableList 4.5 do katalogu ~/usbobex.
-
$ tar -zxvf ~/tablelist4.5.tar.gz
$ sudo mv tablelist4.5 /usr/lib
$ tar -zxvf ~/obextool-0.33.tar.gz
$ cd obextool-0.33
$ gedit etc/obexwrap.sh
-
obexftp -t /dev/modem "$@"
-
$HOME/usbobex/bin/obexftp -u 1 "$@"
Teraz w konsoli wpisujemy:
-
$ gedit obextool.tk
-
exec wish "$0" ${1+"$@"}
-
TCLLIBPATH=/usr/lib/tablelist4.5/ exec wish "$0" ${1+"$@"}
-
$ gedit etc/obextool.cfg
-
###
### Obex tool configuration file
###
set ObexConfig(cfg_file,version) "0.33"
###
### Language setting - 2 characters or environment
### keywords LOCALE, LC_MESSAGES, LC_ALL and LANG
### LOCALE honours $LC_ALL, $LC_MESSAGES and
### $LANG in order
###
# set ObexConfig(config,language) en
# set ObexConfig(config,language) de
# set ObexConfig(config,language) da
set ObexConfig(config,language) LOCALE
# set ObexConfig(config,language) LC_MESSAGES
# set ObexConfig(config,language) LC_ALL
# set ObexConfig(config,language) LANG
###
### Date format in the file listings
### Format descriptors:
### Y - 4 digit year
### Z - 2 digit year
### M - 2 digit month
### D - 2 digit day
### H - 2 digit hour
### N - 2 digit minute
### S - 2 digit seconds
### Note: detailed list view becomes sorted alphabetically!
###
# set ObexConfig(file,datefmt) "D.M.Y H:M"
set ObexConfig(file,datefmt) "Y-M-D H:M"
###
### Temporary file path and prefix
###
set ObexConfig(temp,prefix) "/tmp/otmp"
# set ObexConfig(temp,prefix) "~/otmp"
### if encoding is wanted...
set ObexConfig(config,encoding) "utf-8"
### ... else activate next line ...
# set ObexConfig(cfg,encoding) ""
### if html quoting is wanted...
set ObexConfig(config,quote_map) {""" "'" "'" "'"}
### ... else activate next line ...
# set ObexConfig(config,quote_map) ""
### Siemens S65V requires the trailing slash on obexftp ls
set ObexConfig(config,add_lslash) "/"
### ... deactivate "feature" if not working for you
# set ObexConfig(config,add_lslash) ""
### Nokia 6670 requires the trailing slash on all directory names
set ObexConfig(config,dir_slash) 1
#set ObexConfig(config,dir_slash) 0
###
### Enable memory status display - only works with Siemens :-(
###
# set ObexConfig(config,memstatus) 1
set ObexConfig(config,memstatus) 0
###
### Enable file move command - only works with Siemens :-(
###
# set ObexConfig(config,filemove) 1
set ObexConfig(config,filemove) 0
###
### Busy cursor
###
set ObexConfig(gui,cursor) watch
###
### Baloon help options
###
set ObexConfig(gui,help_options) {-bg #ffffc0 -font {Helvetica 10}}
###
### Memory status bar colors (red, green)
###
set ObexConfig(gui,status_bg) #C00000
set ObexConfig(gui,status_fg) #00C000
###
### Initial main window size on startup
###
set ObexConfig(gui,initsize) "800x600"
###
### Global dialog fonts
###
set ObexConfig(font,labels) {Helvetica 12 bold}
set ObexConfig(font,entries) {Helvetica 12}
set ObexConfig(font,buttons) {Helvetica 12}
set ObexConfig(font,frames) {Helvetica 12 bold}
###
### File list line height and font (tree_mode)
###
set ObexConfig(tree,font) {Helvetica 12}
set ObexConfig(tree,height) 21
###
### File list line height and font (list_mode)
###
set ObexConfig(list,font) {Helvetica 12}
set ObexConfig(list,lineheight) 22
###
### Icon view text parameters (icon_mode)
###
set ObexConfig(icon,font) {Helvetica 12}
set ObexConfig(icon,txt_maxlen) 12
set ObexConfig(icon,lineheight) 18
###
### Icon view position parameters
###
set ObexConfig(icon,xstart) 50
set ObexConfig(icon,ystart) 40
set ObexConfig(icon,x_offs) 80
set ObexConfig(icon,y_offs) 100
###
### Text window parameters (file viewer, file/memory info...)
###
set ObexConfig(textwin,font) {fixed 12 bold}
set ObexConfig(textwin,width) 60
set ObexConfig(textwin,height) 20
###
### ObexFTP command options
### Have a look into the obexftp man page
###
set ObexConfig(fileopt,get) "--get"
set ObexConfig(fileopt,put) "--put"
set ObexConfig(fileopt,list) "--list"
set ObexConfig(fileopt,move) "--move"
set ObexConfig(fileopt,info) "--info"
set ObexConfig(fileopt,chdir) "--chdir"
set ObexConfig(fileopt,delete) "--delete"
set ObexConfig(fileopt,version) "--version"
###
### System command for obexftp wrapper
### Will be ignored if OBEXCMD is specified
###
set ObexConfig(obexftp,command) "$OBEXCFG/obexwrap.sh"
###
### Initial mode of list window
###
# set ObexConfig(list,initmode) detail
set ObexConfig(list,initmode) listb
# set ObexConfig(list,initmode) icons
puts "Found configuration file [info script] version $ObexConfig(cfg_file,version) ..."
-
$ sudo mv obextool-0.33 /opt/obextool
-
/opt/obextool/obextool.tk








