CABLE-OBEX v0.2.0

This is Cable OBEX, or Cobex for short, a small utility/library for talking to (not in, hahaha)
a cellphone using OBEX over a serial cable. For a full-featured Open Source OBEX implementation,
see the OpenOBEX project, http://openobex.sourceforge.net/ . I think their primary focus is IrDA
and Bluetooth, and I never got it to work over a serial cable, thus this project.

Cobex has been successfully tested with the SonyEricsson phones T610, T310 and T300 using a DCU-11
USB/Serial cable. Other phones might work. 

This project includes the three utilities, cobex_put, cobex_get and cobex_ls. That's right, now
you can get files from a T610, NOT a T300/T310. An added bonus is the modeldb sub-project.

Install:

Install the library ezV24 from http://ezv24.sourceforge.net/ . If it's not installed in the
usual places, you will have to modify the Makefile. Come on, a configure script with all it's
fluff would be several times larger than this entire project.

When ezV24 is in place, do a simple "make" and the project should build. 

Should you need to change the baudrate, you have to edit main.c and recompile. It is
set to 9600 baud by default, as that is what the SE T310/DCU-11 can do.

Usage:

cobex_get <device> <dir> <file>
cobex_ls <device> <dir>
cobex_put <device> <infile> <name-on-device>

Note,
For cobex_get, use redirection or pipes to get the file to disk, or where you want it.
cobex_ls presents the directory object, which is an XML file. I will add parsing Real
Soon now.
cobex_put puts a file to the Inbox, and let's the phone sort it out where it should end,
putting directly to a directory is currently not supported.
It should be exceedingly simple to make an kio_cobex.

Modeldb:

New in this version is the tiny tool modeldb. This is a tool to autodetect what's 
connected to a serial port. Usage is simple:

dodetect <device>

Curently, the model db in the phones.xml file holds four different phones and software
revisions, email me the responses from your phone and I will include them in the database.
You need to recompile if you add a new phone. 

Example:

./cobex_ls /dev/ttyUSB0 ""

will list the files in toplevel directory on the phone.

Licensing:

GPL. ezV24 is GPL and I link against it, thus Cobex is GPL.

Notes about T300/T310:
 
The OBEX implementation in the T310 is ... well, it's not very exhaustive. It
doesn't seem to support GET for example. That's right, there doesn't seem to be any way to
transfer things from a phone to a computer using the serial cable. Of course, you can beam
objects to a computer, using a IrDA device and OpenOBEX/ircp, but unless you have a laptop
with a builtin IrDA device, the support for IrDA devices, ie. IrDA dongles, under Linux is
not good.

In some cases, the implementation in the phone is not even compliant with the specification.
If you try to GET an object you will get no response. None whatsoever. In fact, if you try
you will lock up the OBEX server in the phone, and you will have to restart it. The phone,
that is. You need to powertoggle it.

You don't need OBEX to fetch the phonebook or SMSs, or check the battery and signal status,
you can do that directly with AT commands.

Hints:

The DCU-11 cable is supported in Linux 2.4.21 using the pl2303-driver. However, the pl2303
can be modified to support the DCU-11 cable in earlier versions, at least 2.4.18 and possibly
all the way back to pre 2.4. Bascially, if you modify the pl2303 driver to recognize the DCU-11
cable vendor and product ID, you're there. The vendor:product ID for the DCU-11 is 0x0731:0x0528.

Contact:

Fredrik Srensson, sorn73 at yahoo dot com
