So now i can comms with the device, however the CRC calculation does not work correctly... (I have 0 access to the Firmware) but the suppliers graciously gave us the CRC calculation in C++, which is as such
Code:
static unsigned BitsSet (unsigned char ch)
{
    unsigned n;
    n = 0;
    while (ch)
    {
        n += (ch & 1);
        ch >>= 1;
    }
    return(n);
}

unsigned CRCof (const char *message, unsigned len)
{
    unsigned i;
    unsigned crc;
    unsigned char k;
    crc = 0;
    for (i=0; i<len; i++)
    {
        k = (unsigned char)(message[i]) ^ crc;
        crc = (crc / 256) ^ (k*128) ^ (k*64);
        if ((BitsSet(k) & 1) != 0)
            crc ^= 0xC001;
        }
    return(crc);
}
Now my VB implementation
Code:
        Friend Function CRC(ByVal ParamArray Msg As Byte()) As Byte() 'CRC is 2 byte length
            Dim Result As UInt16 = 0
            Dim tmpB As Byte = 0
            Dim tmpint As Integer
            For tmpint = 0 To Msg.Length - 1
                tmpB = Msg(tmpint) Xor Result And &HFF
                Result = (Result \ 256) Xor (tmpB * 128) Xor (tmpB * 64)
                If ((BitsSet(tmpUint) And 1) <> 0) Then
                    Result = Result Xor &HC001
                End If
            Next
            CRC = ToByteArray(Result)
        End Function

        Friend Function BitsSet(ByVal data As UInt32) As Byte
            BitsSet = 0
            While data
                BitsSet += (data And 1)
                data >>= 1
            End While
        End Function
Now no matter what i send to the device it always reply's with CRC error "GL!ER20A624" (the last 4 digits are the modules calculated CRC)... And if i send the module some Garbage i get a Invalid request "GL!ER2166E5"..

now using my code i'm trying to replicate the CRC, with 0 luck ....

What have i converted incorrectly ???? I just cant see it.....