| View previous topic :: View next topic |
| Author |
Message |
elyk1212
Joined: 08 Jun 2007 Posts: 4
|
Posted: Mon May 10, 2010 7:41 am Post subject: PSPLinkusb not working in linux with libusb [Fix] |
|
|
Hi folks,
Just an FYI and warning to those on Linux. I could not get psplinkusb to work, until some moderate percussive maintenance :D
(my system: Mandriva 2009.1, vmlinuz-2.6.29.6-desktop-3mnb, libusb0.1_4-0.1.12-12mdv2009.1,
Japanese PSP: 1000)
I had to modify the usbhostfs_pc source code and eliminate the vendor ID check.
The vendor id was showing up on my system as: 0x6472, while usbhostfs_pc was expecting:
#define SONY_VID (0x54C). The product ID remained the same: 0x01c9.
Of course the tool would not connect to my PSP since it would not even attempt without the correct ID numbers. I commented out the check for SONY_VID and kept the correct Product id and this fixed the problem.... several hours later I decided to look into wrestling their code lol.
Here's how libusb was reporting things:
May 8 16:58:39 localhost klogd: usb 1-1.3: New USB device found, idVendor=6472, idProduct=01c9
This could actually be an issue with my libusb version... I am not certain. But anyhow, it may be a good idea to parameterize these ID value so the user can add them on the command line. Quick fix. Maybe I'll do that since he just uses optarg stuff, which is totally nice. But maybe later.....
For now here is the simple patch. And btw I added readline by default, why would anyone not want readline searching and history? Hmm...
But anyhow if you don't want that change, just take out the readline stuff of the "patch".
| Code: |
[#USER#@localhost usbhostfs_pc]$ svn diff
Index: main.c
===================================================================
--- main.c (revision 2493)
+++ main.c (working copy)
@@ -47,10 +47,8 @@
#include <sys/statvfs.h>
#endif
-#ifdef READLINE_SHELL
#include <readline/readline.h>
#include <readline/history.h>
-#endif
#include "psp_fileio.h"
@@ -260,8 +258,8 @@
for(dev = bus->devices; dev; dev = dev->next)
{
- if((dev->descriptor.idVendor == SONY_VID)
- && (dev->descriptor.idProduct == g_pid))
+ if((dev->descriptor.idProduct == g_pid))
+ //&& (dev->descriptor.idVendor == SONY_VID)
{
hDev = usb_open(dev);
if(hDev != NULL)
|
|
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Tue May 11, 2010 2:47 am Post subject: |
|
|
| Sounds like your idstorage is fucked, you might want to fix that instead :) |
|
| Back to top |
|
 |
elyk1212
Joined: 08 Jun 2007 Posts: 4
|
Posted: Tue May 11, 2010 4:20 am Post subject: |
|
|
Any recommend tools? I was thinking I might have a diff id value due to having a Japan psp , but I guess they're all the same.
Thanks! |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
|
| Back to top |
|
 |
elyk1212
Joined: 08 Jun 2007 Posts: 4
|
Posted: Tue May 11, 2010 10:40 am Post subject: |
|
|
Functionaly, is there any issues you could foresee if I left it as-is? Other than the id hiccup, I guess. I mean I haven't run into any noticeable use issues.
I'll have to read more docs on idstorage it would seem. |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Tue May 11, 2010 11:38 am Post subject: |
|
|
| I don't recall there being any really significant problems with a broken idstorage, at least broken in this fashion. You could leave it as is if you wanted to. |
|
| Back to top |
|
 |
elyk1212
Joined: 08 Jun 2007 Posts: 4
|
Posted: Tue May 11, 2010 2:05 pm Post subject: |
|
|
Thanks for all your help, and for the cool tool (usbhostfs_pc).
This is probably redundant, since I found this to be a common issue. But for search engines:
I was using a Ta-082 Japanese PSP, and idstorage was likely corrupted by a special 82 "downgrader".
Funny how common this issue is. I thought maybe I did something extraordinarily sweet to break stuff :P. |
|
| Back to top |
|
 |
|