Reading Wi-Fi

Discussion in 'NDS - Emulation and Homebrew' started by playallday, Aug 31, 2008.

Aug 31, 2008

Reading Wi-Fi by playallday at 7:27 PM (617 Views / 0 Likes) 0 replies

  1. playallday
    OP

    Member playallday Group: GBAtemp Ghost

    Joined:
    May 23, 2008
    Messages:
    3,773
    Location:
    [@N@[)@
    Country:
    Canada
    EDIT: I'm so mad that I can't get this to work!! HELP!!!!

    Hi guys! I need some help reading and writing to the DS's Wi-Fi settings (with PAlib).

    Also I need to know how to read and write to text files.

    What I want to do it write a text file that is the DS's Wi-Fi settings, Then I want to read the file and write to the DS's Wi-Fi settings. Here's what I've done(which isn't working):

    CODE#include ÂÂÂÂÂÂ // Include for PA_Lib

    int main()
    {
    ÂÂÂÂPA_Init();ÂÂÂÂ// Initializes PA_Lib
    ÂÂÂÂPA_InitVBL(); // Initializes a standard VBL

    ÂÂÂÂPA_InitText(0, 0);
    ÂÂÂÂPA_OutputSimpleText(0, 0, 21, "WiFiMe 0.1");
    ÂÂÂÂPA_OutputSimpleText(0, 0, 23, "By playallday (gbatemp.net)");

    ÂÂÂÂPA_OutputText(1, 0, 0, "Loading PAFS...");ÂÂÂÂ
    ÂÂÂÂ
    ÂÂÂÂu32 FileNumber = PA_FSInit(); // Inits PA File System, and returns the number of files
    ÂÂÂÂ
    ÂÂÂÂ// PA_OutputText(1, 0, 1, "ÂÂFilesÂÂ : %dÂÂÂÂ", FileNumber);ÂÂÂÂÂÂÂÂ
    ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ
    ÂÂÂÂ// For each file, we'll draw it's name on the bottom screen...
    ÂÂÂÂs32 i;ÂÂÂÂ
    ÂÂÂÂfor (i = 0; i < FileNumber; i++){
    ÂÂÂÂÂÂÂÂif (PA_FSFile.Name == "wifi")
    ÂÂÂÂÂÂÂÂ{
    ÂÂÂÂÂÂÂÂÂÂÂÂchar filedata = PA_PAFSFile(i);
    ÂÂÂÂÂÂÂÂÂÂÂÂPA_OutputText(0, 0, 0, "%s", filedata);
    ÂÂÂÂÂÂÂÂ}
    ÂÂÂÂÂÂÂÂ
    ÂÂÂÂÂÂÂÂ// PA_OutputText(0, 0, i, "%s.%sÂÂ Size : %d, %d", PA_FSFile.Name, PA_FSFile.Ext, PA_FSFile.Length, PA_FSFile.FilePos);
    ÂÂÂÂ}ÂÂÂÂ
    ÂÂÂÂ

    ÂÂÂÂ// Infinite loop to keep the program running
    ÂÂÂÂwhile (1)
    ÂÂÂÂ{
    ÂÂÂÂÂÂÂÂPA_WaitForVBL();
    ÂÂÂÂ}
    ÂÂÂÂ
    ÂÂÂÂreturn 0;
    }



    THANKS!!!!

    P.S. I need to know ASAP!!!!
     

Share This Page