• Steel Soldiers now has a few new forums, read more about it at: New Munitions Forums!

  • Microsoft MSN, Live, Hotmail, Outlook email users may not be receiving emails. We are working to resolve this issue. Please add support@steelsoldiers.com to your trusted contacts.

AMMPS Generator Series Remote Data

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
What I have so far in an Excel file today with set running and loads on L1 & L2, RS-232 data captured and decoded.
Serial Data Baud Rate between DCS & PC 115,200 over 100' of CAT5 cable
1701383717077.png


Remote Screen at almost the same time for comparison
1701383371686.png
 
Last edited:

Icesythe7

Active member
147
223
43
Location
Indiana, USA
I believe Battery Voltage = D1 8 is really D1 B Typo?
yep was a typo i fixed it, that B1 28 corresponds to "ON" number 4 on your sheet, im gonna guess it battle short u will have to test to see if the response is a 1 with battle short on


C++:
if ( CParamDataModel2::GetEnumIndex((CWnd *)((char *)v112 + 212), 0x28B1u) )
      v9 = "ON";
    else
      v9 = off_E2824C;
 
Last edited:

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
yep was a typo i fixed it, that B1 28 corresponds to "ON" number 4 on your sheet, im gonna guess it battle short u will have to test to see if the response is a 1 with battle short on


C++:
if ( CParamDataModel2::GetEnumIndex((CWnd *)((char *)v112 + 212), 0x28B1u) )
      v9 = "ON";
    else
      v9 = off_E2824C;
I'll try and test that tomorrow. I just shut my 1030 down for the night.
 

Icesythe7

Active member
147
223
43
Location
Indiana, USA
I'll try and test that tomorrow. I just shut my 1030 down for the night.
also
C++:
if ( CParamDataModel2::GetEnumIndex((CWnd *)((char *)v112 + 212), 0x2C9Cu) == 2 )
    {
      v97 = CParamDataModel2::GetValue((int)v93, 0x104F);
      v95 = v97;
      v113 = 19;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::operator=((char *)v112 + 2012, v97);
      v113 = -1;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>(v93);
    }
    else
    {
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::operator=((char *)v112 + 0x7DC, "Open");
    }
9C 2C (34 on list) may be contactor or switch box? also no rush just posting stuff for you to test when u get time

8A 11 and 89 11 and 6 4 are something to do with the genset configuration message
C++:
if ( (unsigned __int8)sub_DD1DBB("0", (char *)v112 + 2000)
      || (unsigned __int8)ATL::CSimpleStringT<char,1>::IsEmpty((char *)v112 + 0x7D0) )
    {
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::operator=(
        (char *)v112 + 2028,
        "Genset Configuration: ");
      v85 = CParamDataModel2::GetValue((int)v81, 0x118A);
      v83 = v85;
      v113 = 21;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::operator+=((char *)v112 + 2028, v85);
      v113 = -1;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>(v81);
      v79 = CParamDataModel2::GetValue((int)v69, 0x1189);
      v77 = v79;
      v113 = 22;
      v75 = MessageBox(v71, ", ", v79);
      v73 = v75;
      LOBYTE(v113) = 23;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::operator=((char *)v112 + 2032, v75);
      LOBYTE(v113) = 22;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>(v71);
      v113 = -1;
      ATL::CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>::~CStringT<char,StrTraitMFC_DLL<char,ATL::ChTraitsCRT<char>>>(v69);
      v67 = CParamDataModel2::GetValue((int)v57, 0x406);
      v65 = v67;
      v113 = 24;
      v63 = MessageBox(v59, ", ", v67);
44 48 i think is something to do with maintenance
 
Last edited:

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
I did some work today looking at the beginning of the handshake between the PC and DCS while the Remote Monitor in establishing a connection to the DCS.
Initially the PC sends out some bytes at 2,400 baud. No response from the DCS. PC then sends out the same bytes at 4,800 baud. Again, no DCS response. PC then sends the same bytes out at 9,600 baud. Again, no DCS response. PC then sends out 6 bytes (same?) at 19,200 baud and the DCS responds at 19,200. Again the PC sends 5 bytes at 19,200 baud and the DCS responds at 19,200 The PC then sends out bytes at 115,200 and the DCS responds at 115,200. I believe after that all data back and forth is at 115,200.
Will dig into it more this weekend.
 

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
Sequence captured during changing baud rate
PC Data 2,400 83 3 0 0 1 81
PC Data 4,800 83 3 0 0 1 81
PC Data 9,600 83 3 0 0 1 81
PC Data 19,200 83 3 0 0 1 81
DCS Data 19,200 E0 0 1 46 C4
PC Data 19,200 86 2 4 0 80
DCS Data 19,200 6 0 6
PC Data 115,200 93 2 62 29 DA
DCS Data 115,200 93 1 0 92

Working to capture additional data after that
 

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
More robot porn :LOL:

There certainly is a lot of back and forth between the PC and the DCS! Just a bit of what I captured today. Just part of it below.
Need to switch to a bigger processor with more RAM like an ESP32 to capture more data.
Each PC transmission is replied to with a subsequent response from the DCS at 19,200 baud and up.

PC Data 2,400 83 3 0 0 1 81
PC Data 4,800 83 3 0 0 1 81
PC Data 9,600 83 3 0 0 1 81
PC Data 19,200 83 3 0 0 1 81
DCS Data 19,200 30 1 46 C4
PC Data 19,200 86 2 4 0 80
DCS Data 19,200 6 0 6
PC Data 115,200 93 2 62 29 DA
DCS Data 115,200 93 1 0 92

All data after this is at 115,200 baud. Baud rate comments eliminated.
Included are transmitted XOR checksums and calculated XOR checksum based on data received to spot transmission/reception errors. Clean :)

