IP over USB

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

Moderators: cheriff, TyRaNiD

Post Reply
nergal
Posts: 8
Joined: Wed Apr 02, 2008 10:17 pm

IP over USB

Post by nergal »

So, I got to thinking about getting my hands on a new project for my psp. Due to restricted wifi access at some places, and only access to wired ethernet. I come to think about getting TCP/IP over USB for the psp.

Is this idea totally madness or is it possible? Could be good to get some hints before I hit the wall while trying.

Regards
Shapyi
Posts: 95
Joined: Mon Apr 25, 2005 9:31 am

Post by Shapyi »

If you can get that coded it would be amazing since I don't really have access to WiFi either.

You would need to write prx that replaces the wifi modules in kernel memory. Your functions would emulate the wifi protocol and send information to a PC client that communicates back and forth. I'm sure it could be done.
folklord904
Posts: 12
Joined: Sat Apr 26, 2008 1:50 pm

Post by folklord904 »

hmm hardware aproach maybe if u get an adapter u can just do this http://www.psp-hacks.com/forums/viewtopic.php?id=134203 but if u want to just wire a ethernet cable to the usb and some how make psp use it idk.
nergal
Posts: 8
Joined: Wed Apr 02, 2008 10:17 pm

Post by nergal »

Good to hear, I guess the prx module could be loaded as a plugin with 3.90 at startup.

Using wifi through a PC is not an solution since wifi is prohibited at some places due to security reasons and that would ruin the fun of a new project ;)

Time to start gathering knowledge about IP over USB, I know there are some projects for Linux to check out.
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

A thing i didn't understand: there's a pc in your equation or not? I mean: i don't know much of USB internals, but as long as there's a ready made example it should be a piece of cake to mod it to carry IP data... only difficult thing is emulation layer...maybe it's easier to rewrite the whole prx and substitute it instead of hook tens of functions. If your plans are to make PSP cable-connectable without a pc, there are modules that performs serial-to-ethernet conversion on the fly (don't expect extreme speed in that case...)
nergal
Posts: 8
Joined: Wed Apr 02, 2008 10:17 pm

Post by nergal »

No, I'm not after USB to ethernet directly, only through a PC. But there should be no wifi involved. My first approach is to use wifi substitute (module) on the psp and some application that acts as a proxy/gateway on the computer.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

You could base it off USBHOSTFS, but instead of sending filesystem requests and data, send network packets.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

You could probably write a real dirty async provider to do it with usbhostfs without having to play with the USB side of things. You could do something like:

usbhostfs.prx -> USB -> usbhostfs_pc -> custom app -> TCP/IP connection.

Doing the connections would be more of a pain but it wouldn't be impossible For example you could devise a protocol specific to the system which implemented the connect/read/write etc. fairly easily.

However I guess what you are really wanting would be to allow you to use wifi capable software instead over ethernet good luck on that :P
SANiK
Posts: 29
Joined: Tue Jul 05, 2005 5:25 am

Post by SANiK »

Warning: This topic has been bumped for the sake of information

I tried to do something like this earlier.
The way I did it was:

The user sets their browser's proxy to 127.0.0.1:somePort

Then a PC app listens in on that port and sends signals to the PSP through the USB.

The PSP carrys out the commands and fetches the page.

I failed in that, for some reason, if the user hit "Stop" and went to another site, the new site would have parts of the old site prepended.

Might this be an error in how I handled the USB data packets? Maybe, but I didn't look into it much after that

Anyhows, you can find info about my failed attempt here with the sources:
http://sanik.imk.cx/PSPRoxy/index.htm

(There's like two different attempts in there)
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

The PSP's network module architecture has been copied from an ancient system which - by luck - was made to have several interfaces. You just have to attach your network interface through the sceNet commands, but first after having completely understood the custom structures used as parameters. (They should consist of a few options and callbacks, check how the wlan.prx registers to sceNet)
byzb3atz
Posts: 1
Joined: Thu Jul 10, 2008 9:55 am

Post by byzb3atz »

I had this idea too.. I wanted to ask someone if they could do it, and too bad I don't know c/c++ :(
if someone could get this done... even in a proxy form, I'd be really, really, really glad...
Jossie90
Posts: 1
Joined: Fri Jul 11, 2008 5:33 pm

Post by Jossie90 »

You could also use some USB-to-serial driver (probably not written yet for the psp) and do IP over serial.
That would cost nearly no extra work at the PC-side, and work on both windows and linux.

That is, assuming the PSP can handle multiple interfaces.

http://en.wikipedia.org/wiki/Serial_Lin ... t_Protocol
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

adrahil wrote:The PSP's network module architecture has been copied from an ancient system which - by luck - was made to have several interfaces. You just have to attach your network interface through the sceNet commands, but first after having completely understood the custom structures used as parameters. (They should consist of a few options and callbacks, check how the wlan.prx registers to sceNet)
Which means its completely possible to to provide a seamless network connection that all applications can use, over USB, Serial IO, etc. (After hundreds of hours of work and debugging).
Post Reply