|
From: Francesco <f18...@ya...> - 2010-02-06 21:51:11
|
Hi Frans!
welcome back from holidays ;)
> I have been trying the libusb1 branch on ubuntu. Apart from the fact
> that libusb_strerror was missing in the linux version, it compiled fine.
well, I wrote libusb_strerror() and sent it as a patch to the libusb
guys and it has been queued for inclusion in the mainline together
with the windows-backend's patches. So your fix is right for now but
"soon" it should be an official libusb API function ;)
> It does also connect to the usbpicprog hardware, but in my case the
> communication with the hardware is not stable at all.
I know. It's true for me too :(
> After connection it does read the firmware version and it can read a
> couple of bytes from the PIC, but then it will give an error. I will try
> further and let you know when I have more success...
same here. It gives me lots of "Timeout errors".
However the errors seem to be triggered at random and so sometimes
I've been able to e.g. read the code memory of a PIC16 connected to
the programmer. Anyway in its current status it's not really usable,
unfortunately.
The only "positive" thing is that I see the same behaviour on both
Windows and Linux so that hopefully when we will fix it on linux it
probably will run fine also on Windows.
> The upp_wx-libusb1 seems to communicate stable with the bootloader in
> ubuntu. Let me find out what the difference is...
I tried to use wireshark as USB sniffer (see
http://biot.com/blog/usb-sniffing-on-linux) and I found out that when
the USB host controller sends "GET DESCRIPTOR request" packets the hw
will usually (maybe 100% of the times, I should check) reply with "GET
DESCRIPTOR response" packets which wireshark tags as [Malformed
Packet]s (they appear as 8 bytes packets containing only zeroes).
There's a developer on the libusb ML (Xiaofan Chen) which works with
PIC controllers and IIRC I read in one of his messages that the
Microchip USB stack is known to have many bugs. Are we using the
latest version of the Microchip USB stack?
Sorry for my ignorance but I still have to learn how to use the USB
subsystem of the PIC controllers (I'm planning a project USB-based but
it's still far from completion) and so it's difficult for me to check
the current *.c and *.h files in the uc_code folder.
Also note that the malformed packets I've seen are crafted by the the
upp hw you sent me (PCB ver 0.3) loaded with the very latest version
of the fw (788)...
Francesco
|