===== 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:
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
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.
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
Better, but still gibberish to a human. A few #defines and a couple of switch statements later and I had version 4.
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
Odd.. there's no commands. Oh, they're smashed into the address? That's wierd. Well... version 5.
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
...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?