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!

Lua wifi working in 3.03 OE-B?

This is a discussion on Lua wifi working in 3.03 OE-B? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Well, as most of you know, Luaplayer WIFI apps are reported not to work in OE firmware's, and i tested ...

Reply
 
LinkBack Thread Tools
Old 01-14-2007, 01:34 AM   #1

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default Lua wifi working in 3.03 OE-B?

Well, as most of you know, Luaplayer WIFI apps are reported not to work in OE firmware's, and i tested this a wifi app on other OE firmwares and concluded that Lua WIFI does NOT work in OE, but when OE-B came out, I tested this with the same app, (PvP Pong v4) and made no changes from b4 and it actually connected to netLib! and was "getting room info..."!, but it would just hang there...., so today i saw that the Ip to netLib has changed, and i (just happen to find an unencrypted Online.lua about an hour b4!) so i made the necessary changes, and gave it run, and what do you know! it made it all the way to "getting room info......done. room state = "empty" hence, it was waiting for another player! so, im not sure, but my guess is Lua WIFI works on 3.03 OE-B! go check your lua WiFi apps to verify because I am not certain, but i believe it does. What do you guys think?
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 02:26 AM   #2
 
Join Date: Jul 2006
Location: USA SC/NC
Posts: 699
Trader Feedback: 0
Default

If the wlan comes on and u connect to an access point, it works sherlock :|

There's not much room for opinion here :P ... if it works, then it works.... i hope that's obvious. I guess thats good news for the wifi LUA games. Is PVP kinda like 48 HourPong? I really liked 48 Hour Pong :P












LUA SUX. C FTW
__________________
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]

[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
Moca is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 02:33 AM   #3

The Unique Developer
 
the unique warrior's Avatar
 
Join Date: Oct 2006
Location: Canada
Posts: 1,059
Trader Feedback: 0
Default

I still don't get the point of LUA, well I can see that it works (...).
NOw :
Connect with Timeouts :
Spoiler for ...:
Code:
SOCKET nlhSimpleConnectWithTimeout(int sockType, const u8 ip_addr[4], u16 port, int timeoutTicks, STATUS_PROC statusProc, void* statusData)

{

    SOCKET sock;

    struct sockaddr_in addrTo;

    int err;



    sock = sceNetInetSocket(AF_INET, sockType, 0);

    if (sock & 0x80000000)

        return INVALID_SOCKET;



    addrTo.sin_family = AF_INET;

    addrTo.sin_port = htons(port);

    addrTo.sin_addr[0] = ip_addr[0];

    addrTo.sin_addr[1] = ip_addr[1];

    addrTo.sin_addr[2] = ip_addr[2];

    addrTo.sin_addr[3] = ip_addr[3];



    //with regular blocking settings, the PSP wedges waiting for a connection

        // if the IP is not valid

    // instead we start a non-blocking connect, and check the status waiting

        // for a connect



    nlhSetSockNoBlock(sock, 1);



    err = sceNetInetConnect(sock, &addrTo, sizeof(addrTo));

        // start the process



    if (err == 0)

    {

        // surprising - it worked immediately

        nlhSetSockNoBlock(sock, 0); // turn blocking back on for recv

        return sock;    // worked immediately

    }



    if (err == 0xFFFFFFFF && sceNetInetGetErrno() == 0x77)

    {

        // connect process started, not yet complete

#define TICKS_PER_POLL 20

        int ticks;

        for (ticks = 0; ticks < timeoutTicks; ticks += TICKS_PER_POLL)

        {

            // try connect again, which should always fail

            // look at why it failed to figure out if it is connected

            //REVIEW: a conceptually cleaner way to poll this?? (accept?)

            err = sceNetInetConnect(sock, &addrTo, sizeof(addrTo));

            if (err == 0 || (err == 0xFFFFFFFF && sceNetInetGetErrno() == 0x7F))

            {

                // now connected - I hope

                nlhSetSockNoBlock(sock, 0); // turn blocking back on for recv

                return sock;

            }

            if (statusProc != NULL)

                (*statusProc)(100 * ticks / timeoutTicks, statusData);

            sceKernelDelayThread(TICKS_PER_POLL*1000);

        }

    }



    // something wrong - general error or timeout on connect

    //REVIEW: sceNetInetSocketAbort(sock); ???

    sceNetInetClose(sock);



    return INVALID_SOCKET;

}
__________________
Malloc.Us Network Administrator

Decryption of the Encrypted


You are the unseen, the unstoppable and in power of your code. The God of your software.
the unique warrior is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 02:36 AM   #4
 
Join Date: Jul 2006
Location: USA SC/NC
Posts: 699
Trader Feedback: 0
Default

Quote:
Originally Posted by the unique warrior
I still don't get the point of LUA, well I can see that it works (...).
NOw :
Connect with Timeouts :
Spoiler for ...:
Code:
SOCKET nlhSimpleConnectWithTimeout(int sockType, const u8 ip_addr[4], u16 port, int timeoutTicks, STATUS_PROC statusProc, void* statusData)

{

    SOCKET sock;

    struct sockaddr_in addrTo;

    int err;



    sock = sceNetInetSocket(AF_INET, sockType, 0);

    if (sock & 0x80000000)

        return INVALID_SOCKET;



    addrTo.sin_family = AF_INET;

    addrTo.sin_port = htons(port);

    addrTo.sin_addr[0] = ip_addr[0];

    addrTo.sin_addr[1] = ip_addr[1];

    addrTo.sin_addr[2] = ip_addr[2];

    addrTo.sin_addr[3] = ip_addr[3];



    //with regular blocking settings, the PSP wedges waiting for a connection

        // if the IP is not valid

    // instead we start a non-blocking connect, and check the status waiting

        // for a connect



    nlhSetSockNoBlock(sock, 1);



    err = sceNetInetConnect(sock, &addrTo, sizeof(addrTo));

        // start the process



    if (err == 0)

    {

        // surprising - it worked immediately

        nlhSetSockNoBlock(sock, 0); // turn blocking back on for recv

        return sock;    // worked immediately

    }



    if (err == 0xFFFFFFFF && sceNetInetGetErrno() == 0x77)

    {

        // connect process started, not yet complete

#define TICKS_PER_POLL 20

        int ticks;

        for (ticks = 0; ticks < timeoutTicks; ticks += TICKS_PER_POLL)

        {

            // try connect again, which should always fail

            // look at why it failed to figure out if it is connected

            //REVIEW: a conceptually cleaner way to poll this?? (accept?)

            err = sceNetInetConnect(sock, &addrTo, sizeof(addrTo));

            if (err == 0 || (err == 0xFFFFFFFF && sceNetInetGetErrno() == 0x7F))

            {

                // now connected - I hope

                nlhSetSockNoBlock(sock, 0); // turn blocking back on for recv

                return sock;

            }

            if (statusProc != NULL)

                (*statusProc)(100 * ticks / timeoutTicks, statusData);

            sceKernelDelayThread(TICKS_PER_POLL*1000);

        }

    }



    // something wrong - general error or timeout on connect

    //REVIEW: sceNetInetSocketAbort(sock); ???

    sceNetInetClose(sock);



    return INVALID_SOCKET;

}
Nice piece of code TUW! That looks like C to me
__________________
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]

