forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Networking question

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Nov 02, 2007 10:04 am    Post subject: Networking question Reply with quote

I've got two PSPs connected to a wireless router and I'm trying to send a UDP packet from one to the other. They're both connected, I've got the IP addresses, but when I send a packet from one PSP, it never reaches the second. Instead the router responds with an ICMP Type 3 Code 3 packet and I get a "Host is down" error on the sending PSP. Has anyone run into this before?
Back to top
View user's profile Send private message AIM Address
varmint



Joined: 27 May 2007
Posts: 1

PostPosted: Sat Nov 03, 2007 7:31 am    Post subject: Reply with quote

Only thing I can think of is maybe your router has MAC filters setup? I send UDP & TCP packets between PSP's on our wireless all the time with out problems.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Nov 03, 2007 7:38 am    Post subject: Reply with quote

varmint wrote:
Only thing I can think of is maybe your router has MAC filters setup? I send UDP & TCP packets between PSP's on our wireless all the time with out problems.


Yes, I'm using the MAC filters, but as I said, they're both connected. I couldn't get them to connect until they were in the Mac filter list. When you create an access point, you're given the opportunity to test the connection. I'd hope that people did. :)

Until the PSP is in the MAC filter list, the test fails immediately. Oh, I have the filter set for excluding connections not in the list. The list has only the two PSPs in it. Both PSPs can reach Google (for example), but not each other.
Back to top
View user's profile Send private message AIM Address
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Sat Nov 03, 2007 7:42 am    Post subject: Reply with quote

I'd try the same test with two laptops to see if it's PSP-specific.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Nov 03, 2007 9:26 am    Post subject: Reply with quote

jimparis wrote:
I'd try the same test with two laptops to see if it's PSP-specific.


Yeah! Now all I need it two wireless laptops. ;)
Back to top
View user's profile Send private message AIM Address
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Nov 04, 2007 8:18 pm    Post subject: Reply with quote

Well, I learned a valuable lesson and thought I'd share it in case someone else has the same trouble some day. My network code was fine. No problems at all. The reason neither PSP responded to the other (or to the computer) was that I forgot the PSP uses COOPERATIVE MULTITASKING and the network libs use threads to handle the ARP packets to resolve addresses. If you don't call a function that allows tasks to switch, your PSP will not respond to ARP packets and thus appears unreachable. My packets were set for non-blocking, and the program looped around waiting/sending packets. All I had to do to get it to work was stick an sceKernelDelayThread(10); in front of the packet function and everything was peachy.
Back to top
View user's profile Send private message AIM Address
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Mon Nov 05, 2007 7:20 am    Post subject: Reply with quote

If it could help, I've set up and run under 3.xx both on Fat and S&L the follwing tests using WiFi between 2 PSPs:

- Adhoc Client-Server connection
- Via Access Point Static IP Address Client-Server connection
- Via Access Point Static IP Address FTP Client-Server connection
- Via Access point with Dynamic IP Address connection (mandatory) WebGet
- Via Access point with Dynamic IP Address connection (mandatory) HTTP client
- Via Access point with Dynamic IP Address connection (mandatory) Resolver

- With Adhoc connection: Sort of walkie-talkie for audio with both socom microphone or gocam microphone : spoken audio input is transmitted from one PSP to another, two-ways, once per time
- With Adhoc connection: Video frame 160x120 pixels transfer from a Server PSP to a Client

Next steps:
- Audio buffers and Video frames transmitted between PSPs using Access Point
[Speech Recognition using PocketSphinx]

Here "proof of concept": http://www.psp-ita.com/?module=fileview&file_id=690
Source code available if specifically requested.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Nov 05, 2007 8:26 am    Post subject: Reply with quote

mypspdev wrote:
If it could help, I've set up and run under 3.xx both on Fat and S&L the follwing tests using WiFi between 2 PSPs:

- Adhoc Client-Server connection
- Via Access Point Static IP Address Client-Server connection
- Via Access Point Static IP Address FTP Client-Server connection
- Via Access point with Dynamic IP Address connection (mandatory) WebGet
- Via Access point with Dynamic IP Address connection (mandatory) HTTP client
- Via Access point with Dynamic IP Address connection (mandatory) Resolver

- With Adhoc connection: Sort of walkie-talkie for audio with both socom microphone or gocam microphone : spoken audio input is transmitted from one PSP to another, two-ways, once per time
- With Adhoc connection: Video frame 160x120 pixels transfer from a Server PSP to a Client

Next steps:
- Audio buffers and Video frames transmitted between PSPs using Access Point
[Speech Recognition using PocketSphinx]

Here "proof of concept": http://www.psp-ita.com/?module=fileview&file_id=690
Source code available if specifically requested.


I wouldn't mind seeing the ad-hoc code. What's out there right now tends to be rather messy. :)
Back to top
View user's profile Send private message AIM Address
mypspdev



Joined: 11 Jul 2007
Posts: 178

PostPosted: Mon Nov 05, 2007 9:18 pm    Post subject: Reply with quote

Sorry for boring you with such a mess...
Up to me this sequence of tests is my own substitute under 3.xx for fat and slim of the "/pspdev/psp/sdk/samples" contents.
On network I had initially some issues related to acptl, dhcp, static/dynamic ip, transmitted/received streams, resolvers, that I solved step by step and now I have the final way all they work properly.
Sorry, for what doesn't help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group