forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[unsolved] usbhostfs broken

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Thu Apr 03, 2008 10:51 am    Post subject: [unsolved] usbhostfs broken Reply with quote

I run usbhostfs_pc as root. Then in a pspsh, if I issue the 'reset' command, psplink resets itself.

usbhostfs appears to continue working, i.e., I can do a 'drives', or pwd, etc. While pspsh appears to hang: I can do a help, but get no prompt, and can't do 'ls' or 'modlist', etc.

If I CTRL-D out of pspsh, and pspsh back in, I still get no prompt.

If I restart usbhostfs, then I can pspsh in and get a prompt and all is normal. I do not have to restart psplink on psp.

This problem does not happen using the native toolchain in windows, using same psp, and same psplink.ini.

Does anyone know how to fix this? It is super annoying.

~S


Last edited by snowsquirrel on Fri Apr 18, 2008 10:41 am; edited 1 time in total
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Thu Apr 03, 2008 11:25 am    Post subject: Reply with quote

Here is the output from running usbhostfs_pc -vv. I logged in with pspsh, and immediately ran 'reset' command. pspsh hangs. I then try to connect again. You can see it accepts my connection again, but like I mention about I get no prompt, until I reset usbhostfs_pc.

output

Code:

USBHostFS (c) TyRaNiD 2k6
Built Apr  1 2008 20:25:20 - $Revision: 2368 $
Root directory: /home/sheam/code/depot/psp_project1
Connected to device
Bulk Write dev 0x67e280, ep 0x2, bytes 0x7ffff394f0ac, size 4, timeout 1000
Bulk Write returned 4
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Bulk Read returned 12
Magic: 782F0812
Command Num: 8FFC0000
Extra Len: 0
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Bulk Read returned 18
Async Magic: 782F0813
Async Channel: 00000000
Async Extra Len: 10
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Bulk Read returned 21
Async Magic: 782F0813
Async Channel: 00000000
Async Extra Len: 13
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Accepting async connection (0) from 127.0.0.1
Accepting async connection (2) from 127.0.0.1
Accepting async connection (3) from 127.0.0.1
Bulk Write dev 0x67e280, ep 0x3, bytes 0x407ffe90, size 14, timeout 10000
Bulk Read returned 18
Async Magic: 782F0813
Async Channel: 00000000
Async Extra Len: 10
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Bulk Write returned 14
Bulk Read returned 21
Async Magic: 782F0813
Async Channel: 00000000
Async Extra Len: 13
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Bulk Write dev 0x67e280, ep 0x3, bytes 0x407ffe90, size 15, timeout 10000
Bulk Read returned 29
Async Magic: 782F0813
Async Channel: 00000000
Async Extra Len: 21
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7ffff394eea0, size 512, timeout 0
Bulk Write returned 15
Closing async connection (0)
Closing async connection (2)
Closing async connection (3)
Accepting async connection (0) from 127.0.0.1
Accepting async connection (2) from 127.0.0.1
Accepting async connection (3) from 127.0.0.1
Bulk Write dev 0x67e280, ep 0x3, bytes 0x407ffe90, size 14, timeout 10000
Bulk Write returned -19
Bulk Write dev 0x67e280, ep 0x3, bytes 0x407ffe90, size 12, timeout 10000
Bulk Write returned -19
Bulk Write dev 0x67e280, ep 0x3, bytes 0x407ffe90, size 15, timeout 10000
Bulk Write returned -19
Closing async connection (0)
Closing async connection (2)
Closing async connection (3)
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Thu Apr 03, 2008 11:34 am    Post subject: Reply with quote

increase your timeout with the "-t XXX" parameter.
try 1, 10, 100 etc.
I think I'm on 10.
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Thu Apr 03, 2008 11:50 am    Post subject: Reply with quote

I tried running using -vv -t 100.

It seems poll for command continually, until I issue one with pspsh, then it does it, writes back the output, and starts polling again.

But when I issue a reset, it loosk like it never does another write, and does not start polling again.

Here is the output, you can see all the bulk reads returning -110. I am assuing this means it is getting nothing. Then the 'Bulk Write returned 15' occurs when I do the reset. It then does a couple more -110s, and eventually hangs on the bulk read returned -19.

Any subsequent commands I issue from pspsh, show up as that bulk read returned -19 in the usbhostfs_pc output.

edit: just downloaded source code for libusb, and grepped through for 19. turns up nothing interesting.

