First let's be sure that the phone connects through USB the right way :
Here are the messages in /var/log/syslog
when the phone is connected (and the "phone mode" is kept on the phone : not the memorystick mode) :
Nov 11 17:31:57 rms kernel: usb 2-2: new full speed USB device using ohci_hcd and address 8 Nov 11 17:31:57 rms kernel: usb 2-2: configuration #3 chosen from 1 choice Nov 11 17:31:57 rms kernel: cdc_acm 2-2:3.1: ttyACM0: USB ACM device Nov 11 17:31:57 rms kernel: cdc_acm 2-2:3.3: ttyACM1: USB ACM device Nov 11 17:31:57 rms kernel: usbcore: registered new driver cdc_acm Nov 11 17:31:57 rms kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters Nov 11 17:31:58 rms kernel: usb0: register 'cdc_ether' at usb-0000:00:03.0-2, CDC Ethernet Device, 02:80:37:18:03:00 Nov 11 17:31:58 rms kernel: usbcore: registered new driver cdc_ether
You should then see something like this issueing lsusb
:
Bus 002 Device 007: ID 0fce:d046 Sony Ericsson Mobile Communications AB
(note that in the snippets copy pasted here, the numbering of the device on the USB bus changed, as I plugged it and removed it between the various experiments)
The phone should be useable then, but most probably, it will be accessible only as root user, as udev creates the corresponding devices with basic (root) permissions by default. We'll try to adapt this so that it can be accessed by any user in the dialout
group.
Next, let's try and check the phone's characteristics in udev (you will need to adapt the path given bellow to the USB device numbers seen in lsusb above) :
# udevinfo -a -p /class/usb_device/usbdev2.8 looking at device '/class/usb_device/usbdev2.8': KERNEL=="usbdev2.8" SUBSYSTEM=="usb_device" DRIVER=="" ATTR{dev}=="189:135" looking at parent device '/devices/pci0000:00/0000:00:03.0/usb2/2-2': KERNELS=="2-2" SUBSYSTEMS=="usb" DRIVERS=="usb" ATTRS{configuration}=="WMC Device" ATTRS{serial}=="3517090195964940" ATTRS{product}=="Sony Ericsson K610" ATTRS{manufacturer}=="Sony Ericsson" ATTRS{maxchild}=="0" ATTRS{version}==" 2.00" ATTRS{devnum}=="8" ATTRS{speed}=="12" ATTRS{bMaxPacketSize0}=="64" ATTRS{bNumConfigurations}=="1" ATTRS{bDeviceProtocol}=="00" ATTRS{bDeviceSubClass}=="00" ATTRS{bDeviceClass}=="02" ATTRS{bcdDevice}=="0000" ATTRS{idProduct}=="d046" ATTRS{idVendor}=="0fce" ATTRS{bMaxPower}=="500mA" ATTRS{bmAttributes}=="80" ATTRS{bConfigurationValue}=="3" ATTRS{bNumInterfaces}=="10"
Thanks to http://www.enterprisenetworkingplanet.com/nethub/article.php/3635686 and http://www.enterprisenetworkingplanet.com/nethub/article.php/3637076 for usefull details on UDEV setup.
This suggests that this phone obeys the WMC Device specification (WMC : Wireless Mobile Communication : http://www.usb.org/developers/devclass_docs/cdc_wmc10.zip), which means it understands OBEX commands.
Based on the above informations, it's safe to think that the phone can be configured in UDEV like the following.
Add a line suh as the following into /etc/udev/rules.d/020_permissions.rules
:
SUBSYSTEM=="usb_device", GROUP="dialout", \ ATTRS{configuration}=="WMC Device"
or maybe something like :
SUBSYSTEM=="usb_device", GROUP="dialout", \ ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="d046"
I suspect the first one to be more generic, but I'm not so completely sure... any reports on your side may be helpfull.
Now, if you issue the following command, then unplug the phone and plug it again, you should be able to access it if your user is in the dialout group :
udevcontrol reload_rules
Now, we will try and access the contents of the phone through OpenOBEX tools. Thanks to http://dburr.veritel.com.au/nokia/ for useful commands.
First check that the phone is recognised through the USB interface :
$ obex_test -u Using USB transport, querying available interfaces Interface 0: Sony Ericsson Sony Ericsson K610 Sony Ericsson Device 046 USB WMC OBEX Interface
You should then be able to list the base of contents of the phone with :
$ obexftp -u 0 -l Connecting...done Receiving "(null)"... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"> <!-- XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB --> <folder-listing version="1.0"><folder name="Mémoire téléphone"/> <folder name="Memory Stick"/> </folder-listing> done Disconnecting...done
Every operations should be possible then with obexftp, like getting or putting files on the phone or on its memory stick. More details at :
http://openobex.triq.net/devices/sony-ericsson#sonyericsson_k610i . This mentions using options like -U synch
which relate to the use of OBEX services, which are described at http://openobex.triq.net/obexftp/services.
I've found the command line nice, but found a useful tool to add a GUI over obexftp : obextool.
It's packaged for Debian and available at : http://www.stud.uni-karlsruhe.de/~ubq7/debian/ (thanks to http://wiki.splitbrain.org/nokia_6630).
The documentation for obextool is available here : http://www.tech-edv.co.at/programmierung/obextool/en/detail.html
In order for it to recognise the phone, you should start it with the following command line options :
$ OBEXCMD="obexftp -u 0" obextool or $ obextool --obexcmd "obexftp -u 0"
Update: In the meantime, as suggested in one of the comments bellow, I've tried and successfully used ObexFS which integrates much better with all the tools.
For users of the Gnome platform, you may prefer to use ObexFS (over FUSE) in order to access the phone contents from Nautilus directly instead of using obextool.
Setting-up obexfs required the following steps (as root) (thanks to http://www.bani.com.br/?p=10) :
- adding the user to the fuse group (
adduser youuser fuse
) - add the following line in
/etc/fstab
:obexfs#-u0 /media/phone fuse defaults,user 0 0
- create a
/media/phone
directory belonging to the fuse group :mkdir /media/phone
chgrp fuse /media/phone
chmod g+w /media/phone
An icon for the phone should then be manageable by gnome/nautilus, to mount it, or you may use pmount /media/phone
as the standard user.
To unmount it you must use the fusermount -u /media/phone
command, as pmount and FUSE are not yet fully integrated.
I hope this will allow you to discover more usefull ways to use the phone with you GNU/Linux system.
Please don't hesitate to provide enhancements for this documents.
Update 2008/01/21 : I've just found out that the phone can now be browsed with Nautilus, by using the "Browse device" right-click menu of the bluetooth icon in the gnome tray... and it works like a charm. At least this works on my Debian testing machine. no additional steps required with bluetooth ! Cool ;)
10 réactions
1 De Christian Zuckschwerdt - 12/11/2006, 15:50
Thank you for the nice write up. Did you try ObexFS from the OpenOBEX/ObexFTP pages? It allows you to mount your phone as a filesystem (with FUSE on Linux).
2 De Olivier Berger - 12/11/2006, 15:54
I've not tried ObexFS yet. obextool is convenient, but I may try and use something more elaborate like some automatic backup software maybe, which may need a filesystem, yes.
If you have some pointers on how to build such setup, I'd be glad to read ;)
Also, note I updated the udev rules : ATTRS{configuration}=="WMC Device" seems to be working. Will probably suggest that to Debian's udev maintainers...
3 De Olivier Berger - 12/11/2006, 20:28
Indeed ObexFS is great, and integrates quite nicely into the Gnome environment.
4 De jadawin - 13/11/2006, 10:54
Funny. I do exactly the same thing this week end :)
5 De Benjamin - 03/04/2007, 20:50
Thanks, works with my k800i as well - should definitly be suggested to the Debian stuff. Now I can use msynctool with opensync for the phone (at least the contacts-sync seem to work, I didn't manage to sync the calendar).
Ben
6 De Olivier Berger - 04/04/2007, 00:12
Note that instead of modifying /etc/udev/rules.d/020_permissions.rules, it may be more appropriate to modify a local file (like 010_local.rules or somethin), in order to keep this addition accross updates.
7 De Olivier Berger - 04/04/2007, 00:14
Benjamin, FYI, I did report it to Debian : bugs.debian.org/cgi-bin/b... ... but no luck so far :(
8 De WebLog Olivier Berger - 08/04/2007, 18:06
Transfering files from/to the Sony Ericsson T610 on GNU/Linux through Bluetooth + OBEX
Based on my successful setup of ObexFS + FUSE to access my K610i through the USB cable, which allows me to retrieve and modify the contents of my phone's memory under Gnome, I have attempted to do the same for the T610 Sony Ericsson phone of my...
9 De WebLog Olivier Berger - 10/06/2007, 17:14
Sony Ericsson K610i integration with Gnome as a portable audio player
When connecting a USB cable to the SE K610i, it can be switched to USB/MemoryStick reader mode, in order to be able to access the music/MP3s for instance. There's a way to have it recognised automatically as a portable music player, easing its...
10 De beford - 27/10/2007, 05:36
Thanks, I got it working with my w810i too, however, My phone didn't have the ATTRS{configuration}=="WMC Device" value, and I had to use the idVendor and idProduct approach. It would be cool to get it mounted automatically once it's get plugged, and being able to use the Unmount option under nautilus right click menu. Also, uh it was kinda difficult to solve the french captcha.