Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 10, 2012, 01:22:24 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Check out the Code Section!
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: PSPLinkusb not working in linux with libusb [Fix]  (Read 1376 times)
razzlegames
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 185
10583.50 points

View Inventory
Send Money to razzlegames
Art, Engineering..ice... BLEND!


View Profile WWW
« on: May 08, 2010, 04:23:37 PM »

Hi folks,

 Just an FYI and warning to those on Linux.  I could not get psplinkusb to work, until some moderate percussive  maintenance   Very Happy
(my system: Mandriva 2009.1, vmlinuz-2.6.29.6-desktop-3mnb, libusb0.1_4-0.1.12-12mdv2009.1)

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...

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)



« Last Edit: May 08, 2010, 06:39:28 PM by razzlegames » Logged



razzlegames
Full Member
***

Karma: +10/-0
Offline Offline

Posts: 185
10583.50 points

View Inventory
Send Money to razzlegames
Art, Engineering..ice... BLEND!


View Profile WWW
« Reply #1 on: May 10, 2010, 08:10:54 PM »

Well, I guess this is a common issue with TA-082 PSPs (idstorage mangling).

http://forums.ps2dev.org/viewtopic.php?p=88341#88341
Logged

Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.157 seconds with 25 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com