Used key fobs
#13
#14
#15
![Default](https://landroverforums.com/forum/images/icons/icon1.gif)
That is not true. Several of the scan tools can duplicate the data from the 6 digit code on the key. Now with a final couple of data points I can also.
Generating the codes is not that hard.
If anybody wants the original barcodes generate from the code on the back of the key I can crank them out.
If you don;t believe me, feel free to post several random 6 digit sequences. I can make a barcode and you can check them to prove...
thx
Generating the codes is not that hard.
If anybody wants the original barcodes generate from the code on the back of the key I can crank them out.
If you don;t believe me, feel free to post several random 6 digit sequences. I can make a barcode and you can check them to prove...
thx
#16
![Default](https://landroverforums.com/forum/images/icons/icon1.gif)
I spent a couple of hours researching and finally deciphering the algorithm to generate disco2 barcodes. I have written some Octave code to create the barcodes given an inner code and a prefix. My function, plipcodes, is posted below. But first, some caveats:
- The procedure produces correct barcodes for all the valid barcode examples that I could find via a google search, mostly from Youtube videos showing how a Nanocom (or similar device) is used to program keys. I did find a few hits that reported bad codes.
Here are my examples:
1. Inner code: 26AFA7
Reported barcodes:
*G26AFA726AFA6FFG*
*FFFFFFFFD95058V*
plipcodes output:
octave:2> [code1,code2] = plipcodes('G','26AFA7')
code1 = *G26AFA726AFA6FFG*
code2 = *FFFFFFFFD95058V*
2. Inner code: 404223
Reported barcodes:
*J404223404222FFZ*
*FFFFFFFFBFBDDCN*
plipcodes output:
octave:3> [code1,code2] = plipcodes('J','404223')
code1 = *J404223404222FFZ*
code2 = *FFFFFFFFBFBDDCN*
- The first code starts with a letter that cannot be gleaned from the inner code. I suspect that this letter indicates the market for the FOB (North America, Europe, etc.) but I have no way to verify this. All of the keys that I have seen example codes for start with 'G' or 'J'. If anyone has information about this letter I would appreciate learning about it.
- I still cannot get my Hawkeye to program a used key using my generated codes.
I have a key that used to work, but stopped and has possibly "lost sync." I generated the barcodes using my algorithm and then used the Hawkeye to program those codes, but no luck. Unlike the Nanocom, the Hawkeye does not support a separate "sync key" function that may explain the failure. BearMach (the makers of the Hawkeye) do not claim to be able to program used keys.
- The function below is written for Octave, a Matlab-like program available free from http://www.gnu.org/software/octave/download.html.
To use this function, save the text below into a file called plipcodes.m and start Octave. Change the current working directory to the one that contains the new file. Then try a command like one of the examples above.
# This function generates the Land Rover barcodes
# for a Discovery II remote
# Input: prefix letter and inner code from sticker inside the key fob as strings
# Output: Two codes for use with a programming tool
# Example: [code1,code2] = plipcodes('G','26AFA7')
# code1 = *G26AFA726AFA6FFG*
# code2 = *FFFFFFFFD95058V*
# Copyright Brad Ramsey 4 April 2013
# This program is free for non-commercial use. *For commercial use please send an email to bradley.ramsey at gmail.com
# Revision History
# 3 April 2013: Added a missing space character to the code39 character set.
# Added the ability to compute codes from an inner code that ends in a '0'
# 4 April 2013: Fixed decrement string length bug
function [code1Str,code2Str] = plipcodes(prefix,innercode)
#Generate the first code
if size(innercode) != 6
disp('Code is not 6 chars [0-9,A-F]')
return;
end
innercode = toupper(innercode);
decrementedValStr = ['0' dec2hex(hex2dec(innercode)-1)];
buildStr = ['*' prefix innercode decrementedValStr(end-5:end) 'FF'];
# Generate the check character based on the code 39 barcode standard
code39Chars = ['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%'];
code39Sum=0;
for i = 2:16
charVal = findstr(buildStr(i),code39Chars)-1;
code39Sum = code39Sum + charVal;
end
checkVal = mod(code39Sum,43);
checkChar = code39Chars(checkVal+1);
code1Str = [buildStr checkChar '*'];
#code1StrHawkeye = [buildStr '*']
# Generate the second code
build2Str = "*FFFFFFFF";
invertedInnerCode = dec2hex(bitxor(hex2dec(innercode),hex2dec('FFFFFF' )));
build2Str = [build2Str invertedInnerCode];
# Generate the check character based on the code 39 barcode standard
code39Sum=0;
for i = 2:15
charVal = findstr(build2Str(i),code39Chars)-1;
code39Sum = code39Sum + charVal;
end
#code39Sum
checkVal = mod(code39Sum,43);
checkChar = code39Chars(checkVal+1);
code2Str = [build2Str checkChar '*'];
#code2StrHawkeye = [build2Str '?*']
- The procedure produces correct barcodes for all the valid barcode examples that I could find via a google search, mostly from Youtube videos showing how a Nanocom (or similar device) is used to program keys. I did find a few hits that reported bad codes.
Here are my examples:
1. Inner code: 26AFA7
Reported barcodes:
*G26AFA726AFA6FFG*
*FFFFFFFFD95058V*
plipcodes output:
octave:2> [code1,code2] = plipcodes('G','26AFA7')
code1 = *G26AFA726AFA6FFG*
code2 = *FFFFFFFFD95058V*
2. Inner code: 404223
Reported barcodes:
*J404223404222FFZ*
*FFFFFFFFBFBDDCN*
plipcodes output:
octave:3> [code1,code2] = plipcodes('J','404223')
code1 = *J404223404222FFZ*
code2 = *FFFFFFFFBFBDDCN*
- The first code starts with a letter that cannot be gleaned from the inner code. I suspect that this letter indicates the market for the FOB (North America, Europe, etc.) but I have no way to verify this. All of the keys that I have seen example codes for start with 'G' or 'J'. If anyone has information about this letter I would appreciate learning about it.
- I still cannot get my Hawkeye to program a used key using my generated codes.
I have a key that used to work, but stopped and has possibly "lost sync." I generated the barcodes using my algorithm and then used the Hawkeye to program those codes, but no luck. Unlike the Nanocom, the Hawkeye does not support a separate "sync key" function that may explain the failure. BearMach (the makers of the Hawkeye) do not claim to be able to program used keys.
- The function below is written for Octave, a Matlab-like program available free from http://www.gnu.org/software/octave/download.html.
To use this function, save the text below into a file called plipcodes.m and start Octave. Change the current working directory to the one that contains the new file. Then try a command like one of the examples above.
# This function generates the Land Rover barcodes
# for a Discovery II remote
# Input: prefix letter and inner code from sticker inside the key fob as strings
# Output: Two codes for use with a programming tool
# Example: [code1,code2] = plipcodes('G','26AFA7')
# code1 = *G26AFA726AFA6FFG*
# code2 = *FFFFFFFFD95058V*
# Copyright Brad Ramsey 4 April 2013
# This program is free for non-commercial use. *For commercial use please send an email to bradley.ramsey at gmail.com
# Revision History
# 3 April 2013: Added a missing space character to the code39 character set.
# Added the ability to compute codes from an inner code that ends in a '0'
# 4 April 2013: Fixed decrement string length bug
function [code1Str,code2Str] = plipcodes(prefix,innercode)
#Generate the first code
if size(innercode) != 6
disp('Code is not 6 chars [0-9,A-F]')
return;
end
innercode = toupper(innercode);
decrementedValStr = ['0' dec2hex(hex2dec(innercode)-1)];
buildStr = ['*' prefix innercode decrementedValStr(end-5:end) 'FF'];
# Generate the check character based on the code 39 barcode standard
code39Chars = ['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%'];
code39Sum=0;
for i = 2:16
charVal = findstr(buildStr(i),code39Chars)-1;
code39Sum = code39Sum + charVal;
end
checkVal = mod(code39Sum,43);
checkChar = code39Chars(checkVal+1);
code1Str = [buildStr checkChar '*'];
#code1StrHawkeye = [buildStr '*']
# Generate the second code
build2Str = "*FFFFFFFF";
invertedInnerCode = dec2hex(bitxor(hex2dec(innercode),hex2dec('FFFFFF' )));
build2Str = [build2Str invertedInnerCode];
# Generate the check character based on the code 39 barcode standard
code39Sum=0;
for i = 2:15
charVal = findstr(build2Str(i),code39Chars)-1;
code39Sum = code39Sum + charVal;
end
#code39Sum
checkVal = mod(code39Sum,43);
checkChar = code39Chars(checkVal+1);
code2Str = [build2Str checkChar '*'];
#code2StrHawkeye = [build2Str '?*']
Last edited by brad_ramsey; 04-04-2013 at 12:20 PM. Reason: bug fix
#17
![Default](https://landroverforums.com/forum/images/icons/icon1.gif)
- I still cannot get my Hawkeye to program a used key using my generated codes.
I have a key that used to work, but stopped and has possibly "lost sync." I generated the barcodes using my algorithm and then used the Hawkeye to program those codes, but no luck. Unlike the Nanocom, the Hawkeye does not support a separate "sync key" function that may explain the failure. BearMach (the makers of the Hawkeye) do not claim to be able to program used keys.
I have a key that used to work, but stopped and has possibly "lost sync." I generated the barcodes using my algorithm and then used the Hawkeye to program those codes, but no luck. Unlike the Nanocom, the Hawkeye does not support a separate "sync key" function that may explain the failure. BearMach (the makers of the Hawkeye) do not claim to be able to program used keys.
If your codes are correct, you should be able to use hawkeye to program them. One thing to note, is that you have to enter to asterisks and when you get to the very end, hawkeye might expect a couple more characters. You can leave them the default of whatever pops up. I think it uses the last asterisk as the delimiter, so that it ignores anything after it.
#19
![Default](https://landroverforums.com/forum/images/icons/icon1.gif)
An Autologic can program them from the numbers in the fob: http://www.autologic-diagnostics.com...rogramming.pdf
A hawkeye or nonocom can be had for $500 or less. Though the nanocom might be able to do the same thing that autologic does, program keys with just the 6 digit code. But if you already have a hawkeye, an algorithm like this is great.
#20
![Default](https://landroverforums.com/forum/images/icons/icon1.gif)
I've programmed used (my original) keys twice with my hawkeye. Once because I replaced the BCU and once because my other rover got confused in the BCU. But I had to get the number from threalassmikeg. (thanks!)
If your codes are correct, you should be able to use hawkeye to program them. One thing to note, is that you have to enter to asterisks and when you get to the very end, hawkeye might expect a couple more characters. You can leave them the default of whatever pops up. I think it uses the last asterisk as the delimiter, so that it ignores anything after it.
If your codes are correct, you should be able to use hawkeye to program them. One thing to note, is that you have to enter to asterisks and when you get to the very end, hawkeye might expect a couple more characters. You can leave them the default of whatever pops up. I think it uses the last asterisk as the delimiter, so that it ignores anything after it.
Second, I'm wondering if I'm missing a step in using the Hawkeye. After the "Programming Key" message appears on the display, what do you do next? Do you have to press a button on the fob?
Thanks,
Brad