Skip to content

Instantly share code, notes, and snippets.

@rhaamo
Last active May 27, 2021 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhaamo/16440c51c659a8f232158f25362728ef to your computer and use it in GitHub Desktop.
Save rhaamo/16440c51c659a8f232158f25362728ef to your computer and use it in GitHub Desktop.
HTB MultiSystem MS80 wefax thing
from serial, a QByteArray &data, which qDebug prints as like :
whole data "\x00\x00\x00\x03\x80\x00\x00\xE0"
so I have packets list:
\x00
\x00
...
\x80
etc.
\x00 is ASCII for 0000 0000
\x03 .. 0000 0011
\xE0 .. 1110 0000
etc.
this is a 8bit pixel color (RRR GGG BB)
8-bit color pixel from wikipedia:
Bit 7 6 5 4 3 2 1 0
Data R R R G G G B B
The QByteArray is from the QSerial ->readAll().
One QByteArray .at(index) returns a char.
I need at the end to feed a QColor with RRR GGG and BB from the "char" of the QByteArray.
The whole data contains the buffer of the serial read, it's only a list of \x.. pixels colors.
The number of pixels per line, and lines are fixed.
Attached are the three pages of the manual (in italian) talking about the format (page 48).
Which doesn't tells a lot ...
---
About the logs:
Putty log: wefax_xxx.txt
Decoded picture of the log from fldigi using audio part: wefax_xxx.png
The TNC was using "wefax 1280", which means something like audio sampling, 1280/8 will be 160 bytes par second
Please note that the picture isn't properly aligned because of not able to get the phase properly for fldigi to do it.
So the decoded image from the .txt log might have the same issue.
Plus probable "slant" issue, which is resolved by padding the start and end of the "picture pixels list" to
shift the picture (you know there is X pixels per line, if padding from start or end it will move them, etc.).
Manual pages OCR of the wefax in italian is also included.
The parts "RECIZIONI IMMAGINI METEO-FAX" (47) and "PROGRAMMA DI TERMINALE VIDEO-FAX" (48) says things about the format.
But it's vague and I don't really understand.
My very super mega ultra gore code is here: https://dev.sigpipe.me/dashie/qTNC
===
RECEIVING METEO-FAX IMAGES
Given that the MS80 uses 1st door. VHF for the Weather-Fax reception, it will write:
CMD: MAXUSERS 0/1 (RET)
CMD: WEFAX 1280 (RET)
for the MS40, instead, it will be written only:
CMD: WEFAX 1280 (RET)
At this point the Weather-Fax terminal program must be loaded and, after appropriate tuning, the image reception will start.
48
The WEFAX X command induces the TNC to sample the incoming audio signal to
X samples per second. It is advisable to set X to multiples of 160, suggesting
an optimal value equal to 1280, thus ensuring synchronization with the Weather-Fax transmitter station.
If you notice a shift to the left of the image, you can change the TNC clock using the DAYTWEAK command.
The ABAUD command, previously, will have been set at a value of at least double X.
This will allow the terminal program to show or store each pixel bytes, and
to cope with the extra start / stop bits with respect to the 8 pixel bits per byte
(which they arrive at the speed of xxxx Baud). The XFLOWH command can also be used (see).
VIDEO-FAX TERMINAL PROGRAM
For the possible formation of a Video-Fax program, suggestions are given, also
useful for understanding the problems faced in the Video-Fax reception.
The basic prerequisites are: display images on the screen during reception, store them,
print them and clean the screen at any time.
HARDWARE. The resolution of the desired image depends on the capacity of RAM memory.
The HF stations provide 1800 lines of 600 pixels (elementary points of image),
which entails, with 8 pixels per byte, a total of 135 KBytes.
The screen, however, at best, it shows 200 lines of 640 pixels.
It will be appropriate to provide only 600 of the 1800 original lines, at 640 pixels, for an amount of 48 KBytes.
Therefore, of the 600 lines, it is considered one in three, and sampling will happen at a speed of 1280 bits. (It is noted that 1280 = 640 x 2).
LANGUAGE. A Video-Fax program, written in Basic, from poor results. It is therefore advisable to use the Assembler.
NOTATIONS. Bytes sent to the computer during Video-Fax reception include a bit. start, eight pixel-bits and one bit of ston.
The significant bit is the left one,
At the expected speed of 1280, via will be the transmission of 1280/8, that is 160 bytes per second.
RELEASE. It is necessary to have an EPSON or compatible printer, of the graphic type
ATTENTION, the reception of the FAX takes place on the gate R2, while the tuning of the signal occurs in the demodulator
which is connected to the gate RI, This entails that the inputs IN.
the two doors must be connected to each other when you want to receive the FAX.
The related instructions are at the bottom of page 63 of this manual.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment