QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

PSP-HTTPD v0.3

This is a discussion on PSP-HTTPD v0.3 within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Here's the third release of my basic PSP web server, powered by LuaPlayer 0.15. What this does is basically let ...

Reply
 
LinkBack Thread Tools
Old 12-26-2005, 01:12 PM   #1

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default PSP-HTTPD v0.3

Here's the third release of my basic PSP web server, powered by LuaPlayer 0.15.

What this does is basically let you download files from your PSP using your wireless network connection. You can browse through the memory stick wirelessly, using only the web browser on your computer. HTML pages will even be sent so you could run a website off your PSP.

I have to note, though, that this is still a beta. No more than one connection is able to transfer data at one time, so this will work fine so you can transfer stuff within your own network...it won't really do well hosting a site yet.

Also, the success of file transfers depends entirely on the quality of your Wi-Fi connection. You may have to see how high yours can get, currently it runs stably on my end at around 20 KB/s with chunksize 1024. I know it's slow, but it will do for now. Please read the Readme file to see the meanings of the dots and bars displayed during a file transfer to see your performance.

Otherwise, have fun, and don't hesitate to give comments and suggestions.

Changes in v0.3:
* New template-based interface for directory listings
* Fixed error on exit, server now shuts down cleanly
* Config file revamped, now with commented options and two new settings: server port and send retries
* If the config file does not exist or options are missing, default variables will be loaded
* File sizes now sent in HTTP headers
* Added CSS mime type
* Changed default number of error-checking repeats from 100 to 80
* File send message in console now shows more detailed info about the file

Screenshot: (browsing a directory)
Attached Files
File Type: zip psp-httpd_v0.3.zip‎ (11.4 KB, 71 views)
__________________
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 07:24 PM   #2
 
fchaos's Avatar
 
Join Date: Sep 2005
Location: Texas
Posts: 146
Trader Feedback: 0
Default

Awesome! I really like the template. Keep up the good work! =)
fchaos is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 07:48 PM   #3
 
Join Date: Oct 2005
Location: Harrisburg PA
Posts: 2,101
Trader Feedback: 0
Default

cant wait for it to host a website outside of the network )
keep up the good work, this is one of the only psp projects im interested in now-a-days
capnfuffy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 07:59 PM   #4

Your Fate is Grim...
 
Grimfate126's Avatar
 
Join Date: Oct 2005
Posts: 2,269
Trader Feedback: 0
Default

question: can you copy file from your pc to your psp
__________________
--------------------------------------------------------------------------------------
Grimfate126 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 08:36 PM   #5

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default

Quote:
Originally Posted by Grimfate126
question: can you copy file from your pc to your psp
Not with this app. Not yet, at least.

Thanks for the comments, everybody.
__________________
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 09:28 PM   #6
 
Join Date: Nov 2005
Posts: 36
Trader Feedback: 0
Default

i don't reall get this what does this really do? what is it for? is it a psp app. or a pc program?
fallen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-26-2005, 11:33 PM   #7
 
KiLL CraZy's Avatar
 
Join Date: Jun 2005
Posts: 157
Trader Feedback: 0
Default

i cant get this to work, I'm stuck, I load it up, the wifi light stays green, then it says to put my PSP IP address into my web browser from my pc, what is my psp's ip address?
KiLL CraZy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-27-2005, 02:42 AM   #8
 
Electrifying's Avatar
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Question

will this run on a 2.0 psp? :icon_smil
Electrifying is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-27-2005, 04:16 AM   #9
 
Join Date: Dec 2005
Posts: 19
Trader Feedback: 0
Default

basically this program lets you browse teh folders within the psp using wireless rather than having to plug the USB from the PSP to the PC.
Wingz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-27-2005, 07:12 AM   #10

Your Fate is Grim...
 
Grimfate126's Avatar
 
Join Date: Oct 2005
Posts: 2,269
Trader Feedback: 0
Default

cool. you and teddy (creator of the tedzero browser) could work together to create one AWSOME app. this app is COOL! i just tried it. the interface owns!! good job!!


P.S. woah, spaz attack
__________________
--------------------------------------------------------------------------------------
Grimfate126 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-27-2005, 07:42 AM   #11
 
KiLL CraZy's Avatar
 
Join Date: Jun 2005
Posts: 157
Trader Feedback: 0
Default

can1 some1 plz help me with this? I dunno wut to do after I get the app launched on my PSP, what is it that I type into my pc web broswer to connect with my psp?
KiLL CraZy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-27-2005, 08:24 AM   #12
 
canalaiz's Avatar
 
Join Date: Jun 2005
Posts: 71
Trader Feedback: 0
Default

