Using your Sony Ericsson T310 with Linux and IrDA This document features all the things i found out about my Sony Ericsson T310 and how it can be used with a linux box. i hope, this will be useful for somebody. Of course there is no guarantee that anything here works for you as well, but it may make your search easier. The newest version of this file can be found at http://xover.htu.tuwien.ac.at/amnenion/T310_linux.txt Feedback is welcome: w.haas at xover.htu.tuwien.ac.at Hardware: Sony Ericsson T310 ;-) IrDa (infrared) Transceiver There's also the possibility of using a cable, however i do not have one, so the following deals only with IrDA. Software: Mobile Phone: Firmware R3B003 (or later) for the T310 To find out which firmware is installed on your phone, see: http://www.esato.com/board/viewtopic.php?topic=35026&forum=2#post479087 Your phone may have installed an older firmware, which brought me into trouble with ObexFTP (for link, see later) because the phone just didn't react to connections any more. Getting the latest firmware (R3B003) solved the problems for me. Linux (either version 2.4.22 or a later version or patching might be necessary for versions below 2.4.22, see later): There seem to be some problems with Ericsson phones and IrDA (at least when using gsmlib (for link, see later), Openobex applications might work), search for "Ericsson" at http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html for details. If you don't care about details and just want it to work: just add these two lines # echo 1000 > /proc/sys/net/irda/min_tx_turn_time # echo 1 > /proc/sys/net/irda/max_tx_window to a script run at boot time on your box (/etc/conf.d/local.start, /etc/init.d/boot.local, /etc/rc.d/rc.local or whatever). You need to have Linux 2.4.22 (or later) or patch your kernel to do that. More information can be found at http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html. irda-utils http://irda.sf.net Needs to be installed and set up for working. The setup depends on the type of your IrDA device. openobex-1.0.1 http://openobex.sourceforge.net/ OpenOBEX is an implementation of the OBEX protocol. You need it to transfer images, vcards, melodies, etc. Now that all the basic libraries are installed it finally is time to transfer files from and to the phone :-) IrCP http://openobex.sourceforge.net/download.html IrCP can be used to send files to your T310 (don't forget to activate IR on both sides). It also has a mode to receive files from your phone. Everything that can be sent via IR from some menu of your phone can be transferred. This includes pictures, melodies and phonebook entries. Unluckily IrCP writes all the files it receives to /, so you need to be root to use it. There seems to be little development going on with this project, therefore it is doubtable if there will be a version in which this problem will be fixed. Send something from your phone (a picture, vcard or melody) via IR and receive it with: # ircp -r Waiting for incoming connection Incoming connection Receiving foo.gif...done Disconnecting Sending is as well possible: # ircp foo.mid Connecting...done Sending foo.mid...done Disconnecting...done Note: Sending files to the phone will usually fail the first time. However it works when tried a second time. At the moment i chose to ignore this problem. This applies to IrCP, irobex_palm3 and ObexFTP. If someone finds a solution, i'd be happy to know it. irobex_palm3 http://openobex.sourceforge.net/download.html irobex_palm3 is part of the openobex-apps package and though it is actually designed for use with palm-pdas, it can send and receive files just as IrCP. Received files are written to /tmp/ which is slightly better than having them in / as you can execute it as non-root user as well. Unluckily there seems to be little development going on here, too. receiving files: # irobex_palm3 Send and receive files to Palm3 Waiting for files ..............Filename = foo.gif Wrote /tmp/foo.gif (7508 bytes) sending files: irobex_palm3 bar.gif Send and receive files to Palm3 name=bar.gif, size=2010 .... PUT successful obexftp-0.10.4 (Note: not released yet!) ObexFTP can send files to your T310 just as IrCP and irobex_palm3: # obexftp -p foo.bar. Receiving files works differently from the other two applications. There is no receive mode, but you can also tell your phone which files to transfer to your box. At the moment there is no method known to browse the directory-content of the phone which makes it a bit difficult to know what to load down. Fortunately, here (http://triq.net/obexftp/doc/README.ericsson.html) is a little list of files. # obexftp -g telecom/pb.vcf loads your whole phonebook from the phone (and actually writes it to the actual working directory). Now you can edit it with your preferred editor and send it back. # obexftp -k telecom/pb.vcf deletes the old phonebook (do this at your own risk). # obexftp -p pb.vcf sends your new phonebook to the phone. When sending the whole phonebook (or just one entry) or some calendar-related information, the T310 doesn't care about filenames, just the ending (".vcf") is important in that case. this is quite funny: from telecom/devinfo.txt: MOD:T300 HW-VERSION:proto It would be interesting to know if there are other users, who's phones are still convinced to be prototypes of the T300 series ;-) Conclusion: There is no difference whether you send send your files to your phone with ObexFTP, IrCP or irobex_palm3. As far as I know there is no possibility to send the whole phonebook or the whole calendar via any send command in any menu of the T310 which makes obexftp very useful. On the other hand there is no known way (yet) to pull pictures and sounds off the phone with obexftp. This can only be achieved by using IrCP, irobex_palm3 or obexftp in receive mode. gsmlib-1.10 gsmlib offers a wide spectrum of applications, at the moment i only used gsmsmsstore (and possibly may never need more of the applications). gsmsmsstore can be used to copy short messages from and to your phone. the t310 offers 2 kinds of storage: the store on the sim card (SM) and the store in your phone (ME). if you are in the text-message menu of your phone, you can distinguish between a message saved in your phone and one saved on your SIM-card by the symbols. There's also an option to save the message from the phone's memory onto your sim-card. You can load down your stored messages with the command: # gsmsmsstore --source /dev/mobilephone --baudrate 57600 -l --store ME it shows the messages stored on the phone-memory (ME). Note: On my system /dev/mobilephone is a symlink to /dev/ircomm0. It might be necessary to create a symlink to your IR-device respectively use its name (whatever it might be). # gsmsmsstore --source /dev/mobilephone --baudrate 57600 -l --store SM shows the messages stored on your sim card. # gsmsmsstore --source /dev/mobilephone --baudrate 57600 --store ME --backup \ # --destination /path/to/stored-messages makes a backup of all messages stored on the phone's memory. once you delete a message from your phone, it still won't be deleted from the stored-messages on your disk the next time you issue this command, only new messages will be added to your stored-messages. This is great for archiving your short messages. # gsmsmsstore --source /path/to/stored-messages -l shows you all the messages stored in your archive. Note: doesn't work under certain circumstances, i sent a mail about this to the gsmlib-devel-list: http://lists.over.net/pipermail/gsmlib-devel/2003-October/thread.html#532