I tried to install Zymkey4 on RaspberryPi4 (Raspbian OS GNU/Linux 11), When I running the install script I got the error:
pi@raspberrypi:~/zk_sw $ curl -G https://s3.amazonaws.com/zk-sw-repo/install_zk_sw.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5234 100 5234 0 0 8401 0 --:--:-- --:--:-- --:--:-- 8401
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Err:3 https://zk-sw-repo.s3.amazonaws.com/apt-repo-bullseye-aarch64 bullseye InRelease
403 Forbidden [IP: 52.217.42.76 443]
Reading package lists... Done
E: Failed to fetch https://zk-sw-repo.s3.amazonaws.com/apt-repo-bullseye-aarch64/dists/bullseye/InRelease 403 Forbidden [IP: 52.217.42.76 443]
E: The repository 'https://zk-sw-repo.s3.amazonaws.com/apt-repo-bullseye-aarch64 bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details
Where I wrong?
I will be happy to any assistance
Thanks,
Ron
You will need to sort out your i2c problem first. The 8 flashes on the ZYMKEY means i2c is not communicating. The error from python when you attempt to import zymkey is also due to i2c communication failure. The example scripts will fail in the same manner.
A couple of things to check:
Power supply: You need a good Power Supply like the official Raspberry PI or Canakit. The PI4 needs 3.5A. A phone charge will not work. This is the most common problem we see.
Anything else using GPIO pins. Is the ZYMKEY the only device on your PI? The ZYMKEY needs exclusive use of GPIO4
Sometimes with Ubuntu 20.04, the automatic upgrade process interferes with a regular apt-get update, apt-get upgrade. Did the installation go smoothly or did you have to re-run, etc.
Hi all,
I installed my ZYmkey 4i on a Raspberry pi4b and it is getting this error for a library when I run the following test_zym.py script. Many thanks if you have some info on this.
So do I need to update that library?
Thanks, Luke
Traceback (most recent call last):
File "test_zym.py", line 4, in <module>
import zym
File "/home/pi/data-logger-v2/zym/src/zym.py", line 5, in <module>
import zymkey
File "/home/pi/.local/lib/python3.7/site-packages/zymkey/__init__.py", line 3, in <module>
from .module import Zymkey
File "/home/pi/.local/lib/python3.7/site-packages/zymkey/module.py", line 50, in <module>
raise ZymkeyLibraryError('unable to find {}, checked {}'.format(os.path.basename(ZYMKEY_LIBRARY_PATH), prefixes))
zymkey.exceptions.ZymkeyLibraryError: unable to find libzk_app_utils.so, checked ['/usr/lib/python3/dist-packages/usr/local/lib', '/usr/local/lib']
@luke Here’s a snippet of code that you can use to check that sign and verify are working. If this works, you have everything installed properly and need to sort out your side. If this doesn’t work, then I would suggest starting clean.
#!/usr/bin/python3
import zymkey
from zymkey.exceptions import VerificationError
if __name__ == "__main__":
# Example of sign() and verify()
secret_message = 'good'
print('Signing data...', end='')
signature = zymkey.client.sign(secret_message, slot=0)
print('OK\n')
print('Verifying good data...', end='')
zymkey.client.verify(secret_message, signature, raise_exception=True, pubkey_slot=0)
print('OK\n')
print('Verifying bad data...', end='')
try:
zymkey.client.verify('bad', signature)
except VerificationError:
print('Verification failed (Expected)')
else:
raise Exception('verification should have failed, but passed')
Thanks Bob, I have sorted out the issue. I was installing Zymbit directly in the folder when I should have just been using the CURL command. Issue solved.
We have outstanding build issues with the bullseye 64 bit repo unrelated to Zymbit. We added a workaround to use our buster64 repo. It works fine for bullseye 64 bit. Instead of our normal install script, run the following: