Serial Port on PSP checksum calculations
Serial Port on PSP checksum calculations
Well I am looking into writing software to communicate with the psp through the serial port. I need to know how the checksum for the rs232 transmision is calculated. I have found some stuff on it but it is for a device called a cybiko and they use 2 different checksums depending on the type of data being sent. Here is the link.http://www.devrs.com/cybiko/files/xferinfo.txt The checksum calculations are at the bottom. Thanks for any help.
What checksum?
If you're talking about emulating the PSP remote, see http://forums.ps2dev.org/viewtopic.php?t=986,
If you're just sending your own data, use whatever checksum you'd like, or just don't use one at all. There is no standard checksum or data format for RS232.
If you're talking about emulating the PSP remote, see http://forums.ps2dev.org/viewtopic.php?t=986,
If you're just sending your own data, use whatever checksum you'd like, or just don't use one at all. There is no standard checksum or data format for RS232.
But it said on this sitehttp://mc.pp.se/psp/phones.xhtml that the psp command packet looks like this.
it said xor of the cmd and params bytes. is it a checksum of one byte and it start initially with 0x00 or initially with the first byte of cmd or what?The PSP communicates with the microcontroller inside the remote control using RS232 serial communication (although the voltages are different of course, 0V and +2.5V) using 8N1 framing at 4800bps. The protocol consists of command packages which can be send by either the PSP or the remote control. A package is exchanged as follows:
Sender Receiver Explanation
0xF0 Request to transmit
0xF8 Clearance to transmit
0xFD Packet starts
cmd Command code + phase
params ... Zero or more bytes of parameter data
checksum XOR of the cmd and params bytes
0xFE Packet ends
0xFA/0xFB Packet received correctly
Go back and read what I said:d4rkn1c0n wrote:But it said on this sitehttp://mc.pp.se/psp/phones.xhtml that the psp command packet looks like this.
it said xor of the cmd and params bytes. is it a checksum of one byte and it start initially with 0x00 or initially with the first byte of cmd or what?The PSP communicates with the microcontroller inside the remote control using RS232 serial communication (although the voltages are different of course, 0V and +2.5V) using 8N1 framing at 4800bps. The protocol consists of command packages which can be send by either the PSP or the remote control. A package is exchanged as follows:
Sender Receiver Explanation
0xF0 Request to transmit
0xF8 Clearance to transmit
0xFD Packet starts
cmd Command code + phase
params ... Zero or more bytes of parameter data
checksum XOR of the cmd and params bytes
0xFE Packet ends
0xFA/0xFB Packet received correctly
That thread answers your question:jimparis wrote:If you're talking about emulating the PSP remote, see http://forums.ps2dev.org/viewtopic.php?t=986
mc wrote:After the command comes zero or more data bytes, depending on the command, and finaly a checksum, which is XOR of the command byte and all data bytes.