PC Data 93 2 8 0 99 Chksum = 99
DCS Data 93 1 65 F7 Chksum = F7
PC Data 93 2 2 0 93 Chksum = 93
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 5 0 94 Chksum = 94
DCS Data 93 41 4D 50 43 33 33 33 30 30 30 30 31 36 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8A Chksum = 8A
PC Data 93 2 8E 1 1E Chksum = 1E
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 BA 22 9 Chksum = 9
DCS Data 93 2 0 0 91 Chksum = 91
PC Data 93 2 BB 22 8 Chksum = 8
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 6B 20 DA Chksum = DA
DCS Data 93 2 0 0 91 Chksum = 91
PC Data 93 2 D9 22 6A Chksum = 6A
DCS Data 93 2 C FE 63 Chksum = 63
PC Data 93 2 DA 22 69 Chksum = 69
DCS Data 93 2 F4 1 64 Chksum = 64
PC Data 93 2 16 21 A6 Chksum = A6
DCS Data 93 2 F2 FF 9C Chksum = 9C
PC Data 93 2 98 23 2A Chksum = 2A
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 8D 1 1D Chksum = 1D
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 9E 23 2C Chksum = 2C
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 47 23 F5 Chksum = F5
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 4F 10 CE Chksum = CE
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 4D 10 CC Chksum = CC
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 9D 23 2F Chksum = 2F
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 31 23 83 Chksum = 83
DCS Data 15 0 15 Chksum = 15
PC Data 99 4 8A 2 FE FF 14 Chksum = 14
DCS Data 99 30 2D A 0 2 2 4 1 15 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 9E Chksum = 9E
PC Data 99 4 8A 2 FF FF 15 Chksum = 15
DCS Data 99 5A 29 23 2E 23 56 2 88 17 47 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 28 23 3A 23 6B Chksum = 6B
PC Data 93 2 EC 1 7C Chksum = 7C
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 35 23 87 Chksum = 87
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 2A 2C 97 Chksum = 97
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 6A 20 DB Chksum = DB
DCS Data 93 2 0 0 91 Chksum = 91
PC Data 93 2 1F 3 8D Chksum = 8D
DCS Data 93 2 A 0 9B Chksum = 9B
PC Data 93 2 3E 10 BF Chksum = BF
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 89 11 9 Chksum = 9
DCS Data 93 1 2 90 Chksum = 90
PC Data 93 2 5C 29 E4 Chksum = E4
DCS Data 93 4 0 0 0 0 97 Chksum = 97
PC Data 99 4 EF 1 FE FF 72 Chksum = 72
DCS Data 99 2F 2C 2 0 15 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 8C Chksum = 8C
PC Data 99 4 EF 1 FF FF 73 Chksum = 73
DCS Data 99 58 47 23 56 2 F8 36 A8 37 8B 20 A9 D 8 2 12 2 F 2 13 2 10 2 14 2 11 2 7 4 D1 B 7F C 6A 20 BA 22 86 20 B5 20 28 28 14 37 16 37 3C 37 3E 37 64 37 66 37 AB 37 D2 37 F9 37 49 38 AB D 16 21 83 F 81 13 44 38 5B 0 8E 1 8F 1 9D 11 2C 2C 89 11 8A 11 65 10 62 Chksum = 62
PC Data 93 2 CF 17 49 Chksum = 49
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 8 2 9B Chksum = 9B
DCS Data 93 2 F8 FF 96 Chksum = 96
PC Data 93 2 90 11 10 Chksum = 10
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 91 11 11 Chksum = 11
DCS Data 93 1 1 93 Chksum = 93
PC Data 99 4 7 2 FE FF 99 Chksum = 99
DCS Data 99 32 2F 2 0 15 2 1 4 4 4 4 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 95 Chksum = 95
PC Data 99 4 7 2 FF FF 98 Chksum = 98
DCS Data 99 5E 47 23 66 23 98 23 F4 1 56 2 F8 36 A8 37 8B 20 A9 D 8 2 12 2 F 2 13 2 10 2 14 2 11 2 7 4 D1 B 7F C 6A 20 BA 22 86 20 B5 20 28 28 14 37 16 37 3C 37 3E 37 64 37 66 37 AB 37 D2 37 F9 37 49 38 AB D 16 21 83 F 81 13 44 38 5B 0 8E 1 8F 1 9D 11 2C 2C 89 11 8A 11 65 10 6F Chksum = 6F
PC Data 93 2 D2 17 54 Chksum = 54
DCS Data 93 1 0 92 Chksum = 92
PC Data 93 2 BC 2 2F Chksum = 2F
DCS Data 93 4 EA 59 2 0 26 Chksum = 26
PC Data 93 2 66 23 D4 Chksum = D4
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 27 25 93 Chksum = 93
DCS Data 93 2 32 0 A3 Chksum = A3
PC Data 93 2 21 25 95 Chksum = 95
DCS Data 93 2 9 0 98 Chksum = 98
PC Data 93 2 D5 20 64 Chksum = 64
DCS Data 93 2 D2 0 43 Chksum = 43
PC Data 93 2 D5 7 43 Chksum = 43
DCS Data 93 2 58 1B D2 Chksum = D2
PC Data 93 2 10 3 82 Chksum = 82
DCS Data 93 2 F 0 9E Chksum = 9E
PC Data 93 2 E 3 9C Chksum = 9C
DCS Data 93 2 A 0 9B Chksum = 9B
PC Data 93 2 5E 39 F6 Chksum = F6
DCS Data 93 2 E8 3 7A Chksum = 7A
PC Data 93 2 A1 23 13 Chksum = 13
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 57 29 EF Chksum = EF
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 58 29 E0 Chksum = E0
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 59 29 E1 Chksum = E1
DCS Data 15 0 15 Chksum = 15
PC Data 93 2 80 23 32 Chksum = 32
...
 

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
@Icesythe7 @R1ckyb0nd
Fruitful day with the ESP32 :)
I was able to capture ALL the handshaking between the Remote Monitor PC program and the DCS during the start of the "Connect" up to including a few blocks of 44 parameter requests and 44 DCS responses. Woot woot!
I did a couple of captures and all data back and forth was during the handshaking 100% the same.
 

