Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when hard drive is in power save mode #8

Open
www-MKRD-info opened this issue Jan 20, 2018 · 1 comment
Open

Error when hard drive is in power save mode #8

www-MKRD-info opened this issue Jan 20, 2018 · 1 comment
Labels

Comments

@www-MKRD-info
Copy link

Hello,
If the HD is currently in power save mode, the following extensive but non-intuitive error is shown:
"Traceback (most recent call last):
File "./wdpassport-utils.py", line 428, in
main(sys.argv[1:])
File "./wdpassport-utils.py", line 412, in main
unlock()
File "./wdpassport-utils.py", line 199, in unlock
iteration,salt,hint = read_handy_store_block1()
File "./wdpassport-utils.py", line 142, in read_handy_store_block1
sector_data = read_handy_store(1)
File "./wdpassport-utils.py", line 94, in read_handy_store
data = py_sg.read(dev, _scsi_pack_cdb(cdb), BLOCK_SIZE)
py_sg.SCSIError: (1, 0, 8, 'p\x00\x02\x00\x00\x00\x00\n\x00\x00\x00\x00\x04\x01\x00\x00\x00\x00')
"
AFTER the error is shown, the hard drive starts coming out of Power Save mode. Then, the utility has to be re-run with the password again to be able to unlock the HD.

It would be nice if the HD was pinged (or say a random read request was requested) or some other method was used to bring it out of Power Save mode before utility tries to unlock the HD.

@0-duke 0-duke added the wontfix label Apr 12, 2020
@www-MKRD-info
Copy link
Author

0-duke, Yeah, minor issue still present in V0.2(2), but I see your won't fix tag.
I think it is resolvabe with a ping command or a longer time-out somehow specified by the script. Command literally bombs out only 2-3 seconds before the drive has woken up and is ready.

To others reading this, my "workaround" is as follows.

  1. If I think the drive has been used recently / I can tell it is not sleeping from faint noises or vibration, then I can try entering the unlock command and a password, at minor ""risk"" that I will waste the time entering a long password... If drive is not sleeping, it will unlock. If drive is sleeping, it takes a few seconds longer than the script tolerates, and the script bombs out.
  2. If I KNOW that the drive is sleeping and is locked (has not been used recently), I simply type a short and wrong password to wake the drive up.
  3. The command bombs out.
  4. I immediately up-arrow+Enter to re-enter the command, and by the time I am done typing my real and longer password, the drive is ready to be unlocked, and is unlocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants