| View previous topic :: View next topic |
| Author |
Message |
d4rkn1c0n
Joined: 21 Sep 2006 Posts: 2
|
Posted: Thu Sep 21, 2006 12:03 pm Post subject: 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. |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Thu Sep 21, 2006 1:48 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
d4rkn1c0n
Joined: 21 Sep 2006 Posts: 2
|
Posted: Fri Sep 22, 2006 12:31 am Post subject: |
|
|
But it said on this sitehttp://mc.pp.se/psp/phones.xhtml that the psp command packet looks like this.
| Quote: |
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 |
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? |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Fri Sep 22, 2006 3:33 am Post subject: |
|
|
| d4rkn1c0n wrote: | But it said on this sitehttp://mc.pp.se/psp/phones.xhtml that the psp command packet looks like this.
| Quote: |
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 |
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? |
Go back and read what I said:
That thread answers your question: | 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.
|
|
|
| Back to top |
|
 |
|