Code:

Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Write dev 0x67e280, ep 0x3, bytes 0x407ffe90, size 15, timeout 10000
Bulk Write returned 15
Bulk Read returned 29
Async Magic: 782F0813
Async Channel: 00000000
Async Extra Len: 21
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -110
Bulk Read dev 0x67e280, ep 0x81, bytes 0x7fff62023560, size 512, timeout 100
Bulk Read returned -19


I am trying to find out what the -19 return code it. The libusb docs just say <0 is an error.

~S
Back to top
View user's profile Send private message
hardrive



Joined: 17 Mar 2006
Posts: 11

PostPosted: Fri Apr 04, 2008 4:07 am    Post subject: Reply with quote

This same thing has been happening to me too in Linux.

I was having the same problem described with PSPLink, so I tried it in 1.50 using Time Machine, however, I got the same results. I then tried iR Shell with the usbhost plugin, but the connection is only reestablished when the game exits about 1 time out of 20.
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Fri Apr 04, 2008 4:44 am    Post subject: Reply with quote

I have been using it all day in windows. It appears to be rock solid in windows.
~S
Back to top
View user's profile Send private message
hardrive



Joined: 17 Mar 2006
Posts: 11

PostPosted: Fri Apr 04, 2008 1:31 pm    Post subject: Reply with quote

snowsquirrel wrote:
I have been using it all day in windows. It appears to be rock solid in windows.
~S

I refuse to boot into Windows :). Not only do I prefer Linux, I have the toolchain with SDL* installed in it.

I'll just stick to restarting the apps each time, no worries.
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Fri Apr 04, 2008 10:44 pm    Post subject: Reply with quote

My job requires I have vista. I have linux at home. It is slow at work right now, so I was fooling around with this stuff. A little disappointing that it works fine in windows, but not in linux, especially considering that the toolset is native to linux.

It is really a matter of productivity. Having to restart usbfs, pspsh, and gdb, every time, really slows me down. I didn't realize how much, until I used them on windows.

~S
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Mon Apr 07, 2008 8:06 am    Post subject: Reply with quote

hard drive,

Does this happen to you using the wifi?

~S
Back to top
View user's profile Send private message
hardrive



Joined: 17 Mar 2006
Posts: 11

PostPosted: Mon Apr 07, 2008 11:10 am    Post subject: Reply with quote

snowsquirrel wrote:
hard drive,

Does this happen to you using the wifi?

~S

To be honest, I haven't tried the wifi, as it seems too inconvenient. I'll fool around with it and see what happens.

EDIT: It's really slow to load images and things, it's honestly faster to just restart the USB connection every time. I'm writing my apps in SDL, so I do most of my stuff on the PC anyways, so no worries.
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Tue Apr 08, 2008 10:27 am    Post subject: Reply with quote

FYI:
I noticed that the pc precompiled version I was using was rev 2300, and the latest was 2368. So I reverted to 2300, and it seemed to make no difference.

I am running 64bit. I wonder if there is an issue with the 64bit version of libusb?

~S
Back to top
View user's profile Send private message
hardrive



Joined: 17 Mar 2006
Posts: 11

PostPosted: Thu Apr 10, 2008 7:36 am    Post subject: Reply with quote

snowsquirrel wrote:
FYI:
I noticed that the pc precompiled version I was using was rev 2300, and the latest was 2368. So I reverted to 2300, and it seemed to make no difference.

I am running 64bit. I wonder if there is an issue with the 64bit version of libusb?

~S

That's interesting, because I'm running 64 bit Fedora. As you suggest, it is probably something with 64 bit, I'll do a little googling and see what I turn up.
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Thu Apr 10, 2008 10:23 pm    Post subject: Reply with quote

Yeah, for some reason, now my game doesn't even seem to launch, yet it works fine in windows.

I was wondering if there is a way to force a 32bit build of usbhostfs. But haven't had much time for this, the past week.

~S
Back to top
View user's profile Send private message
snowsquirrel



Joined: 24 Feb 2008
Posts: 51

PostPosted: Fri Apr 18, 2008 10:45 am    Post subject: Reply with quote

Can someone send me 32bit binaries of pspsh, and usbhostfs_pc (statically linked would be best, but not mandatory). Then I could test them out on my MEPIS 64, and in 32bit Puppy.

I can't seem to find a download link for any binaries, except for windows versions. PM me, and I'll shoot you my email.

THanks,
~S
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group