[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
Moca is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 02:50 AM   #5

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

Quote:
Originally Posted by Moca
If the wlan comes on and u connect to an access point, it works sherlock :|

There's not much room for opinion here :P ... if it works, then it works.... i hope that's obvious. I guess thats good news for the wifi LUA games. Is PVP kinda like 48 HourPong? I really liked 48 Hour Pong :P



LUA SUX. C FTW
Hell i wish :P, y does Lua suck?
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 05:02 AM   #6

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

*Feels his ears burning*
__________________

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197

Quote:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 05:35 AM   #7
Ponies and Unicorns
 
GuitarGod1134's Avatar
 
Join Date: Aug 2006
Location: Pelennor Fields
Posts: 547
Trader Feedback: 0
Default

Quote:
Originally Posted by Moca
Nice piece of code TUW! That looks like C to me
Thats what she said.

And in my opinion infrastructure is too hard and probaly wouldnt work that well I would suggest adhoc or ir
__________________
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
GuitarGod1134 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 07:07 AM   #8

Developer
 
cools's Avatar
 
Join Date: Aug 2005
Posts: 472
Trader Feedback: 0
Default

I'm not sure why it all of a sudden started working for you. But I did find a way to get it to work (in 3.02 OE-A - 3.03 OE-B). If you downgrade to 1.5, set your wifi settings, then up back to 3.02 OE or 3.03 OE and make sure not to touch restore default settings or wifi setting after you upgrade. Wifi will work in lua player (and other apps). It will also work in the Sony Web browser. I'm not sure why it works, but it does! OR the netlib ip change helped. If you havent finished the wifi code you should check out the updated version of the tutorial in one of the links below,
__________________

PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
http://www.cools.biaklan.com
Currently Working on ?????

Quote of the Week
cools is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 11:50 AM   #9

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

ya, i heard about that, but having downgraded to 1.5 to test PvP, i got the same result that i did with 3.03 OE-B (this is b4 i made the ip change) but when i upgraded, i had to restore my default settings (cuz it made me) so, the connection was made with3.03 OE-B, and yesterday, PvP Pong Online finaly woked. But ya, i tryed that Cool's, but it makes me restore default settings when i upgrade again :/

BTW, Excellent tuts!
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 12:35 PM   #10
 
Join Date: Jul 2006
Location: USA SC/NC
Posts: 699
Trader Feedback: 0
Default

hmm PvP is pretty nice :P
__________________
[CODE]Random Facts:
irc://irc.malloc.us #wtf #**********
[/CODE]

[SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]
Moca is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 12:37 PM   #11

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

omg.....is, is that a complement??? to a Lua game/???? from Moca??????
[action=BlackShark]checks the skies*/ [/action]

glad you like it
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 06:31 PM   #12

PSP Developer
 
alatnet's Avatar
 
Join Date: Oct 2005
Real First Name: Alex
Location: ~* Confidential *~
Just Played: N/A
Posts: 839
Trader Feedback: 0
Default

Yea...
Still can't connect to my freaking access point via Luaplayer .20 to test my java server.
I might have an idea.
You know that network config back-up utility thing that was release a long time ago...
well... get net configs from a 1.5 then back them up. Finaly use that back-up on a 3.03 OE-B. Would this work?
__________________

"Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
Anime/Manga and Fanfiction is my inspiration!

Creator of:
- PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -
alatnet is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-14-2007, 06:40 PM   #13

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

it might, I knew about the app, but im not sure were to get it, do you?
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-16-2007, 10:24 AM   #14

PSP Developer
 
alatnet's Avatar
 
Join Date: Oct 2005
Real First Name: Alex
Location: ~* Confidential *~
Just Played: N/A
Posts: 839
Trader Feedback: 0
Default

It was on the front page a while back.
__________________

"Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
Anime/Manga and Fanfiction is my inspiration!

Creator of:
- PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -
alatnet is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 01-16-2007, 10:25 AM   #15

Developer in Making...
 
BlackShark's Avatar
 
Join Date: Oct 2006
Location: Pimp'en in the US F#cking A!!!
Posts: 1,254
Trader Feedback: 0
Default

Ok, thanks, now to use man's best friend....a search engine ")
__________________
The Wentire Worls in two Sectors....
When did I get dev statz?
Spoiler for my PSP homebrewReleases:
Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
(PvP Pong DL'ed well over 2403 times combined! get yours now!)
Spoiler for Great Quotes:

"No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.
BlackShark is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
303 , lua , oeb , wifi , working

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 03:02 PM.



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