Le samedi 27 mars 2010 à 12:08 -0400, Chris Frey a écrit :
> On Sat, Mar 27, 2010 at 11:33:42AM +0100, Nicolas wrote:
> > 2nd step)
> > =========
> > [nico...@dahlia nicolas]$ btool -t -P badpassword
> > Blackberry devices found:
> > Device ID: 0x80755b8. PIN: xxxxxx, Description: RIM BlackBerry Device,
> > Name: BlackBerry Storm
> > Using device (PIN): xxxxxx
> > Bad packet size. Packet: 26. DataSize(): 26. Required size: 44
> >     00000000: 00 00 1a 00 09 ff 00 07 52 49 4d 20 44 65 73
> > 6b  ........RIM Desk
> >     00000010: 74 6f 70 00 00 00 00 00 02 00
> > top.......
> > 
> > Barry::Error caught: Bad packet size. Packet: 26. DataSize(): 26.
> > Required size: 44
> 
> Hi Nicolas!
> 
> Yep, this is a common error if things don't shutdown properly.
> Any time btool is aborted with Ctrl-C, for example.
> 
> I believe it *is* possible to recover from this, but I haven't taken the time
> to look at what Windows does to reset.
> 
> 
> > 2 solutions :
> > - re-plug my device ; then type the good password !
> 
> You can also run breset instead of handling the device manually.
> 
> 
> > - run mtp-detect before btool ; then type the good password !
> 
> Interesting.  What does mtp-detect do to the Blackberry that resets it?

I have seen one difference & I have tried :

[nico...@dahlia barry]$ git diff
diff --git a/src/usbwrap.cc b/src/usbwrap.cc
index 184ff28..531933a 100644
--- a/src/usbwrap.cc
+++ b/src/usbwrap.cc
@@ -166,6 +166,8 @@ Device::Device(Usb::DeviceIDType id, int timeout)
        m_handle = usb_open(id);
        if( !m_handle )
                throw Error("open failed");
+
+       usb_reset(m_handle);
 }
 
 Device::~Device()


With this patch, it's OK for me.


By the way, I have reversed in part the USB protocol to make firmware
upgrade... I have to find some time to implement the protocol and a tool
as bfu (or bupdate ; bosupdate... if you have a suggest). Someone is
ready to take risks ? 
I need some old devices :)


Regards,

Nicolas



------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to