Welcome! Log In Create A New Profile

Advanced

Wii unique id

Posted by arasium 
Wii unique id
June 10, 2010 01:54PM
Hi,

i'm trying to create a web application with the wii as client. I need to identify the user session. I can develop a mecanism on the server to create session token and give them to the wii (like all web apps) but this take time :)

So is there a way to get a unique id on the wii. This id will be used as the session key ?

thx
Re: Wii unique id
June 10, 2010 06:15PM
There are a bunch of keys unique to every Wii, such as the Wii's private (and public) signatures (aka NG-priv and NG-sig respectively). There's also the Wii's message board friend code. I am not however sure how you would extract any of these, the first two at least I think may need a patched IOS to be extracted, not sure about the friend code. Maybe look into ISFS?
Re: Wii unique id
June 10, 2010 11:15PM
Since you want to get that data with a web app(through Wii Opera I assume) you can try reading this: [mozy.org]
Re: Wii unique id
June 11, 2010 01:10AM
Quote
SifJar
There are a bunch of keys unique to every Wii, such as the Wii's private (and public) signatures (aka NG-priv and NG-sig respectively). There's also the Wii's message board friend code. I am not however sure how you would extract any of these, the first two at least I think may need a patched IOS to be extracted, not sure about the friend code. Maybe look into ISFS?

You don't need a patched IOS to extract the friend code. I have some code that does this, if you or anyone else needs this, let me know.
Re: Wii unique id
June 11, 2010 02:12AM
Quote
chris
You don't need a patched IOS to extract the friend code. I have some code that does this, if you or anyone else needs this, let me know.
I just sent yellowstar a PM asking this, hahaha. I got the friend code without any ES call. If I'm not mistaken that means it doesn't need any patched IOS, right?

Oh, and unless you are selling it I would like to see your code. :)
Re: Wii unique id
June 11, 2010 05:09PM
Quote
Aruskano
Quote
chris
You don't need a patched IOS to extract the friend code. I have some code that does this, if you or anyone else needs this, let me know.
I just sent yellowstar a PM asking this, hahaha. I got the friend code without any ES call. If I'm not mistaken that means it doesn't need any patched IOS, right?

Oh, and unless you are selling it I would like to see your code. :)

Most ES calls don't need a patched IOS, only ES_DiVerify (aka ES_Identify), because Ninty disabled it in newer revisions of IOS. All the others are still there and working fine. If they weren't many of the main functions of the Wii would cease to work, seeing as they are there for a reason, and Ninty need to use them (e.g. for loading channels, installing channels, and much more).
Re: Wii unique id
June 11, 2010 06:23PM
This is what I did to get the friend code. There may be easier ways that I'm unaware of.

#include stdio.h>
#include string.h>
#include ogcsys.h>
#include ogc/isfs.h>
#include unistd.h>

unsigned int codefile;
char readbuffer[32] ATTRIBUTE_ALIGN(32);

void init_console()
{
	static void *xfb = NULL;
	static GXRModeObj *rmode = NULL;
	VIDEO_Init();
	rmode = VIDEO_GetPreferredMode(NULL);
	xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
	console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
	VIDEO_Configure(rmode);
	VIDEO_SetNextFramebuffer(xfb);
	VIDEO_SetBlack(FALSE);
	VIDEO_Flush();
	VIDEO_WaitVSync();
	if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
}

void iread(void *ptr,int len,int size,int file)
{
	ISFS_Read(file,readbuffer,len*size);
	memcpy(ptr,readbuffer,len*size);
}

int main()
{
	unsigned int codefile;
	char buf[17];
	long long int friendcode;
	init_console();
	ISFS_Initialize();
	if((codefile=ISFS_Open("/shared2/wc24/nwc24msg.cfg",ISFS_OPEN_READ)))
	{
		ISFS_Seek(codefile,8,SEEK_SET);
		iread(&friendcode,8,1,codefile);
		sprintf(buf,"%016llu",friendcode);
		printf("\n\n\nIs your friend code %c%c%c%c-%c%c%c%c-%c%c%c%c-%c%c%c%c ?",buf[0],buf[1],buf[2],buf[3],buf[4],buf[5],buf[6],buf[7],buf[8],buf[9],buf[10],buf[11],buf[12],buf[13],buf[14],buf[15]);
	}
	else
	{
		printf("\n\n\nCan't open required file.");
	}
	printf("\n\nWaiting ten seconds...");
	sleep(10);
	return 0;
}
Re: Wii unique id
June 11, 2010 08:40PM
chris: You should add that to wiibrew: [wiibrew.org]
Creating that page with info about data used for the mail engine was on my todo list for a while, but I just never wrote that page yet.(That data didn't include that Wii ID though.)



Edited 2 time(s). Last edit at 06/15/2010 01:06AM by yellowstar.
Re: Wii unique id
June 11, 2010 09:07PM
Cool, thanks for sharing this!

Is the Wii FC 8 bytes long? I thought it was 7 bytes long because of mine (the 8th byte is 00 so the real number starts till the 9th one) but now that I think about it must be 8 byte long.
Re: Wii unique id
June 11, 2010 09:29PM
Quote
yellowstar
chris: You should add that to wiibrew: [wiibrew.org]
Creating that page with info about data used for the mail engine was on my todo list for a while, but I just never wrote that page yet.(That data didn't include that Wii ID though.)

I don't know anything else about what's in that file (though yeah, most of it seems to be URLs for use with the messaging sevice). I needed to find a way to get the friend code for use in a project and this was the first place I found it.
Re: Wii unique id
June 11, 2010 09:36PM
Quote
Aruskano
Cool, thanks for sharing this!

Is the Wii FC 8 bytes long? I thought it was 7 bytes long because of mine (the 8th byte is 00 so the real number starts till the 9th one) but now that I think about it must be 8 byte long.

It's stored as a 64 bit integer but in reality the first byte is always zero (002386F26FC0FFFF is 9999-9999-9999-9999).
Re: Wii unique id
June 13, 2010 05:52PM
You guys never saw ES_GetDeviceID? It gives an unsigned int unique to each wii.
Re: Wii unique id
June 14, 2010 03:57PM
Thanks you for all your advices.

In fact, i've found the solution :) I use the remote ip. This is enough for me to identify the different wiis.

But, i keep in mind all of your ideas.

Thx a lot.



Edited 1 time(s). Last edit at 06/14/2010 03:57PM by arasium.
Sorry, only registered users may post in this forum.

Click here to login