File: README

package info (click to toggle)
cobex 0.2.12-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 208 kB
  • ctags: 213
  • sloc: ansic: 1,383; makefile: 116; sh: 62; perl: 50
file content (140 lines) | stat: -rw-r--r-- 5,814 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
CABLE-OBEX v0.2.11

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 K300i, K508i, K750i, K700i, T610,
T310 and T300 using a DCU-11 USB/Serial cable. Other phones might work, PLEASE report any succes
you have with it.

This project includes the five utilities, cobex_put, cobex_get, cobex_ls, cobex_rm and cobex_mkdir. 
Also, some contributions may be in the contrib/ folder.

Index:

WORKING PHONES
REQUIREMENTS
INSTALL
USAGE
CONTRIB
LICENSING
HINTS
CONTACT

WORKING PHONES:

The following phones are known to work:

T300	Doesn't support obex get, so can't download files
T310	Doesn't support obex get, so can't download files
T610	Works fine!
K700i	Works fine!
K750i	Works fine!
K508i	User reports that this one works fine too! I've never seen one myself.
K300i	User reports that this one works fine too! I've never seen one myself.
J300i   User reports that this one works fine too! I've never seen one myself.
T290	User reports that this one works, but you'll have to change the baudrate to 9600.
T230 	User reports that this one works, but you'll have to change the baudrate to 9600.

REQUIREMENTS:

Full GNU toolchain, ie. GCC etc.
ezv24 from http://ezv24.sourceforge.net/
expat from http://expat.sourceforge.net/

INSTALL:

Install the required libraries . If they are 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 and expat are in place, do a simple "make" and the project should build. 

Should you need to change the baudrate, you have to edit the files and recompile. It is
set to 115200 in cobex_serial.h baud by default.

Cobex does handle port locking using lockfiles. Unfortunately, f.ex. Fedora Core 3 does not, at
least not very well. So, therefore port locking is turned off by default. You can enable it
by editing the Makefile, and removing the hashmark in front of the LOCKSERIAL definition.

USAGE:

cobex_get <device> <filename>
cobex_ls <device> <filename>
cobex_put <device> <infile> <name-on-device>
cobex_rm <device> <filename>
cobex_mkdir <device> <filename>

Note,
- For cobex_get, use redirection or pipes to get the file to disk, or where you want it.
- Since v0.2.4, cobex_get has a bit better path handling. This means that
  you don't have to separate the filename into name and dir manually. It also sortof handles the
  telecom subtree, that isn't a tree at all, but filenames with / in them. 
- If you put a file to the root directory (or the Inbox), the phone will move it to where
  it thinks it should be. Putting directly to a destination is now supported.
- It should be exceedingly simple to make an kio_cobex.

For fun, you could try fetching telecom/rtc.txt (the clock) and telecom/devinfo.txt (the 
device presents it's features).

Example:

./cobex_ls /dev/ttyUSB0 ""

will list the files in top level directory on the phone.

./cobex_get /dev/ttyUSB0 "Bilder/Sad.gif" > Sad.gif

will fetch the file Bilder/Sad.gif from the phone and save it, using redirection, to a file Sad.gif.

CONTRIB:

KDE Servicemenu entry
Currently there is one contribution in contrib/ right now, and that is a KDE servicemenu
entry to be able to rightclick on any file, and send them to the phone. Install the
executable script and the cobex binaries somewhere in your path, and .dekstop file in your
user- or systemwide servicemenu folder, that is either
`kde-config --prefix`/share/apps/konqueror/servicemenus or
~/.kde/share/apps/konqueror/servicemenus . You'll figure it out.
This was contributed by Johannes Pirkl.

LICENSING:

GNU General Public License Version 2. Go fetch the license text from the usual places.

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.

I use this line to compile the pl2303 driver out of the kernel tree:

gcc -Wstrict-prototypes -Wno-trigraphs -fomit-frame-pointer -fno-strict-aliasing  \
-fno-common -D__KERNEL__ -DMODULE -DNOKERNEL -I/lib/modules/`uname -r`/build/include  \
-O2  -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -DMODULE -D__KERNEL__  \
-DEXPORT_SYMTAB -DMODVERSIONS -c pl2303.c

Contact:

Fredrik Srensson, sorn73 at yahoo dot com