[unsolved] usbhostfs broken

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

[unsolved] usbhostfs broken

Post by snowsquirrel »

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.
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

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: Select all

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)
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

increase your timeout with the "-t XXX" parameter.
try 1, 10, 100 etc.
I think I'm on 10.
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

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: Select all

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
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

Post by hardrive »

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.
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

I have been using it all day in windows. It appears to be rock solid in windows.
~S
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

Post by hardrive »

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.
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

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
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

hard drive,

Does this happen to you using the wifi?

~S
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

Post by hardrive »

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.
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

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
hardrive
Posts: 11
Joined: Fri Mar 17, 2006 11:13 am

Post by hardrive »

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.
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

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
snowsquirrel
Posts: 51
Joined: Sun Feb 24, 2008 3:36 am

Post by snowsquirrel »

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
Post Reply