ftp server

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

Moderators: cheriff, TyRaNiD

pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

ftp server

Post by pspkrazy »

I've done a little ftp server for the psp to upload files without any cable.

You can find it here (with sources): http://www.amoks.com/?rep=extra

Hope it can be usefull.
Guyfawkes
Posts: 9
Joined: Tue May 10, 2005 10:08 pm

Post by Guyfawkes »

used flashfxp to connect to the ftp, no problems at all. nice release!

I took a quick photo of the program, it only shows the ftp URL if you are unable to try the program http://emuholic.emuboards.com/modules.p ... 866&tbid=6
Emuholic - PSP, DS, GBA and GP32 news
wyrmwood
Posts: 1
Joined: Tue Jul 05, 2005 10:21 am

Post by wyrmwood »

It stays at "looking at DHCP server" for me. I've left it for about 20 minutes, the wireless indicator is still blinking though. How long does it take?

Great release, though! I've been looking for something like this.
heinrich
Posts: 1
Joined: Sun Mar 27, 2005 4:14 am

Post by heinrich »

Great job on this pspkrazy.

@wyrmwood, the readme states: "IP adresses must be static."
RATiX
Posts: 48
Joined: Sat Apr 30, 2005 5:02 pm

Post by RATiX »

wyrmwood, set the PSP's IP address manually.
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

Hi, thks for your work .

Is it normal that i dont see file's weight and that i can download any file ?
Pacote
Posts: 3
Joined: Tue Jul 05, 2005 12:46 pm

Post by Pacote »

Well on the psp it works fine... i get the CONNECTED screen with the url and all...

But when i try to use the IP with Flashfxp (user and login and port 21) i got connection timed out

There is something i need to config on the router first?

Using a WRT54G
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

DHCP

Post by pspkrazy »

It must not say "DHCP connection".

You have to configure your network with static IPs.
(Somewhere in the connection configuration of the PSP it says "advanced".)

If it is stalled, reboot your PSP (long pression on power button).


Pacote, i don't know. I got a friend who owns a WRT54G. I will try (this evening).

Maybe it is a network problem (misconfiguration of IP's, firewall or NAT).

Maybe the WRT54G is sending commands to the PSP ftp and some are not understood.

You can try to use ethereal, recording the connection.
Send me the ethereal log if you want me to help.
Pacote
Posts: 3
Joined: Tue Jul 05, 2005 12:46 pm

Re: DHCP

Post by Pacote »

pspkrazy wrote:It must not say "DHCP connection".

You have to configure your network with static IPs.
(Somewhere in the connection configuration of the PSP it says "advanced".)

If it is stalled, reboot your PSP (long pression on power button).


Pacote, i don't know. I got a friend who owns a WRT54G. I will try (this evening).

Maybe it is a network problem (misconfiguration of IP's, firewall or NAT).

Maybe the WRT54G is sending commands to the PSP ftp and some are not understood.

You can try to use ethereal, recording the connection.
Send me the ethereal log if you want me to help.
if you explain to me how to use ethereal i will be more then glad to record it...

Its strange that i got connected one time with cuteftp but then when i tried to enter a folder it got disconnected and then never again...

With the psp configuration i can download the update and the program works fine too... the connected screen with the ftp://psp.... adress and all...

but my computer just doesnt find the adress...
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

cuteftp ?

Post by pspkrazy »

It seems to be a problem most related to cuteftp.

The ethereal log will help me a lot.

So to use ethereal :
- download it (with winpcap driver 3.0)
- install it! :)
- click on the "Capture" menu. Choose "Interfaces..."
- click on "Prepare" for your ethernet card.
- in "Capture Filter" type: host <ip of your PSP>
- click on the "Capture" button
- power on the psp and launch ftp server
- use your ftp client to connect to the psp
- in ethereal click on "Stop" when your done
- finally, save your capture "Save as..." with default options.

Thanks in advance
Pacote
Posts: 3
Joined: Tue Jul 05, 2005 12:46 pm

Re: cuteftp ?

Post by Pacote »

Really dude... WTF?!
Just did that and when i used flashfxp to connect... IT CONNECTED!!!

What the hell ahuauau

working fine now :)

Transfer queue completed
Transferred 1 file totaling 1,19 MB in 3,91 seconds (338,6 KB/s)
sch3rz0
Posts: 2
Joined: Tue Jun 21, 2005 12:11 am
Location: Chicago, IL
Contact:

Post by sch3rz0 »

