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

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

Moderators: cheriff, TyRaNiD

Post Reply
_AngeL_
Posts: 2
Joined: Thu Sep 13, 2007 7:12 am
Location: Leon - Spain

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

Post by _AngeL_ »

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: Select all

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&#40;i=0; i<100; i++&#41;
				&#123;
					if&#40;sceUtilityCheckNetParam&#40;i&#41; != 0&#41;
					&#123;
						// Copy the new connection number and continue
						settings->ConnectionNum = i;
						found = 1;
						break;
					&#125;
				&#125;
				
				if&#40;!found&#41;
				&#123;
					pspDebugScreenPrintf&#40;"ERR&#58; Unable to find a free net connection\n"&#41;;
					return -1;
				&#125;

				break;
			&#125;

			if&#40;latch.uiMake & PSP_CTRL_TRIANGLE&#41;
			&#123;
				return -1;
			&#125;
		&#125;
	&#125;

	int rc = sceUtilityCreateNetParam&#40;settings->ConnectionNum&#41;;
	if&#40;rc < 0&#41;
	&#123;
		pspDebugScreenPrintf&#40;"ERR&#58; Unable to create net param, rc=%x\n", rc&#41;;
		return rc;
	&#125;

	pspDebugScreenPrintf&#40;"Creating connection %s, number=%d\n", settings->data&#91;PSP_NETPARAM_NAME&#93;.asString, settings->ConnectionNum&#41;;
	pspDebugScreenPrintf&#40;"   SSID=%s\n", settings->data&#91;PSP_NETPARAM_SSID&#93;.asString&#41;;

	int settingNum;
	for&#40;settingNum=0; settingNum<GetNetparamCount&#40;&#41;; settingNum++&#41;
	&#123;
		rc = sceUtilitySetNetParam&#40;settingNum, &&#40;settings->data&#91;settingNum&#93;&#41;&#41;;
		if&#40;rc<0&#41;
		&#123;
			pspDebugScreenPrintf&#40;"ERR&#58; Failed to set entry 0x%x, rc=0x%x\n", settingNum, rc&#41;;
			sceUtilityDeleteNetParam&#40;settings->ConnectionNum&#41;;
			return rc;
		&#125;
	&#125;

	rc = sceUtilityCopyNetParam&#40;0, settings->ConnectionNum&#41;;
	if&#40;rc<0&#41;
	&#123;
		pspDebugScreenPrintf&#40;"ERR&#58; Failed to copy net param, rc=0x%x\n", rc&#41;;
		sceUtilityDeleteNetParam&#40;settings->ConnectionNum&#41;;
		return rc;
	&#125;

	pspDebugScreenPrintf&#40;"Done creating access point\n"&#41;;

	return rc;
&#125;
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/
Post Reply