Networking question

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

Moderators: cheriff, TyRaNiD

Post Reply
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Networking question

Post by J.F. »

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?
varmint
Posts: 1
Joined: Sun May 27, 2007 10:55 am

Post by varmint »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

I'd try the same test with two laptops to see if it's PSP-specific.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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. ;)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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.
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

Post by mypspdev »

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.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

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. :)
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

Post by mypspdev »

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.
Post Reply