[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] FreeBSD & M505 (was: Feature freeze)
On Sun, Nov 18, 2001 at 07:25:37PM -0800, Greg KH wrote:
> On Mon, Nov 19, 2001 at 01:58:30AM +0000, Josef Karthauser wrote:
> >
> > If there any way you can get me some low-level USB debug from the linux
> > stack during an enumeration and subsequence coldsync invocation?
>
> I have some Windows sniffs using USBSnoopy somewhere, if they will help.
>
> If you take a look at visor_startup() in drivers/usb/serial/visor.c in
> the Linux kernel tree, you can see the new command that you need to send
> to the Palm (done after we determine what the different ports are used
> for, see the PALM_GET_SOME_UNKNOWN_INFORMATION message.) Adding that
> extra message to the initialization sequence was all it took to get the
> Palm 4.x OS to start sending sync data.
>
> Let me know if you have any other questions.
I've ported the PALM_GET_SOME_UNKNOWN_INFORMATION transactions into
the coldsync process, but still no joy. I've put the two transactions
in the startup code, which is basically exactly the same code as
the startup function in the visor.c code of linux.
Any other ideas would be very welcome.
Joe
--- coldsync-2.2.3/libpconn/PConnection_usb.c Fri Oct 12 02:22:51 2001
+++ coldsync-2.2.3-hacked/libpconn/PConnection_usb.c Tue Nov 20 03:58:00 2001
@@ -635,10 +636,64 @@
padp_tini(pconn);
slp_tini(pconn);
return -1;
}
+ /*====================================*/
+ /* Fix ups for Palm OS 4.0 */
+
+ sleep(1);
+ printf("M505 Wakeup one\n");
+/*
+ response = usb_control_msg (
+dev serial->dev,
+pipe usb_rcvctrlpipe(serial->dev, 0),
+*request PALM_GET_SOME_UNKNOWN_INFORMATION,
+*requesttype 0xc2,
+*value 0x0000,
+*index 0x0000,
+*data transfer_buffer,
+*size 0x14,
+timeout 300);
+*/
+ bzero((void *) &ur, sizeof(ur));
+ ur.request.bmRequestType = UT_READ_VENDOR_ENDPOINT;
+ ur.request.bRequest = 0x04; /* PALM_GET_SOME_UNKNOWN_INFORMATION */
+ USETW(ur.request.wValue, 0);
+ USETW(ur.request.wIndex, 0);
+ USETW(ur.request.wLength, 0x14);
+ ur.data = &usbresponse[0];
+
+ if (ioctl(usb_ep0, USB_DO_REQUEST, &ur) < 0) {
+ perror(_("ioctl(USB_DO_REQUEST) error getting first unknown palm command"));
+ }
+
+ sleep(1);
+ printf("M505 Wakeup two\n");
+/*
+ response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+ PALM_GET_SOME_UNKNOWN_INFORMATION,
+ 0xc2, 0x0000, 0x0000, transfer_buffer,
+ 0x14, 300);
+*/
+ bzero((void *) &ur, sizeof(ur));
+ ur.request.bmRequestType = UT_READ_VENDOR_ENDPOINT;
+ ur.request.bRequest = 0x04; /* PALM_GET_SOME_UNKNOWN_INFORMATION */
+ USETW(ur.request.wValue, 0);
+ USETW(ur.request.wIndex, 0);
+ USETW(ur.request.wLength, 0x14);
+ ur.data = &usbresponse[0];
+
+ if (ioctl(usb_ep0, USB_DO_REQUEST, &ur) < 0) {
+ perror(_("ioctl(USB_DO_REQUEST) error getting second unknown palm command"));
+ }
+
+ sleep(1);
+ printf("M505 Wakeup end\n");
+
+ /*====================================*/
+
bzero((void *) &ur, sizeof(ur));
ur.request.bmRequestType = UT_READ_VENDOR_ENDPOINT;
ur.request.bRequest = usbRequestVendorGetBytesAvailable;
USETW(ur.request.wValue, 0);
USETW(ur.request.wIndex, 5);
PGP signature