Service Status

All services are running as normal.

IPv4 access was restored from provider.

IPv6 access is now restored for Telnet, SSH (BBS and File Areas), and BinkP.

There is currently no major planned downtime.

Calculate the OBD CRC Packet VB6

Home/Code/Calculate the OBD CRC Packet VB6

Calculate the OBD CRC Packet VB6

Function CalcCRC(s() As Byte) As Byte
   checksum = 0
   crcreg = 255
   length = UBound(s) - LBound(s)
   For i = 1 To length
       bitpoint = 128
       x = s(i)
       For k = 0 To 7
           If bitpoint And x Then
               If crcreg And 128 Then
                   poly = 1
                   poly = 28
               End If
               crcreg = (((crcreg * 2) Or 1) Xor poly) And 255
               If crcreg And 128 Then
                   poly = 29
                   poly = 0
               End If
               crcreg = ((crcreg * 2) Xor poly) And 255
           End If
           bitpoint = bitpoint \ 2
       Next k
   CalcCRC = (Not crcreg) And 255
End Function

VB6 function, (place it in a module) that will calculate the crc hex packet to use with the BR-3 OBDII unit.

By |June 19th, 2010|0 Comments

About the Author:

Systems Administrator and hardware hacker who hates social media and posts stuff on this site when he feels like it. That's really about it.

Leave A Comment