[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coldsync-hackers] visor/USB & FreeBSD update



Hey all; hope this isn't too long & gives some useful answers

First, I've tested Hayato's method and it works on my box.  Thanks!  It's interesting that the timing between hitting the hotsync button and starting usbd is so critical.

next...
Andrew Arensburger wrote:
> 
> On Wed, 14 Mar 2001, James WIdman wrote:
> > So it would seem that only usbd can use USB devices directly, and any
> > program that wants to use a device must be called as an "attach"
> > statement.
> 
>         Another possibility is that it doesn't work for you, but does work
> for root ('usbd' runs as root).
>         You may want to try running ColdSync as root on the command
> line. If it works, then it's most likely a permissions problem. Otherwise,
> it's something to do with usbd vs. command line.

I guess it's not a permissions problem then, becuase coldsync still dies when I run it as root.

Here's what seems to be the meat of ktrace.out (running as root; usbd is running with a blank /etc/usbd.conf):


 93726 coldsync RET   ioctl 0
 93726 coldsync CALL  write(0x1,0x8088000,0x21)
 93726 coldsync GIO   fd 1 wrote 33 bytes
       "Please press the HotSync button.
       "
 93726 coldsync RET   write 33/0x21
 93726 coldsync CALL  open(0x8084090,0x2,0xbfbff8dc)
 93726 coldsync NAMI  "/dev/ugen0"
 93726 coldsync RET   open -1 errno 6 Device not configured
 93726 coldsync CALL  nanosleep(0xbfbff868,0xbfbff860)
 93726 coldsync RET   nanosleep 0
 93726 coldsync CALL  open(0x8084090,0x2,0xbfbffa80)
 93726 coldsync NAMI  "/dev/ugen0"
 93726 coldsync RET   open -1 errno 6 Device not configured
 93726 coldsync CALL  nanosleep(0xbfbff868,0xbfbff860)
 93726 coldsync RET   nanosleep 0
 93726 coldsync CALL  open(0x8084090,0x2,0xbfbffa80)
 93726 coldsync NAMI  "/dev/ugen0"
 93726 coldsync RET   open -1 errno 6 Device not configured
 93726 coldsync CALL  nanosleep(0xbfbff868,0xbfbff860)
 93726 coldsync RET   nanosleep 0
 93726 coldsync CALL  open(0x8084090,0x2,0xbfbffa80)
 93726 coldsync NAMI  "/dev/ugen0"
 93726 coldsync RET   open -1 errno 6 Device not configured
 93726 coldsync CALL  nanosleep(0xbfbff868,0xbfbff860)
 93726 coldsync RET   nanosleep 0
 93726 coldsync CALL  open(0x8084090,0x2,0xbfbffa80)
 93726 coldsync NAMI  "/dev/ugen0"
 93726 coldsync RET   open 3
 93726 coldsync CALL  ioctl(0x3,USB_SETDEBUG,0xbfbff8ac)
 93726 coldsync RET   ioctl -1 errno 22 Invalid argument
 93726 coldsync CALL  ioctl(0x3,USB_GET_DEVICEINFO,0xbfbff928)
 93726 coldsync RET   ioctl 0
 93726 coldsync CALL  ioctl(0x3,USB_SET_CONFIG,0xbfbff8ac)
 93726 coldsync RET   ioctl 0
 93726 coldsync CALL  ioctl(0x3,USB_DO_REQUEST,0xbfbff910)
 93726 coldsync RET   ioctl 0
 93726 coldsync CALL  ioctl(0x3,USB_DO_REQUEST,0xbfbff910)
 93726 coldsync RET   ioctl 0
 93726 coldsync CALL  close(0x3)
 93726 coldsync RET   close 0
 93726 coldsync CALL  open(0x8083140,0x2,0)
 93726 coldsync NAMI  "/dev/ugen0.2"
 93726 coldsync RET   open 3
 93726 coldsync CALL  fcntl(0x3,0x3,0)
 93726 coldsync RET   fcntl 2
 93726 coldsync CALL  fcntl(0x3,0x4,0x2)
 93726 coldsync RET   fcntl -1 errno 22 Invalid argument
 93726 coldsync CALL  ioctl(0x3,USB_SET_SHORT_XFER,0xbfbff8ac)
 93726 coldsync RET   ioctl 0
 93726 coldsync CALL  select(0x4,0xbfbff8f0,0,0,0xbfbff9c8)
 93726 coldsync RET   select 1
 93726 coldsync CALL  read(0x3,0x8087800,0x400)
 93726 coldsync RET   read -1 errno 5 Input/output error
 93726 coldsync CALL  writev(0x2,0xbfbff8d0,0x4)
 93726 coldsync GIO   fd 2 wrote 29 bytes
       "usb read: Input/output error
       "
 93726 coldsync RET   writev 29/0x1d
 93726 coldsync CALL  writev(0x2,0xbfbff900,0x4)
 93726 coldsync GIO   fd 2 wrote 35 bytes
       "slp_read: read: Input/output error

===================================================
....and on like that.  I also did a ktrace while using Hayato's method (which was successful, though I was running it as root), and it seems the first major difference between the two ktrace.out files is at that "CALL read" line, just above the first "usb read: Input/output error" mesg.  From that point, the ktrace from the successful sync continues like this:

 94257 coldsync CALL  read(0x3,0x8087800,0x400)
 94257 coldsync GIO   fd 3 read 10 bytes
       "\M->\M-o\M-m\^C\^C\^B\0\^N\M^?\M-/"
 94257 coldsync RET   read 10/0xa
 94257 coldsync CALL  read(0x3,0x8087800,0x400)
 94257 coldsync GIO   fd 3 read 14 bytes
       "\^A\M-@\0
        \^A\0\^A\^B\0\0\0\^C\M^D\0"
 94257 coldsync RET   read 14/0xe
 94257 coldsync CALL  read(0x3,0x8087800,0x400)
 94257 coldsync GIO   fd 3 read 2 bytes

....and so on.  

That's all I've got for now.

LLAP

James

-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.