-1

Message:

R:<ENQ> 
S:<ACK> 
R:<STX>1H|\^&|||9163500014<CR><ETX>56<CR><LF> 
S:<ACK> 
R:<STX>2P|1||42670070||Meir Anna||19740410|F<CR><ETX>48<CR><LF>
S:<ACK> 
R:<STX>3O|1|||^^^HBsAg<CR><ETX>72<CR><LF> 
S:<ACK> 
R:<STX>4R|1|^^^HBsAg|0.059||<CR><ETX>EE<CR><LF> 
S:<ACK> 
R:<STX>5P|2||43681136||Mueller^Fritz||19940428|M<CR><ETX>3E<CR><LF> 
S:<ACK> 
R:<STX>6O|1|||^^^HBsAg<CR><ETX>75<CR><LF> 
S:<ACK> 
R:<STX>7R|1|^^^HBsAg|59.882||<CR><ETX>33<CR><LF> 
S:<ACK> 
R:<STX>0L|1|N<CR><ETX>03<CR><LF>
S:<ACK> 
R:<EOT>

Upon this message I am getting checksum for all segments correctly except 5P segment. When I generating checksum for this segment generated checksum does not matches with given checksum (3E) I am getting 7C.

For checksum:

The checksum is encoded as two characters sent after the or character. The checksum includes the first character after (the frame number) up to and including or . It is computed by adding the binary values of the characters, keeping the least significant eight bits of the result.

I don't understand what is the problem? Is this message problem or any thing else? I am using Java.

Jeffrey Bosboom
  • 13,313
  • 16
  • 79
  • 92
asdf
  • 1
  • 4

1 Answers1

0

Your question is lacking some context information. This way it is really difficult to answer.

Have you checked for German umlauts? Your 5P segment seems error prone with special characters: Mueller^Fritz

Sebastian
  • 395
  • 2
  • 7