about usbhostfs_pc

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

Moderators: cheriff, TyRaNiD

Locked
wazowski
Posts: 10
Joined: Fri Apr 07, 2006 1:27 am

about usbhostfs_pc

Post by wazowski »

Hello,
nowadays I´m working with usbhostfs from psplink. It´s a very good aplication (congratulations Tyranid, you´re the best).

I have made changes to a file viewer that I did myself, and I´m able to navigate from the psp in the pc files, in fact I can play music from pc in the psp. It´s very unuseful but it´s a beginning.

So I can see pc files in psp using "host0:" as path, and here is my question, I wonder if I can change this path for any other, as example "mypc". I have see that usbhostfs_pc enumerates several drives from 0 to 7 or 8, but I don´t know where "host" is set, even if it needs to be set in any other place.

Thank you very much, and sorry for my english I´ve tried to express my best.
Ostehovel
Posts: 11
Joined: Wed Apr 05, 2006 7:01 pm

Post by Ostehovel »

-- Deletete --
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Well I am not sure why you would want to change the name of the drive but it you really wanted to there are two ways you can do it, you can either hack the host_driver.c file in usbhostfs to call it something different (search for the string "host", it should be in a structure and rename it). You can also use the remap command in the psplink shell e.g. type in say "remap host0: mypc:" and you can then access your PC under that device name, at least until you reset psplink.
wazowski
Posts: 10
Joined: Fri Apr 07, 2006 1:27 am

Post by wazowski »

Thank you Tyranid for your fast answer.
I want to change the name just becuse I´m from spain and I want to make all the GUI in spanish, nothing else.

Just another question, watching how psplink works with the usb, I was wondering if its posible read the information sended by a usb OTG device. I mean, I have a OTG SDK and I can connect mass storage devices, is it posible to read the information that is sending this device and show it in screen or write it in a file?

I hope you can help me a little and indicate me what functions I can use.

Thank you again Tyranid.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Well I am not 100% sure (or convinced) that the PSP has OTG functionality, at the least the stock Sony USB bus driver does not seem to have any obvious way of implementing an OTG host, but that isn't to say the hardware cannot support it in some way.

Basically as it stands there is not alot you can do with the USB other than make it out to be a device, perhaps investigating the Talkman USB mic and drivers might yeild some light on the subject, perhaps when it is released in Europe I might consider picking one up.
laichung
Posts: 123
Joined: Fri May 06, 2005 2:02 pm

Post by laichung »

USB OTG need different connection between two device in hardware way, so you cant just test it in software way.

And USB is just a serial connection like COM, it can communicate with other device in "very LOW LEVEL" way. Of course that need in deep understanding of the signal, but I think it is possible that Talkman mic is not a usb device (What i mean is , they use USB to connect the mic , but not using standard USB communication protocol for control the mic).

You may/can test it by plug the MIC into you PC USB port , if windows doesn't popup and ask for the driver of the mic , MIC is highly possible not a USB device.

TyRaNiD wrote:Well I am not 100% sure (or convinced) that the PSP has OTG functionality, at the least the stock Sony USB bus driver does not seem to have any obvious way of implementing an OTG host, but that isn't to say the hardware cannot support it in some way.

Basically as it stands there is not alot you can do with the USB other than make it out to be a device, perhaps investigating the Talkman USB mic and drivers might yeild some light on the subject, perhaps when it is released in Europe I might consider picking one up.
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

The USB OTG devices I've seen appear to have a slightly different connector... I highly doubt the PSP is USB OTG, and nothing I've seen even hints at it being such.
Shoot Pixels Not People!
Makeshift Development
laichung
Posts: 123
Joined: Fri May 06, 2005 2:02 pm

Post by laichung »

The connector of OTG is a common USB connect , but the hardware design is different (for example , the resistor connect to the data line , the timing of signal, etc). If you want to know more about it , you can download the specification here:

http://www.usb.org/developers/onthego/

As I said before, programmer can communicate/control the device in low level , even a GPS adaptor (there are many com port GPS adaptor around the market), but OTG is a different thing.

Also even PSP have OTG function doesnt mean you can plug in any USB device (such as webcam) and use it. We need a driver of it (and PSP version driver). So actually we can give it up to find out the answer of the question, "Does PSP have USB OTG function?".
Drakonite wrote:The USB OTG devices I've seen appear to have a slightly different connector... I highly doubt the PSP is USB OTG, and nothing I've seen even hints at it being such.
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

