Giter Site home page Giter Site logo

Comments (12)

klali avatar klali commented on July 19, 2024

for completeness (or whatever) what version is the key (keys?) with problem?

/klas

from yubikey-personalization.

eworm-de avatar eworm-de commented on July 19, 2024

I have two Yubico Black Firmware 2.3.3 that fail. Yubico Neo Firmware 3.1.2 is fine.

from yubikey-personalization.

eworm-de avatar eworm-de commented on July 19, 2024

BTW, here is another report of the same problem:
http://forum.yubico.com/viewtopic.php?f=23&t=1115

Searching for Dell Lattitude E6530 shows this is an i7 Ivy Bridge system as well.

from yubikey-personalization.

sh1v4 avatar sh1v4 commented on July 19, 2024

Same problem here with a macbook pro (core i7) and yubikey nano used in challenge response mode both for login and screen unlock. The Yubikey appears to hang in random "timeout" errors even when it's repeatedly queried for version via ykinfo.

from yubikey-personalization.

klali avatar klali commented on July 19, 2024

@sh1v4 did you try this with the test programs @eworm-de pointed at? does his workaround work for you?

and I assume you run osX on that macbook? and if so, what is the exact error message?

/klas

from yubikey-personalization.

eworm-de avatar eworm-de commented on July 19, 2024

Uh, I just noticed I posted a broken link in my comment above... Should have been:
http://www.eworm.de/download/linux/yk_usleep.patch

I pushed a branch 'timing' to my forked project, that contains the fix as well.

For me it works perfectly reliable with the patch.

from yubikey-personalization.

klali avatar klali commented on July 19, 2024

So since I don't have hardware readily available to reproduce...

Did you track from what call the timeout is thrown when it happens? is it in _ykusb_write() or _ykusb_read() ? Did you try to increase the timeout (last parameter) on the libusb_control_transfer() call in the functions?

/klas

from yubikey-personalization.

eworm-de avatar eworm-de commented on July 19, 2024

If I remember correctly the timeout happens in ykusbread(). Looks like Yubikey is still busy processing whatever ykusbwrite() told it to do.

I will have to check changing timeout in libusb_control_transfer(). To be honest I did not bother after I had a workaround.

from yubikey-personalization.

eworm-de avatar eworm-de commented on July 19, 2024

No, increasing the timeout value in libusb_control_transfer() does not help. This is nanoseconds, no? Tried values up to 5000, nothing changed.

In contrast even a usleep(1) seems to be sufficient to fix the problem.

Just curious.... yk_wait_for_key_status() is called before reading the answer from Yubikey. I would expect it to report the key is not ready yet, delaying the read.

from yubikey-personalization.

klali avatar klali commented on July 19, 2024

yeah.. the timeout error is returned from yk_wait_for_key_status() if the yubikey doesn't trigger the expected result in time..

If you're familiar enough with gdb it'd be helpful with a stacktrace from a break at end of yk_wait_for_key_status() function.

/klas

from yubikey-personalization.

eworm-de avatar eworm-de commented on July 19, 2024

Thanks a lot!

from yubikey-personalization.

klali avatar klali commented on July 19, 2024

So to give some more context here..

Apparently the YubiKey might need a couple of hundred microseconds to get itself sorted on a write. Traditionally (I have no idea what timeframe I'm talking about here, but 2007-2008 is reasonable) a computer pushed about 1 usb packet every millisecond, with a newer computer we're seeing something on the order of 3 packets every millisecond. So the host needs to a wait bit after each write.

from yubikey-personalization.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.