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 

sceUtilityCreateNetParam in 3.40 OE-A HELP!!!!!!!!!!!!!

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



Joined: 13 Sep 2007
Posts: 2
Location: Leon - Spain

PostPosted: Thu Sep 13, 2007 7:59 am    Post subject: sceUtilityCreateNetParam in 3.40 OE-A HELP!!!!!!!!!!!!! Reply with quote

Hello everybody. My name is AngeL and I new here.

First, sorry for my english... ;)
Second, I'm making a program that scans wlans in firmware 3.40OE-A (It works fine jejeje)

BUT....

My problem is that i can't save the A.P. that i found.

I use that function:

Code:

int CreateConnection(struct ConnectionSettings *settings)
{
   struct SceCtrlLatch latch;
   int i;

   // Check to see if the connection is already used, if it is warn the user
   if(sceUtilityCheckNetParam(settings->ConnectionNum) == 0)
   {
      // We already have a connection here, let see what the user wants to do
      pspDebugScreenPrintf("Unable to restore \"%s\" to connection number %d\n",
         settings->data[PSP_NETPARAM_NAME].asString, settings->ConnectionNum);
      pspDebugScreenPrintf("   Press CROSS to overrite the connection\n");
      pspDebugScreenPrintf("   Press CIRCLE to next available connection number\n");
      pspDebugScreenPrintf("   Press TRIANGLE to ignore skip this access point\n");

      for(;;)
      {
         sceCtrlReadLatch(&latch);
         if(latch.uiMake & PSP_CTRL_CROSS)
         {
            // Delete and continue
            if(sceUtilityDeleteNetParam(settings->ConnectionNum) != 0)
            {
               pspDebugScreenPrintf("ERR: Unable to delete net settings\n");
               return -1;
            }
            break;
         }

         if(latch.uiMake & PSP_CTRL_CIRCLE)
         {
            int found = 0;

            for(i=0; i<100; i++)
            {
               if(sceUtilityCheckNetParam(i) != 0)
               {
                  // Copy the new connection number and continue
                  settings->ConnectionNum = i;
                  found = 1;
                  break;
               }
            }
            
            if(!found)
            {
               pspDebugScreenPrintf("ERR: Unable to find a free net connection\n");
               return -1;
            }

            break;
         }

         if(latch.uiMake & PSP_CTRL_TRIANGLE)
         {
            return -1;
         }
      }
   }

   int rc = sceUtilityCreateNetParam(settings->ConnectionNum);
   if(rc < 0)
   {
      pspDebugScreenPrintf("ERR: Unable to create net param, rc=%x\n", rc);
      return rc;
   }

   pspDebugScreenPrintf("Creating connection %s, number=%d\n", settings->data[PSP_NETPARAM_NAME].asString, settings->ConnectionNum);
   pspDebugScreenPrintf("   SSID=%s\n", settings->data[PSP_NETPARAM_SSID].asString);

   int settingNum;
   for(settingNum=0; settingNum<GetNetparamCount(); settingNum++)
   {
      rc = sceUtilitySetNetParam(settingNum, &(settings->data[settingNum]));
      if(rc<0)
      {
         pspDebugScreenPrintf("ERR: Failed to set entry 0x%x, rc=0x%x\n", settingNum, rc);
         sceUtilityDeleteNetParam(settings->ConnectionNum);
         return rc;
      }
   }

   rc = sceUtilityCopyNetParam(0, settings->ConnectionNum);
   if(rc<0)
   {
      pspDebugScreenPrintf("ERR: Failed to copy net param, rc=0x%x\n", rc);
      sceUtilityDeleteNetParam(settings->ConnectionNum);
      return rc;
   }

   pspDebugScreenPrintf("Done creating access point\n");

   return rc;
}


sceUtilityCheckNetParam ---> works fine
sceUtilityDeleteNetParam ----> works fine
sceUtilityCreateNetParam ---> work???
sceUtilitySetNetParam ---> work???
sceUtilityCopyNetParam ---> doesn't work???


When I run that code, it might work but it doesn't work.
Besides, it crash my PSP WLAN Configuration and i MUST reset the default configuration.

I test that code in a PSP with 1.50 Firmware and It works like a charm but i NEED to make it works in a 3.40OE-A!!!

Can SOMEBODY HELP ME??????????????

A lot of thanks

_AngeL_
_________________
PSP Firmware Evolution
1.52 -> 2.00 -> 1.50 ->
3.02OE-RevA -> 3.02OE-RevB ->
3.03OE-RevA -> 3.03OE-RevA' -> 3.03OE-RevB -> 3.03OE-RevC ->
3.10OE-RevA -> 3.10OE-RevA' ->
3.40OE-RevA -> 1.50 (con Pandora!) -> 3.40OE-RevA

http://teclitas.soy.es/
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