User Tools

Site Tools


tool:decyphering_mdb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tool:decyphering_mdb [2015/12/12 14:31] (current)
Line 1: Line 1:
 +===== Decyphering MDB =====
 +
 +I've got one Arduino ("​mdb"​) connected with the optoisolators,​ using hardware serial to talk to the VM.  I'm using software serial to talk to a second arduino ("​bridge"​) that's sending all the data via hardware serial to the PC running a serial terminal in Arduino software. ​ In effect mdb is passing everything to bridge to my computer. ​ Sample output version was binary garbage until we figured out the bridge software serial RX needed a pull-up resistor. ​ v2 I was getting binary data like this:
 +
 +<​code>​
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00110000 ​   00000001
 +00110000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00001000 ​   00000001
 +00001000 ​   00000000
 +00010000 ​   00000001
 +00010000 ​   00000000
 +00010000 ​   00000001
 +00010000 ​   00000000
 +00010000 ​   00000001
 +00010000 ​   00000000
 +01100000 ​   00000001
 +01100000 ​   00000000
 +01100000 ​   00000001
 +01100000 ​   00000000
 +01100000 ​   00000001
 +01100000 ​   00000000
 +01000000 ​   00000001
 +01000000 ​   00000000
 +01000000 ​   00000001
 +01000000 ​   00000000
 +01000000 ​   00000001
 +01000000 ​   00000000
 +01001000 ​   00000001
 +01001000 ​   00000000
 +01001000 ​   00000001
 +01001000 ​   00000000
 +01001000 ​   00000001
 +01001000 ​   00000000
 +01010000 ​   00000001
 +01010000 ​   00000000
 +01010000 ​   00000001
 +01010000 ​   00000000
 +01010000 ​   00000001
 +01010000 ​   00000000
 +00100000 ​   00000001
 +00100000 ​   00000000
 +00100000 ​   00000001
 +00100000 ​   00000000
 +00100000 ​   00000001
 +00100000 ​   00000000
 +</​code>​
 +
 +The mode and the data bytes were being sent in reverse! ​ I was sending the high byte last. :T  I flipped that around and added a bit of logic to display [address]: [message] and got this in version 3.
 +
 +<​code>​
 +00010000: 00010000
 +00010000: 00010000
 +01100000: 01100000
 +01100000: 01100000
 +01100000: 01100000
 +01000000: 01000000
 +01000000: 01000000
 +01000000: 01000000
 +01001000: 01001000
 +01001000: 01001000
 +01001000: 01001000
 +01010000: 01010000
 +01010000: 01010000
 +01010000: 01010000
 +00100000: 00100000
 +00100000: 00100000
 +00100000: 00100000
 +00001000: 00001000
 +00001000: 00001000
 +00001000: 00001000
 +00110000: 00110000
 +00110000: 00110000
 +00110000: 00110000
 +</​code>​
 +
 +Better, but still gibberish to a human. ​ A few #defines and a couple of switch statements later and I had version 4.
 +
 +<​code>​
 +Changer: CHK
 +Changer: CHK
 +Changer: CHK
 +Bill validator: CHK
 +Bill validator: CHK
 +Bill validator: CHK
 +Cashless Device #1: CHK
 +Cashless Device #1: CHK
 +Cashless Device #1: CHK
 +cashless device 2: CHK
 +cashless device 2: CHK
 +cashless device 2: CHK
 +universal satellite device 1: CHK
 +universal satellite device 1: CHK
 +universal satellite device 1: CHK
 +universal satellite device 2: CHK
 +universal satellite device 2: CHK
 +universal satellite device 2: CHK
 +universal satellite device 3: CHK
 +universal satellite device 3: CHK
 +universal satellite device 3: CHK
 +Display: CHK
 +Display: CHK
 +Display: CHK
 +</​code>​
 +
 +Odd.. there'​s no commands. ​ Oh, they'​re smashed into the address? ​ That's wierd. ​ Well... version 5.
 +
 +<​code>​
 +Changer: Self-reset
 +Changer: Self-reset
 +Changer: Self-reset
 +Bill validator: Self-reset
 +Bill validator: Self-reset
 +Bill validator: Self-reset
 +Cashless Device #1: Self-reset
 +Cashless Device #1: Self-reset
 +Cashless Device #1: Self-reset
 +Cashless device 2: Self-reset
 +Cashless device 2: Self-reset
 +Cashless device 2: Self-reset
 +Universal satellite device 1: Self-reset
 +Universal satellite device 1: Self-reset
 +Universal satellite device 1: Self-reset
 +Universal satellite device 2: Self-reset
 +Universal satellite device 2: Self-reset
 +Universal satellite device 2: Self-reset
 +Universal satellite device 3: Self-reset
 +Universal satellite device 3: Self-reset
 +Universal satellite device 3: Self-reset
 +Display: Self-reset
 +Display: Self-reset
 +Display: Self-reset
 +</​code>​
 +
 +...and that's as far as I'm gonna get tonight. ​ While I have this device plugged in the VM is insisting that it is out of service. ​ My theory is that the VMS thinks my silent peripheral is dead broke. ​ Have you seen this?
  
tool/decyphering_mdb.txt · Last modified: 2015/12/12 14:31 (external edit)