R1ckyb0nd

Member
47
11
8
Location
Ct
@Icesythe7 @R1ckyb0nd
Fruitful day with the ESP32 :)
I was able to capture ALL the handshaking between the Remote Monitor PC program and the DCS during the start of the "Connect" up to including a few blocks of 44 parameter requests and 44 DCS responses. Woot woot!
I did a couple of captures and all data back and forth was during the handshaking 100% the same.
That is awesome, now are you going to be able to write a small script that simulates this.
 

Icesythe7

Active member
147
223
43
Location
Indiana, USA
That is awesome, now are you going to be able to write a small script that simulates this.
Yea its very trivial, my library makes it pretty easy

C++:
int main() {
    bool is_connected = false;

    while (!is_connected) {
        std::cout << "Please choose a port number to connect." << std::endl;
        int user_port;
        std::cin >> user_port;
        is_connected = emu.connect(static_cast<uint8_t>(user_port));
        if (!is_connected) {
            std::cout << "Failed to connect...please try again." << std::endl;
        }
    }

    while (true) {
        const uint8_t command = emu.read();
        printf("Received command -> 0x%02X\n", command);

        switch (command) {
        case 0x83:
            emu.handshake();
            break;
        case 0x86:
            emu.handshake();
            break;
        case 0x93:
            emu.respond();
            break;
        default:
            emu.unknownCommand(command);
            break;
        }
    }
}
Just wait for 1 byte and dispatch it to the proper handler and respond accordingly in the handler, this is the temporary testing "respond" func i have atm...when all data is known can pretty it all up and use an enum with everything named