I tried to connect through WebDrive since I thought that would be really cool. You know, like a total USB replacement. It got hung up while trying to get the directory listing of PSP directory. Here's a link to an Ethereal capture. When I saved it, it didn't give an extention and since I never used ethereal before, I don't know what the default ethereal extension is.

http://www.sch3rz0.com/PSPFTPwithWebDrive_2005-07-05
It's time to chew ass and kick bubble gum... and I'm all out of ass!
theno23
Posts: 11
Joined: Fri Jul 01, 2005 7:58 pm
Location: Southampton, UK
Contact:

Post by theno23 »

To the author,

Nice work!

Are you interested in integrating the httpd code with your ftpd? I was hoping to find time to add an FTP thread and HTTP PUT, but I'm very busy.

Having both servers in one program would probably be more useful.

The httpd code is a real mess, sorry. You can catch me on the IRC channel during european office hours, username swh.

- Steve
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

time...

Post by pspkrazy »

I do not have much time too.
But PSP is a great programming challenge.
I do not know how long i will pass playing with this little computer.


My priorities on this project are:
* finding why some clients like cuteftp and webdrive do not work
* cleaning up the code a little bit (see pspvnc it's clean!)
* adding threads
* making a working exit button
* real time status on psp screen
* logging/options...
* when finished, do another project => ideas: port of a real ftp server, ftp client, virtual keyboard library...

Questions...
1) Are you interrested in co-working ? I mean: I can put the code in a cvs/svn server.
2 ) Can you explain why, in your idea, it's better to have one program only ?
3) What is the problem with "exit button" ?


Anyways, thanks for your httpd, it helped me a lot.
theno23
Posts: 11
Joined: Fri Jul 01, 2005 7:58 pm
Location: Southampton, UK
Contact:

Post by theno23 »

Sure, co-working would be great.

I have a CVS server at work we can use, but another one would be better.

I've some plans for the http implementation, including making it properly complaint with the rec., but I wont have time in the near future.

Mail me on steve at totl.net if you want to sort things out.

- Steve
placasoft
Posts: 53
Joined: Mon Mar 28, 2005 10:53 am

Post by placasoft »

At first PSPKRAZY, NICE work!!!

I´m a noob in programin, so I just played around with the src!

Now you can access "flash0:"


Grab it here :
http://www.psp-arena.de/files/ftp.zip

... but when change the host too "umd0:"( or disc0: umd1: .... ) this didn´t work, do you know why?

cYa
placa
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

sources

Post by pspkrazy »

Please placasoft,

can you redistribute the sources with your program ?
For 2 reasons:
* it is a sample from 3 developpers now
* i do not have my psp here at work and i am interrested in your source code modification.

Thanx and good job anyway.
Nick Fury
Posts: 45
Joined: Wed Jun 22, 2005 12:14 pm

Post by Nick Fury »

placasoft wrote:At first PSPKRAZY, NICE work!!!

I´m a noob in programin, so I just played around with the src!

Now you can access "flash0:"


Grab it here :
http://www.psp-arena.de/files/ftp.zip

... but when change the host too "umd0:"( or disc0: umd1: .... ) this didn´t work, do you know why?

cYa
placa
I was curious about doing something like this myself. Pretty cool but please release the source.
placasoft
Posts: 53
Joined: Mon Mar 28, 2005 10:53 am

Re: sources

Post by placasoft »

pspkrazy wrote:Please placasoft,

can you redistribute the sources with your program ?
For 2 reasons:
* it is a sample from 3 developpers now
* i do not have my psp here at work and i am interrested in your source code modification.

Thanx and good job anyway.
Kay, give me just a hour, i will change a bit ;)

cYa
placa
placasoft
Posts: 53
Joined: Mon Mar 28, 2005 10:53 am

Post by placasoft »

Ok, the programm with src :
http://www.psp-arena.de/files/ftpf.zip

What I change is really simple!

In main.c I add :

Code: Select all

int main&#40;void&#41;
&#123;
	
	sceIoUnassign&#40;"flash0&#58;"&#41;; 
	sceIoAssign&#40;"flash0&#58;", "lflash0&#58;0,0", "flashfat0&#58;", 0, NULL, 0&#41;;
in ftp.c i add:

Code: Select all

char root&#91;&#93;="flash0&#58;";
in startup.s i add

Code: Select all

 	STUB_FUNC 0xb2a628c1 sceIoAssign
	STUB_FUNC 0x6d08a871 sceIoUnassign 
