bastibl / gr-keyfob

Transceiver for Hella wireless car key fobs.
172 stars 31 forks source link

Adding support for other hella keys #2

Closed JosephRedfern closed 8 years ago

JosephRedfern commented 8 years ago

Hi,

I tried gr-keyfob with a few Hella keys, and noticed that some did not work. After some patching (cout-ing everything), it turned out that the tail codes (for opening/closing etc) and the header codes varied for these keys.

I've hacked in receive support for these other header and tail codes here (currently missing head_short): https://github.com/JosephRedfern/gr-keyfob/commit/4c8f9557c2f8b3a777762b71f977359cd5f8e790.

I've tested this with a 2009 VW Golf (UK), and can confirm that it works. I think it also adds support for a 2014 Golf but can't currently confirm for sure.

My question is, do you have a preferred way for structuring the code to support these varying constants? I don't know how maintainable it will be to have lines like if(match(in + 81, tail_close, 8) || match(in+81, tail_close_alt, 8)) if support for more and more keys gets added.

Thanks, Joe

bastibl commented 8 years ago

Hi, great to hear that you managed to decoded your key. Since this is a hackish project, I have no strong opinion on how to integrate other codes. Another option would be to have a mode switch at for the decoder block. For now, I don't think it's really needed. Could you open a PR? I would be happy to merge your codes.

JosephRedfern commented 8 years ago

@bastibl I've submitted the PR -- if you don't want to merge yet due to incomplete data then I understand. I'll capture the tail_short and head_short codes ASAP.

If I come across any other keys using different codes again, then I will try adding mode-switch to keep things tidy-ish.

bastibl commented 8 years ago

sounds great. Thanks!