| View previous topic :: View next topic |
| Author |
Message |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Sun Mar 22, 2009 12:56 am Post subject: Sending data via USB |
|
|
Dear PSP Developers,
how is it possible to send data via USB from PSP to PC?
I searched the forum and found some information on usbhostfs and remotejoy but no sample code.
tnx,
MBx |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sun Mar 22, 2009 4:53 am Post subject: |
|
|
| You obviously don't look very hard now do you... |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Sun Mar 22, 2009 7:24 am Post subject: |
|
|
I did my bets searching, sorry if it was not enough.
BTW, it seems that I must rewrite my question.
actually I found some thing about loading files and view directories and ... via usb, but I'm looking for something like "ports" or "piping".
I need to establish between a program in PC and one in PSP.
any help? |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Sun Mar 22, 2009 7:05 pm Post subject: |
|
|
| tnx man, appreciate it :) |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Mon Mar 23, 2009 3:25 am Post subject: |
|
|
Unfortunately, I still have problem with this USB thing.
I'm loading "usbhostfs.prx" first and then I'm trying to register a USB connection.
the psp allocates the channel and then stops at "usbWaitForConnect()".
is this the place where PC should do something or what?
my guess was that the pc program must connect a tcp socket to localhost:10004 but trying this I get the following exception:
"No connection could be made because the target machine actively refused it 127.0.0.1:10004"
I'm using windows vista coding in C# (don't be silly please :D, I'm using this just for tests!).
another thing to mention is that I've installed usblib on windows.
any help? |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Mon Mar 23, 2009 5:45 am Post subject: |
|
|
reading some parts of PSPLINK code I've noticed that I have to call:
| Code: | sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0);
sceUsbStart(HOSTFSDRIVER_NAME, 0, 0);
sceUsbActivate(0x1C9); |
is this correct?
now the program do not wait for the connection, but I still have no idea about the PC side :( |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Mon Mar 23, 2009 6:13 am Post subject: |
|
|
| Sigh... You do know you need to be running usbhostfs_pc on the PC side otherwise it has nothing to communicate with. |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Mon Mar 23, 2009 8:26 am Post subject: |
|
|
tnx again TyRaNiD, it seems that u r the only man here, tnx.
So, I did tun the usbhostfs_pc.exe and my PC program connected to it successfully, but it's not still able to receive anything from PSP.
I think that usbhostfs_pc.exe is not connected to PSP since I do not see or feel any difference when I run or not my PSP program!
is there any message or something if usbhostfs_pc.exe connects to PSP?
if yes, what is the problem u think?
is there any thing more I need to setup than the functions above?
tnx again. |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Mon Mar 23, 2009 8:43 am Post subject: |
|
|
I've read the usbhostfs_pc code and there is message for sure:
"Connected to device\n"
so what is wrong with my approach? :( |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Mon Mar 23, 2009 3:53 pm Post subject: |
|
|
| I guess try and geting psplink to work, that would at least rule out whether it is a general problem or your code. Tbh there are a few machines that for what ever reason just do not work with usbhostfs but it is rare. |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
Posted: Mon Mar 23, 2009 9:09 pm Post subject: |
|
|
Nice one TyRaNiD
OK, I tried PSPLink 3.0 and it was not working.
fooling around I've found out that it was an unknown problem with libusb. I removed the device and installed it again and everything works as pie.
running PSPLink I told myself why not use this great tool to continue development? trying to run the "sprite" sample from pspsh I get the following error:
"Failed to Load/Start module 'host0:/sprite.elf' Error: 0x80020148"
what's wrong?
I'm on phat PSP fw 5.0 M33-4 with LEDA installed. |
|
| Back to top |
|
 |
MBx
Joined: 22 Mar 2009 Posts: 35
|
|
| Back to top |
|
 |
|