ChameleonMini icon indicating copy to clipboard operation
ChameleonMini copied to clipboard

USB stack problems

Open geo-rg opened this issue 6 years ago • 3 comments

tl;dr: Have a look at the end of this issue.

Currently we are using the LUFA CDC implementation for the USB interface which is for xmegas still experimental. We have experienced the following problems with that:

  1. When using the Chameleon as reader via the command send with a PC-side running python script, communication between card and Chameleon sometimes breaks down.
  2. When reading out the Chameleon as MF classic emulation, sometimes a sector cannot be read out.

We then have simply detached the Chameleon from the USB port and again tested both (for the first one, we tested a pre-programmed procedure) again and they worked nearly flawlessly. Also, we have seen on the scope, that when using the USB interface, sometimes a miller pulse sent from the Chameleon is a little bit too late. We conclude that the USB interface (and thus LUFA) sometimes breaks the timing while sending (or possibly also receiving) data.

We also tried to use the Atmel USB stack which made everything much worse. Also, on the ATxmega128A4U datasheet, there are no errata regarding the USB module.

So there are two messages for you to know:

  1. If you know anything we could do to solve this or have any suggestions, it would be great if you could write an answer here.
  2. If you want to emulate a card and eliminate the possibility of the USB interface breaking the timing, please use the Chameleon in battery mode without being connected to a PC.

geo-rg avatar Jul 26 '17 09:07 geo-rg

Any update on this issue? Using live mode gives bad nonces (compared to battery mode)

Peterthegreat avatar Apr 05 '18 21:04 Peterthegreat

We've had a big improvement with a recent update of the reader codec, which did not fix this problem completely, but has improved the reader ability (even with USB connection) a lot. Do you use the most recent version?

geo-rg avatar Apr 09 '18 06:04 geo-rg

Yes, I did check the latest version first. But I have to fix issue #131 first as I have a pretentious reader. I will get back to it in a few days. Thanks for the update

Peterthegreat avatar Apr 09 '18 10:04 Peterthegreat