Thats all!

But why it didn´t work when i just set

Code: Select all

char root&#91;&#93;="umd0&#58;"
... but I will get it work! And Pspkrazy, can you add that I copy things from psp to PC ? Would be nice ;)

and last, a pic!

Image
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

http://cpasjuste1.free.fr/psp/ftpf2.rar

with this one the UMD is working, but i dont know why we cant explore the PSP_GAME folder.
mrdelayer
Posts: 16
Joined: Sun Jul 10, 2005 4:30 pm

Post by mrdelayer »

hey pspkrazy...

i'm trying to use your LogPrintf() function for a program i am writing... didn't make that much of a modification to the code (just edited a var name to fit in with the rest of my crappy coding [that is, ambiguous and confusing])

Code: Select all

int LogPrintf&#40;char *fmt, ...&#41; &#123;
	va_list opt;
  
	char buff&#91;2048&#93;;
	int bufsz;
  
	va_start&#40;opt, fmt&#41;;
	bufsz = vsnprintf&#40; buff, &#40;size_t&#41; sizeof&#40;buff&#41;, fmt, opt&#41;;
	sceIoWrite&#40;file, buff, bufsz&#41;;

	return 0;
&#125;
however, when i try to make, i get:

Code: Select all

main.c&#58;18&#58; error&#58; initializer element is not constant
any ideas? :|

EDIT: oops. turns out your code wasn't the problem. disregard this entire post please :D
squiggle
Posts: 9
Joined: Sun Jun 26, 2005 8:33 pm

Post by squiggle »

' cute ftp 7.1 home ' worked for me.. So did FlashFXP.
placasoft
Posts: 53
Joined: Mon Mar 28, 2005 10:53 am

Post by placasoft »

@ PSPKRAZY!

I just download your new Version. Good Job, but with what Sdk do you make this? I can´t compile it :(

Cya
Placa
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

With the last subversion one ?

Post by pspkrazy »

With the last subversion one ?

Maybe i have a special configuration ?

I will ask a friend to try.



Tomorrow.

Bye.
fantomasfr
Posts: 11
Joined: Fri Jul 08, 2005 9:02 pm

Post by fantomasfr »

Hi,
im working on UMD access for ur ftpserver.
I have full access on all directory, but i have some prob with size of file...
i m fixing it now ..
I have made full real time status on psp screen..
fixed some copy problem..
but i have to work harder :)
++

Fantomas

Ps:

Code: Select all

CWD movie
250 CWD command successful.
PWD
257 "/PSP_GAME/USRDIR/data/movie/" is current directory.
List Complete.

Code: Select all

RETR 989logo.pmf
150 Opening ASCII mode data connection for 989logo.pmf.
226 Transfer complete.
Transferred&#58; 989logo.pmf 647 168 bytes in 4,67 &#40;135,30 KB/Sec&#41;
Transfer queue completed
Transferred 1 file totaling 647 168 bytes in 4,72 &#40;135,30 KB/Sec&#41;
pspkrazy
Posts: 49
Joined: Mon Jul 04, 2005 1:31 am

file size

Post by pspkrazy »

Strange file size problem was introduced in v0.2.

v0.21 (you can download it on my site) does not have this bug.

Will you release your version in the next future ? ;)
mrdelayer
Posts: 16
Joined: Sun Jul 10, 2005 4:30 pm

Post by mrdelayer »

hm. is downloading files from the PSP to the PC supposed to not work? :(
fantomasfr
Posts: 11
Joined: Fri Jul 08, 2005 9:02 pm

Post by fantomasfr »

hi pspkrazy, do u have msn?
pm ur addy please
++

Fantomas
pspboy88
Posts: 3
Joined: Sat Jul 16, 2005 12:29 am

Post by pspboy88 »

ok i have a problem i am trying to do this i have 1.5 firmware and i installed it using KXploit Tool 0.3.and go and run it it say this (i put pics each time it changes text.
first it says this:
connecting...
associting

then it says this and does not go anymore past this

Image

this my network it is at top like the read me says to do
Image
if you can read it is says:
Ip address 192.168.168.102(which is static so it does not change)
subnet mask 255.255.255.0
default router 192.168.168.1
primary dns 63.240.76.198
secondary dns 204.127.199.8
and the proxy server is (do not use)

now it also at the dhcp part when i try to go home it stops on the please wait and i don know what to to so can i get some help. thanks[/img]
Post Reply