PSP Wifi code

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

Moderators: cheriff, TyRaNiD

Post Reply
Escher
Posts: 2
Joined: Sat Oct 08, 2005 5:32 pm

PSP Wifi code

Post by Escher »

Hi, I'm working on a super-stripped-down gecko engine browser for the PSP, and I'm sort of in the dark about using the PSP's wifi. If anyone could point me towards a helpful tut or could perhaps donate a bit of code, it would be greatly appreciated.
CyberBill
Posts: 86
Joined: Tue Jul 26, 2005 3:53 pm
Location: Redmond, WA

Post by CyberBill »

There is wifi sample code in the PSPSDK.
Escher
Posts: 2
Joined: Sat Oct 08, 2005 5:32 pm

Post by Escher »

Ah, thanks. I must have missed it, I'll look again...
CyberBill
Posts: 86
Joined: Tue Jul 26, 2005 3:53 pm
Location: Redmond, WA

Post by CyberBill »

Ooops, I jumped the gun. I thought it had been added but it has not. Heres the link:

http://aibohack.com/psp/wifitest.htm
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

I will try to port a CIFS client on top of it. This will allow us accessing shared Windows and Samba directories. Did anyone try that already?

/JockyW
urchin
Posts: 121
Joined: Thu Jun 02, 2005 5:41 pm

Post by urchin »

I've had a play around with that wifi code. It's pretty easy to add it into your own code.
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

I will try to port a CIFS client on top of it. This will allow us accessing shared Windows and Samba directories. Did anyone try that already?
Neither samba, cifs vfs, or ecifs is an easy port. I spent a few hours on this at the weekend. Samba and cifs vfs need half of Linux porting to PSP (because the SMB/CIFS part isn't abstracted from the file system mounting part) and eCIFS is multithreaded. There's also jcifs which is java.

It might be simpler to roll a new basic raw smb client for PSP than try to port any of those. Did you have another client in mind?

Jim
matkeupon
Posts: 26
Joined: Sat Jul 02, 2005 10:58 pm

Post by matkeupon »

urchin wrote:I've had a play around with that wifi code. It's pretty easy to add it into your own code.
Well, it's easy if your code runs in kernel mode. I'm trying to add wifi multiplayer on my game, but it won't support running in kernel mode (the game loads ok, but hangs on the splash screen).
I tried to setup a kernel thread in the constructor, and load the prxs from there. The prxs load ok, but sceNetInit() (nlhInit() ) fails with a huge negative number (-217.........).

I'm using pspkrazy's ftp client code.
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

Jim wrote:Neither samba, cifs vfs, or ecifs is an easy port. I spent a few hours on this at the weekend. Samba and cifs vfs need half of Linux porting to PSP (because the SMB/CIFS part isn't abstracted from the file system mounting part) and eCIFS is multithreaded. There's also jcifs which is java.

It might be simpler to roll a new basic raw smb client for PSP than try to port any of those. Did you have another client in mind?

Jim
I had the same experience last weekend:P It would be a lot easier if the PSP would be POSIX compliant, or much better if it would run linux ... But it doesn't, so we have to find some kind of solution. I will make one more attempt on CIFS, there is this product called Sharity (www.obdev.at/products/sharity/). It's not GPL or LGPL so not particular suitable. I'm a bit surprised that leight-weight CIFS clients are so hard to find. There are plenty of non-POSIX embedded systems running CIFS, so I was hoping it wouldn't be that difficult to find sourcecode.

The other solution I was thinking of is porting a leight-weight tcp/ip stack e.g. lwIP and then port a NFS client. I have to study pspkrazy's ftp client code, maybe that can speed up things a bit.

/JockyW
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

If you read http://www.ubiqx.org/cifs/ it will become very clear why there are no lightweight cifs clients.
eCIFS is easily the closest, but we don't have posix threads.

Noone knows if you can send raw packets yet, so lightweight IP might be impossible. It would be easier and better to make a bsd sockets compliant API over the PSPSDK one.

Jim
PspPet
Posts: 210
Joined: Wed Mar 30, 2005 2:13 am
Contact:

Post by PspPet »

> It would be easier and better to make a bsd sockets compliant API over the PSPSDK one.
Not sure what you are looking for.
The PSP sceNetInet API is patterned after BSD/Berkeley. You need to add a few #defines (#define bind sceNetInetBind etc).
It is not 100% compliant especially when it comes to socket options and timeouts etc. No easy work arounds for some of these limitations.
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

That's exactly what I mean. If you're porting other people's code and the PSPSDK setsockopt(SO_RCVTIMO) doesn't work then you're probably stuffed. Reworking to get round a design that needs that will be tricky.
Don't get me wrong though, I think the work done so far will get many ports over the line.

Jim
Post Reply