Excellent work. This is a very interesting project indeed, i can't wait to see further improvements
canalaiz is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-27-2005, 09:37 AM   #13
ThatSonyGuy/THATPSPGUY
 
soopergooman's Avatar
 
My Mood: Asleep
Join Date: Jun 2005
Real First Name: Sooper
Location: All tha way East!!!
Just Played: Battlefield1943 ps3
Posts: 672
Trader Feedback: 0
Default

i cant seem to get it to werk the right way. error: index.lua:88: attempt to call field 'creatServerSocket' (a nil value)
Error: no script file found.
__________________
There are only two infinite's, The Universe and Human Stupidity.- Albert Einstein
Sony Messed up and had to give me a Brand New 60gig PS3, not a refurb
soopergooman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-28-2005, 02:34 AM   #14
 
Xufar's Avatar
 
Join Date: Dec 2005
Posts: 22
Trader Feedback: 0
Unhappy

I got me a problem too. When I load up the program it doesn't display my connections (Available WLAN connections: ). Does anyone know how to get this thing working?

Thanks in advance,
Xufar

EDIT: Problem fixed! I just resetted my psp to the default settings! Maybe this will help you to, soopergooman

Last edited by Xufar; 12-28-2005 at 05:35 AM..
Xufar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-28-2005, 04:52 AM   #15
 
Xufar's Avatar
 
Join Date: Dec 2005
Posts: 22
Trader Feedback: 0
Exclamation

I'm trying out a few different chunk sizes:

1024 - 20 KB/s Works fine

2048 - 40 KB/s Works fine too

4096 - 80 KB/s Awesome, still works fine. No corrupt files yet, you just have to click DOWNLOAD or OPEN fast on your computer (within 5 secs? I just found out this can be helped by setting the send repeats higher )

8192 - 120 KB/s I guess I just hit top speed, my memstick or WLAN doesn't go any faster (The WLAN function of the PSP is probably limited to 1 Mbit), but no problem at all with the downloads!!! (I just checked it with a file bigger than 600 MB, works just fine)

16384 - 240 KB/s I've made my conclusion too soon, I just got 240 KB/s, still works perfect.

32768 - 260 KB/s Getting problems with this chunk size, the app sees every chunk as corrupted although they come perfectly in my computer... I can´t find the problem for this in the script, but this is the highest speed anyway, so I'd keep the chunksize at 16384. Maybe Elxx can find a solution for this, because it is plausible that the speed get's higher when the app sees it as a normal/good chunk.


THE SPEED MAY VARY

Last edited by Xufar; 12-28-2005 at 10:41 AM..
Xufar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-28-2005, 10:46 AM   #16

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default

Mmm, very interesting. Thank you for the testing, I'll bump up the speeds even further on the next release. The reason I didn't before is my development location is rather far from the WLAN base station, so the connection gets dropped quite often, not letting me send too much. You've proved that this speed can go much much higher with a good quality signal, and I'll take that into consideration, and will look into the 32kb+ chunk sizes. Let's see what kind of speeds we can pump out.

EDIT: With the higher chunk sizes, it does indeed transfer faster, but I played a music file and it was reeeealllyyyy skippy. :icon_sad:

I'm thinking this is because of the error detection, since, if a chunk fails to send, it resends the whole chunk again, not taking into consideration the fact that the receiver will probably process the partial chunk as well, causing some insane skipping in music tracks and probably a lot of corruption in all files. This can be improved, I'm looking into it.
__________________

Last edited by Elxx; 12-28-2005 at 12:16 PM..
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-29-2005, 04:28 PM   #17
 
Join Date: Jun 2005
Posts: 375
Trader Feedback: 0
Default

anyone got this to work with the 2.0 eboot launcher. i have got it to boot but no succes getting to the server through my computer. but its probly just somthing i did
soadnation is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-01-2006, 03:41 PM   #18
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

Quote:
anyone got this to work with the 2.0 eboot launcher. i have got it to boot but no succes getting to the server through my computer. but its probly just somthing i did
When LUAplayer is run under 2.0, the wifi functions won't work.

The application is hosting my website well among my network PCs.
I would like to find out how to host my own web site to the public,
assuming that there will never be any more than one connection to the site.

Hint: the header file can be changed to give the directory page a different
appearance... start with editing the blue colour bars: http://html-color-codes.com/

Quote:
can1 some1 plz help me with this? I dunno wut to do after I get the app launched on my PSP, what is it that I type into my pc web broswer to connect with my psp?
Your PSP's IP address is found in one of the network settings feilds.
say it's local IP is: 192.168.0.102 (like mine),
then you open Firefox or Internet explorer, and connect to the PSP by typing this
into the address bar: http://192.168.0.102/
Art.
__________________
http://www.freewebs.com/defxev/
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-01-2006, 06:20 PM   #19
 