Ah, thanks... one of the PDFs on that page showed the confirmation I had looked for in the past...

USB OTG devices have a Mini-AB connector, whereas the PSP has a Mini-B connector. The connectors are quite similar, in fact as part of the spec Mini-AB connectors are designed to accept both Mini-A and Mini-B cables.

The Mini-A and Mini-B cables are of course also quite similar, with the Mini-A being a slightly different shape to act as a key, preventing it from being used in a Mini-B connector.

USB OTG cables are required to have a Mini-A connector on the host end of the cable.

If you'd like to verify this information, read the introduction and mechanical sections of "OTG Suppliment." Reading the cable sections of the "OTG Compliance Checklist" also shows the requirement.

I've hunted down a couple diagrams of the connectors if you'd like to see the difference: (ignore the standard sized connector diagrams, I couldn't find a linkable diagram of just the mini connectors)
MiniA MiniB


...can we drop the USB OTG talk now?
Shoot Pixels Not People!
Makeshift Development
laichung
Posts: 123
Joined: Fri May 06, 2005 2:02 pm

Post by laichung »

haha~~ 100% people want OTG because they want to plug their 2G flash drive into to PSP for storage and 99% people mis-leaded by sony that PSP have such function becaue of the GPS/TalkMan mic.

Anyway , if you ask me that can we develop a USB storage for PSP? I say yes but not only in software way. We also need a very good understanding in USB specification , and do many hardware design. It should be more diffcult than converting CF/SD card into MS card by hardware.
wazowski
Posts: 10
Joined: Fri Apr 07, 2006 1:27 am

Post by wazowski »

First Ill try to keep in topic.

Now Im trying to leave psplink just with usb functions. I dont need wifi and other things.

As I say before, I can load mp3 songs and, I think, images from the pc to the psp. I can play them and show them. But, and here is my question, How does usb file system works? I mean, I think I can load this files because they are "small" sized and I can load them at once, but what would happend if I try to load a video file?

Now, a/a laichung:
I think people don´t just want to plug things into psp usb. Thats imposible!! But as you say I think we can develop a USB storage driver, but you will need one for each device you wanna plug into psp usb.

I dont think you need to develop any hardware. In fact, you can see how psplink works. Psplink is able to write down on the usb. Thats what we need to develop, and we need to be able to speak and drive other devices. Why do you wnat to develop a new hardware when you have it done??

Thank you guys for your answers.
laichung
Posts: 123
Joined: Fri May 06, 2005 2:02 pm

Post by laichung »

Dear wazowski :

Pls read the user manuel of the psplink , the USB fucntion you said that can access file from PC on PSP is called "USB HOST FILING SYSTEM". "USB HOST" is the key word. If you dont know what is the meaning of "USB HOST", USB OTG is too tough for you. (or I can say , USB is too tough for you too.)

USB is not a file system , USB is a connection type like COM/Printer port, and it is different from WIFI. I think your question should be , "How can we mount a PC hard drive by using USB connection?" I dont know the answer, you can ask TyRaNiD since he is one of the developer of PSPLINK.

But if you mean , can we access the USB flash drive like PSPLINK on PC , the answer is no.

Finally , why you think plug things into psp usb is impossible? If yes how does Talkman mic work?
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Well for one thing you could use the USB HostFS to read any file you want, including video files. About the only restriction is you cannot use it for blocking reads only for files due to its design.

As I have previously stated there is no reason to indicate that the PSP has any sort of OTG functionality at all, at the very least there is no code in the USB driver inside the kernel to use any such functionality. But on that vein as has also been mentioned the USB device setup in the PSP does not have to be dedicated to just USB style protocols, Sony could have engineered a method of communicating using the physical level which was not the same as USB to communicate with other devices. Or as a simple device capable of host mode would be pretty cheap it could also be that talkman is a host device. It should be noted that even though there is supposedly a PSP to PSP communications library (which sets up USB to act as a general comms system) you cannot plug PSP to PSP, you aparently need a PS2 to act as an intermediate repeater for what ever stupid reason, if the PSP supported OTG which can you not just plug PSP to PSP.
wazowski
Posts: 10
Joined: Fri Apr 07, 2006 1:27 am

Post by wazowski »

laichung wrote:Dear wazowski :

Pls read the user manuel of the psplink , the USB fucntion you said that can access file from PC on PSP is called "USB HOST FILING SYSTEM". "USB HOST" is the key word. If you dont know what is the meaning of "USB HOST", USB OTG is too tough for you. (or I can say , USB is too tough for you too.)

USB is not a file system , USB is a connection type like COM/Printer port, and it is different from WIFI. I think your question should be , "How can we mount a PC hard drive by using USB connection?" I dont know the answer, you can ask TyRaNiD since he is one of the developer of PSPLINK.

But if you mean , can we access the USB flash drive like PSPLINK on PC , the answer is no.

Finally , why you think plug things into psp usb is impossible? If yes how does Talkman mic work?
OK, Im not going to post more about this topic. Thank you very much tyranid.

to laichung:

"USB Host" can be the key word, but... read my question and you may can see I was asking about "FILE SYSTEM"... good job man.

Do you know me to say what I know or what I don´t know?? I don´t think so. As I say before Im not going to post more about this topic, I think I can´t explain myself good enough. The problem is my english level. Sorry for that.

You said that "USB is not a file system", wooooowww, great job Einstein xDD, you are a fu***ing genious.

In the manual explains how does FileSystem works?, I read it. Can you tell me where is it?

Watching Tyranid's post:

"Sony could have engineered a method of communicating using the physical level which was not the same as USB to communicate with other devices"

That´s the correct answer.

Just say thank you tyranid, and I hope laichung can understand my problem is my explaining and not my "USB skills" WTF??

See you.
mattlocked
Posts: 1
Joined: Thu Jun 29, 2006 9:19 pm

PSP to OTG HDD, using Ahman's IRSHELL????

Post by mattlocked »

Hi everybody...

I think the whole OTG thing has been misunderstood, the point is not to be able to turn your psp into a OTG usb mass-storage device...which in my humble opinion is totally useless. But... if you have a self powered OTG hard-drive, you coud browse the folders in this drive from your psp. Some OTG hard drives can be used like that because they have a display and a firmware that allows file manipulation, so you can browse the files in :ms0 and copy files from the HDD to ms0 or vice versa, which is useful enough for me.... Most OTG HDD available, though they're still OTG and act as USB host devices, lack a decent firmware and display to manipulate files from or to your psp....

So... the point comes in being able to use IRSHELL ability to browse and even load files located in your PC through an USB connection using USBHOSTFS, to do just the same with a self-powerd OTG HDD, wich can hold as much as 100GB of data. This way you could just attach your psp to the OTG hard drive, using two ordinary USB to mini-usb cables linked using a male2female usb adaptor....

Does this make sense?.... I have ordered a male2female adaptor to chech wether this works or not, anyway It would be great to implement this, because having a cheap OTD HDD you could carry anyway with your psp makes a lot more sense than buying a lot of expensive Duos....

I'll post the results of my tests.

Keep up the good work!!!.
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

you would still require to build a usbhostfs driver for
the usb hdd /mp3player whatever ...and that driver
must reside or launched inside from the player/hdd

some could be done (below 4g ipod) this others i do not know
10011011 00101010 11010111 10001001 10111010
laichung
Posts: 123
Joined: Fri May 06, 2005 2:02 pm

Post by laichung »

Most important thing is , the device has a HOST controller (I dont know OTG is enough or not , since OTG mean a device can act like HOST , but does it have the whole functions like a REAL USB HOST is a big question)

Does any Ipod have OTG/HOST controller? if yes , someone can try to port the usbhostfs driver to Ipod Linux ~~~

dot_blank wrote:you would still require to build a usbhostfs driver for
the usb hdd /mp3player whatever ...and that driver
must reside or launched inside from the player/hdd

some could be done (below 4g ipod) this others i do not know
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

no ipod is not OTG you need a regular ol
mp3 player with a hdd that comes with a usb
male connector like usb should come with ipod
then you can create your middle man connector
hub and have ipod one way then pspthe other way
psp usb cable that is (tip: create your own much
smaller in length cable ;)

then your created usbhost driver can reside on ipod
and psp will detect a ipod hdd as being ms size
i guess

and remember ....enough OTG talk ...the simple
fact is that OTA protocal is completely different
and different port connections ...so let OTG die already
10011011 00101010 11010111 10001001 10111010
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

There is no OTG, and this thread is getting very stupid.

Locked.
Shoot Pixels Not People!
Makeshift Development
Locked