Re: Mydata how-to and bit of hacking ....
by wileur on Thu Mar 20, 2014 5:22 am
Hi, I've been following the discussions on this board for a while now and it's been very helpful in fixing up my TP9-UFP machine.
At work we have a bunch of older magazines without button and LEDs, that physically and electrically fit in the TP9-UFP but are not fully recognized. I'm trying to upgrade them and if this works out I'm planning to make a small adapter that fits in the PAL socket. I'll make my source code and PCB files freely available and my company will sell assembled modules.
After a bit of sniffing with a logic analyzer and reading old service manuals I've pinned down the communication protocol used by the magazines and have replicated most of it with a microcontroller. I've added a button and the indicator LEDs and the machine accepts and controls that. Everything works fine in service mode, but TPSys sends a command that seems like some kind of authentication. This is a 32bit? (8 nibbles) word and the magazine replies with a similar word. Some kind of calculation seems to be going on there as it takes ca 90ms from the command to the reply, whereas the replies to other requests are instantaneous. To further complicate things the computer seems first to send one command without requesting an answer, an then a little bit later it sends a new sequence and gets the answer. I'm now trying to figure out how the magazine comes up with the reply.
Some sample data:
8abbbc9e Command 1
aaffd8de Command 2
fe8cc664 Reply from Magazine
eccddca9
9bd8c99d
f10b3d05
fbcead88
8adaebcc
fa30626a
fa99cfff
acead8ac
a2830f14
fc8cdac8
9aaf9ebc
e20f05fd
This processing is handled in one of the two Altera EPM7000 series CPLDs (MAX 7000 series) clocked from a 1MHz crystal oscillator.
Ideas I've considered so far:
-Based on serial model/numer. But this is stored in a different, simpler PAL.
-XORing the commands. Doesn't give the right numbers
-Reading actual status data from the magazine. Not much to read there, just a couple of position sensors.
-Some kind of delay/timing as a base for the calculation. Timing in the this part of the machine doesn't seem that exact, based on my sniffing.
-Some other cryptographic algorithm?
-Simple multiplication/division etc. or a combination?
Any ideas on what's going on here are greatly appreciated.
Best reagrds,
Wileur