Join Date: Jun 2005
Posts: 375
Trader Feedback: 0
Default

ok it does work with eboot loader v 0.9. it must just be my computer because i can only get to it using my sisters laptop
soadnation is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2006, 12:11 AM   #20
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

I found a simple method of limiting access to a single folder with web page files in it
so that other network users can't browse your whole memory stick.
edit line 233 as follows:

-- File must be on the Memory Stick.
file = "ms0:/Website" .. file

and create a folder called Website in your root directory with the index.htm file in it,
and you're away!

I noticed a problem from an earlier version where the wlan stops working if left for
a few minutes without activity. The wlan light always goes out when something is
attempting a connection to it, then the application needs to be restarted.
Art.
__________________
http://www.freewebs.com/defxev/
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2006, 12:35 AM   #21

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default

Quote:
Originally Posted by Art
I found a simple method of limiting access to a single folder with web page files in it
so that other network users can't browse your whole memory stick.
edit line 233 as follows:

-- File must be on the Memory Stick.
file = "ms0:/Website" .. file

and create a folder called Website in your root directory with the index.htm file in it,
and you're away!
Cheers, I will add that as a configurable setting.

As for the wlan problem, that's something I haven't really figured out a way to fix...it happens for me too. I'll look into it, maybe there's a way to force the connection to stay alive.
__________________
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2006, 01:14 AM   #22

Developer
 
Join Date: Nov 2005
Posts: 445
Trader Feedback: 0
Default

In peldet i've found that calling sceKernelPowerTick() causes the screen to stay on and the wlan to not power off.
I'm not sure if there is something similar in Lua, but it will give you something to look for.
danzel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-02-2006, 02:12 AM   #23
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

I was going to set a timer, and restart the program after a constant period of time
for an attempt at a dodgy fix since pressing start seems to create a new good connection.

Maybe the problem is outside of the lua program, and the above solution could be
implemented in luaplayer.
__________________
http://www.freewebs.com/defxev/
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-03-2006, 08:45 AM   #24
 
Xufar's Avatar
 
Join Date: Dec 2005
Posts: 22
Trader Feedback: 0
Default

Dunno about that problem, but the other problem soopergooper had can be fixed by turning off the WLAN power saver function.
Xufar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-03-2006, 04:48 PM   #25
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

Elxx,
I have managed to solve the problem (quick and dirty fix) with the wlan powering off.

If you provide your email I will show it to you. I must warn you that your code has
been modified to become UGLY.
I created a timer called watchdog that will completely close the connection with
wlan.term after a period of time (using 60 secs at the moment), and then start it up
again from scratch (wlan.init).

As ugly as it is, it allows my site to be hosted permanently.
Mind you, the PSP unit gets warmer than I'd like it to after running for just 12 hours.

Since I've made the start, I will add a counter to report the server uptime to screen, and/or the web page.
Art.

Last edited by Art; 01-03-2006 at 04:53 PM..
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-03-2006, 08:38 PM   #26

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default

Sent you a PM with my e-mail...I'll see if I can clean up your code and get it nice and functional.
__________________
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-03-2006, 11:55 PM   #27
Art

Bush Programmer
 
Art's Avatar
 
Join Date: Nov 2005
Posts: 3,557
Trader Feedback: 0
Default

I Probably spoke too soon, the server will refuse connections a lot of the time.
In order to load a page, you need to hit the server straght after the wlan's power is toggled.
Quote:
In peldet i've found that calling sceKernelPowerTick() causes the screen to stay on and the wlan to not power off.
I'm not sure if there is something similar in Lua, but it will give you something to look for.
I tried peldet, this was the first I'd heard of it. Watching ASCII Star Wars for quite
some time it does hold the connection open, but I don't think it is a server, and may
be using different Sony libraries?
__________________
http://www.freewebs.com/defxev/
Art is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-04-2006, 03:12 PM   #28

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default

Peldet is all fancified C code, so that's out far away from what I can do with Lua. I actually never experienced the bug with the WLAN completely dying, but it does kill itself somehow, after big requests the next request will just make the WLAN light blink, and nothing else happens.

As I said, I'm looking into it though.
__________________
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-07-2006, 10:32 PM   #29

Sexy Developer
 
Join Date: Oct 2005
Posts: 62
Trader Feedback: 0
Default

Well, I don't know if this is because of LuaPlayer 0.16 or just my new connection code, but I've been running the server for over an hour and it's been responding to requests just fine, even though the PSP screen went to sleep quite a while ago. This is looking pretty good now, expect 0.4 soon.
__________________
Elxx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
psphttpd , v03

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 12:11 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us