Meteotime with Arduino

The second method for decoding the meteotime data stream is to use an arduino. Using this method you need to construct the bits into a format that can be used in the DES decoder. With this method the DES decoder is just software within the arduino, so that no meteotime decoder chip is needed.
Meteotime is a commercial business located in Switzerland. Their business model involves charging a licence fee for the decoding chip. Unfortunately by publishing this code this business model would be broken and this certainly is not my attention. So i will not be publishing the entire code. From an intellectual point of view the modified DES algorithm used is interesting so here are a few snippets. The first 14 bits from three consecutive minutes plus the final time makes a 82 bit string. From the 82 bits string you mis out bit 1 and 8. These are used by the civil defense system but are not needed for meteotime decoding. This leaves 80bits which make up the cipher and key. This is then processed by the arduino.

These are the two inputs that are needed by the DES algorithm. It then gives a plaintext output.
Plaintext = 0x16 0x50 0x62 0x02 0x36 <– This is decoded plaintext from DES decryption algorithm.
It is then manipulated to give checksum and Meteo data
Plaintext = 0x[1]6 0x[50] 0x6[2] 0x02 0x36
Plaintext = 0x2501 –> Its OK. The 0x2501 is needed for the data to be valid. This can be used by the arduino program to correct wrong error bits.
This involves repeatedly flipping one bit and looking for this 0x2501 answer. Assuming the 0x2501 is received then the other parts of the plaintext is the decrypted weather data. The time part of the 82 bits contain several parity checks and can also be compared to previous minute data so that you can assume this is accurate. The plaintext is manipulated first and then the 24 bits weather data is inverted bit by bit for each byte as follows.
result = 0x26 0x60 0x63
result = 00100110 01100000 01100011
result flip = 01100100 00000110 11000110 –> Meteo data output from DECHIFFRIER-IC
Below you can find an output from the Arduino program i have used which is a Meteotime DES encryption and decryption program. The encryption part can be used to encrypt weather data for instance received from METAR weather data on the internet . With a simple transmitter one can then send the appropriate time and weather data to a Meteotime receiver station and “program” the weather forecast.