n5ac / mmsstv

MMSSTV LGPL source repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The "B/W 12" mode: wrong checksum

lpiconsulting opened this issue · comments

The issue regards to checksum of the VIS of the Robot B/W 12 mode. It concerns both the Tx and Rx. The affected application version is 1.13A

  1. Tx: in the Main.cpp file, lines 7089-7090:

     		case smRM12:
     			d = 0x86;
    

The VIS is assigned with wrong CRC. According to the "Image Communication on Short Waves, page 54" (https://www.sstv-handbook.com/download/sstv-handbook.pdf), the VIS of the "Robot B&W 12" is 5, 6 or 7 depending on a colour channel (R, G, B respectively), and G channel shall be chosen for monochrome images, which means that the VIS (without the checksum bit) = 6 (dec). The number 6 (dec) contains two 1 bits (0000110), so checksum shall be 0, and finally value of the VIS with the checksum bit shall be 0x06. The 0x86 value means that the binary value of the VIS with the checksum is 10000110, which means that the checksum bit is 1, which is wrong value.

  1. Rx in the sstv.cpp, lines 1997-1998

     							case 0x86:      // RM12
     								m_NextMode = smRM12;
    

Similarly, the wrong version of the VIS (with the checksum) is expected during receiving the SSTV image. It is 0x86, wherease it shall be 0x06.

The Rx issue affects in lack of VIS detection and loss of top of the decoded image. The Tx issue causes the wrong VIS encoding and lack of VIS detection is proper working SSTV decoders.