On Mon, 27 Sep 2004, Marcel Holtmann wrote:
> > > I don't buy your point. From what I know is that OBEX only needs bulk
> > > transfers and these can be used very easy through the USB library. The
> > > big advantage using the USB library is that you also support OBEX over
> > > USB for FreeBSD and MacOS X at the same time with the same code. Think
> > > about that, because this is not about inconsistence. Use the interface
> > > that fits the best and from my view this is not a kernel driver.
> >
> > I agree to this. Since Greg seems to agree too, I think we can ditch the
> > driver patch, and I'll write the openobex patch. It's a pity though that
> > you only suggested this now, and not three weeks ago when I proposed the
> > OBEX driver - would save some effort. :)
>
> sorry for that, maybe I missed your posting. Some time ago I already
> discussed this with a guy from Nokia, but he actually never send in any
> code.
Hi Marcel,
so I finally got around to writing the USB transport patch for
OpenObex, and it seems to work okay:
[EMAIL PROTECTED] src]$ sudo ./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 './obex_test -u interface_number' to run interactive OBEX test client
(which of course also seems to work, connect/setpath/put etc.)
I also now have two phones to test it with :) (Nokia 7610 and 6630). I'll
send you the full thing shortly (I need to add USB support to obexftp
first and make sure it works, and do some code cleanup and commenting) but
for now could you please check the proposed changes to global obex include
files? In addition to the transport connect function, I'm also providing
an interface discovery function, which returns a linked list of usb obex
interface structures.
--- openobex-1.0.1/src/obex.h 2003-10-01 14:17:13.000000000 +0300
+++ openobex-1.0.1-usb/src/obex.h 2005-01-25 02:31:09.000000000
+0200
@@ -134,4 +134,10 @@
*/
int FdOBEX_TransportSetup(obex_t *self, int rfd, int wfd, int mtu);
+/*
+ * OBEX USB API
+ */
+ struct usb_obex_intf* UsbOBEX_GetInterfaces(obex_t *self);
+ int UsbOBEX_TransportConnect(obex_t *self, struct usb_obex_intf*
interface);
+
#endif
--- openobex-1.0.1/src/obex_const.h 2003-10-01 14:17:13.000000000
+0300
+++ openobex-1.0.1-usb/src/obex_const.h 2005-02-03 02:01:31.686399841
+0200
@@ -47,6 +47,24 @@
void * customdata;
} obex_ctrans_t;
+struct usb_obex_intf;
+
+struct usb_obex_intf {
+ struct usb_obex_intf *prev, *next;
+ struct usb_device *device;
+ int configuration;
+ int control_interface;
+ int control_interface_description;
+ int control_setting;
+ int data_interface;
+ int data_idle_setting;
+ int data_interface_idle_description;
+ int data_active_setting;
+ int data_interface_active_description;
+ int data_endpoint_read;
+ int data_endpoint_write;
+};
+
#define OBEX_CLIENT 0
#define OBEX_SERVER 1
@@ -81,6 +99,7 @@
#define OBEX_TRANS_CUSTOM 3
#define OBEX_TRANS_BLUETOOTH 4
#define OBEX_TRANS_FD 5
+#define OBEX_TRANS_USB 6
/* Standard headers */
#define OBEX_HDR_COUNT 0xc0 /* Number of objects (used by
connect) */
@@ -133,6 +152,7 @@
#define OBEX_DEFAULT_MTU 1024
#define OBEX_MINIMUM_MTU 255
#define OBEX_MAXIMUM_MTU 32768
+#define OBEX_DEFAULT_MTU_USB 0xffff
/* In theory max MTU is (64k-1), but that's quite big. */
/* Optimum MTU for various transport (optimum for throughput).
Regards,
--
Alexander
Homepage: http://www.sensi.org/~ak/
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel