I'd like to know what is the simplest method of sending data using the IrDA, just like if the PSP was a remote.
I tried sceIoWrite but it doesn't send anything.
			
			
									
									
						Sending IrDA Data
You've got to open the irda device first so you're writing to something.
Straight out of samples:
How do you know nothing is being sent, rather than the possibility that 
the rest of your program is crap?
Have you checked ir with a digital camera or webcam?
			
			
									
									
						Straight out of samples:
Code: Select all
int main(void)
{
	SceCtrlData pad;
	u32 buttonsold = 0;
	SetupCallbacks();
	pspDebugScreenInit();
	sceCtrlSetSamplingCycle(0);
	sceCtrlSetSamplingMode(PSP_CTRL_MODE_DIGITAL);
	int fd = sceIoOpen("irda0:", PSP_O_RDWR, 0);
	while (1) {
		// read pad and send it
		sceCtrlReadBufferPositive(&pad, 1);
		if (pad.Buttons != buttonsold) {
			unsigned char padHighbyte = pad.Buttons >> 8;
			sceIoWrite(fd, &padHighbyte, 1);
			buttonsold = pad.Buttons;
		}
		// check for pad info from other PSP
		unsigned char data;
		int len = sceIoRead(fd, &data, 1);
		int otherPad = data << 8;
		if (len == 1) {
			if (otherPad & PSP_CTRL_CIRCLE) printf ("CIRCLE pressed\n");
			if (otherPad & PSP_CTRL_CROSS) printf ("CROSS pressed\n");
			if (otherPad & PSP_CTRL_SQUARE) printf ("SQUARE pressed\n");
			if (otherPad & PSP_CTRL_TRIANGLE) printf ("TRIANGLE pressed\n");
		}
		
		sceDisplayWaitVblankStart(); 
	}
	return 0;
}
// By Shine
the rest of your program is crap?
Have you checked ir with a digital camera or webcam?