C++:
    bool respond() const {
        std::vector<uint8_t> data;
        std::vector<uint8_t> response;
        const uint8_t size = read();
        data.resize(size + 1);
        for (int i = 0; i < size + 1; ++i) {
            data[i] = read();
        }
        data.pop_back();
        printf("Command 0x93 contains -> [%s]\n", toString(data).c_str());
        //temp
        if (data[0] == 0x62 && data[1] == 0x29) {
            response.push_back(0x00);
            return write(0x93, response);
        }

        if (data[0] == 0x08 && data[1] == 0x00) {
            response.push_back(0x01);
            response.push_back(0x06);
            return write(0x93, response);
        }

        return write(0x93, data);
    }
 

R1ckyb0nd

Member
47
11
8
Location
Ct
@Icesythe7 @R1ckyb0nd
Fruitful day with the ESP32 :)
I was able to capture ALL the handshaking between the Remote Monitor PC program and the DCS during the start of the "Connect" up to including a few blocks of 44 parameter requests and 44 DCS responses. Woot woot!
I did a couple of captures and all data back and forth was during the handshaking 100% the same.
Can you share the capture to our gmail?
 

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
I also want to capture the Remote Monitor "disconnect" communications.

Still waiting on delivery of the 2 pins needed to add to my DCS P3 so I can take a look at what's happening on the CAN bus.
 

kloppk

Well-known member
Steel Soldiers Supporter
2,161
3,586
113
Location
Pepperell, Massachusetts
I've been looking at the various time delays between data transmissions from the PC. So far I've seen everything from 7ms to 2 seconds or so during the initial handshaking requests and parameter requests.
edit: deleted stuff on bad checksums. Updating in upcoming post
The journey continues..
 
Last edited:

Icesythe7

Active member
147
223
43
Location
Indiana, USA
Are you almost at a point where we can compile this then send the signals to the generator and display what comes back
I can in the software but im emulating the generator, I dont have a genset to make an emulator for the software, that side of things is up to kloppk he has a 1030 xd
 

Icesythe7

Active member
147
223
43
Location
Indiana, USA
I've been looking at the various time delays between data transmissions from the PC. So far I've seen everything from 7ms to 2 seconds or so during the initial handshaking requests and parameter requests.
Weird thing I spotted. After the handshaking appears over the PC requests the 44 parameters. The responses from the DCS for the first group of 44 are what appear as longer than normal responses and appear to have lots of checksum errors. The next groups of 44 request from the PC causes the DCS to return normal values and all good checksums. Subsequent requests result in good data from the DCS.
Not sure why the first 44 requests get crap responses from the DCS.
The journey continues..
Ya something is weird in the code on initial connection, it seems it starts comms on the ui thread and then spawns a new thread just for comms and uses that from then forward, but only after it has requested data the first time...not sure if an oversight or intended but that may describe why it is doing weird stuff on initial data request.
 
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website like our supporting vendors. Their ads help keep Steel Soldiers going. Please consider disabling your ad blockers for the site. Thanks!

I've Disabled AdBlock
No Thanks