Still Zymkey flashing after installation

Im new to IoT devices, Pls help me to get this work

First i installed the services by following steps in documentation
RPI restarted after installation, but Zymkey still flashes rapidly which indicated not bound correctly.

Also, i couldn’t run the test files because they are not available in the directory. I inserted them manually and tried but got an error

These are zkifc logs

 sudo journalctl -u zkifc
Dec 23 04:43:12 raspberrypi systemd[1]: Starting zkifc.service - Zymkey Interface Connector...
Dec 23 04:43:12 raspberrypi bash[3130]: chown: warning: '.' should be ':': ‘zymbit.zymbit’
Dec 23 04:43:12 raspberrypi systemd[1]: Started zkifc.service - Zymkey Interface Connector.
Dec 23 04:43:50 raspberrypi systemd[1]: Stopping zkifc.service - Zymkey Interface Connector...
Dec 23 04:43:51 raspberrypi systemd[1]: zkifc.service: Main process exited, code=killed, status=11/SEGV
Dec 23 04:43:53 raspberrypi systemd[1]: zkifc.service: Failed with result 'signal'.
Dec 23 04:43:53 raspberrypi systemd[1]: Stopped zkifc.service - Zymkey Interface Connector.
Dec 23 04:43:53 raspberrypi systemd[1]: Starting zkifc.service - Zymkey Interface Connector...
Dec 23 04:43:53 raspberrypi bash[7592]: chown: warning: '.' should be ':': ‘zymbit.zymbit’
Dec 23 04:43:53 raspberrypi systemd[1]: Started zkifc.service - Zymkey Interface Connector.
Dec 23 04:44:05 raspberrypi systemd[1]: Stopping zkifc.service - Zymkey Interface Connector...
Dec 23 04:44:06 raspberrypi systemd[1]: zkifc.service: Main process exited, code=killed, status=11/SEGV
Dec 23 04:44:07 raspberrypi systemd[1]: zkifc.service: Failed with result 'signal'.
Dec 23 04:44:07 raspberrypi systemd[1]: Stopped zkifc.service - Zymkey Interface Connector.
-- Boot e2b2c0a9fcef415fb5d5e15bdf506f34 --
Dec 23 04:45:24 raspberrypi systemd[1]: Starting zkifc.service - Zymkey Interface Connector...
Dec 23 04:45:24 raspberrypi bash[1873]: chown: warning: '.' should be ':': ‘zymbit.zymbit’
Dec 23 04:45:25 raspberrypi systemd[1]: Started zkifc.service - Zymkey Interface Connector.
Dec 23 04:51:15 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:16 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:17 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:18 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:19 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:20 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:21 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:22 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:23 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:24 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:25 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:26 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:27 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:28 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:29 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:30 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24
Dec 23 04:51:31 raspberrypi zkifc[1876]: could not open "/dev" dir, errno=24

RPI: model 4 b
OS: Linux raspberrypi 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

Hi @mnm and welcome to our community!

The first question is: Did you run sudo raspi-config and under 3 - Interface Options enable I2C? This must be done in order for zkifc to access the Zymkey over I2C.

Best Regards,
dg

Here are the links to the relevant documents:

Enable I2C
Get the files for testing

i have already enabled I2C interface but still getting the same issue

Hi @mnm,

Ok, let’s start from the beginning … Which version of Raspberry Pi are you using? A Pi4 or a Pi5? What version of Raspberry Pi OS are you running? Bookworm (latest), or Bullseye? Or are you running Ubuntu? If you are running Ubuntu, only 22.04 is supported on Pi4.

You can also go through the troubleshooting guide for any other issues.

Can you post the contents of your /boot/firmware/config.txt file? Specifically, check for:

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

You can then install the I2C tools with sudo apt install i2c-tools and then run sudo i2cdetect -a 1 It won’t show the Zymkey, but it will absolutely confirm if I2C is working correctly.

You may have to reboot after installing i2ctools. Finally, try re-installing the zkifc software with
curl -G https://s3.amazonaws.com/zk-sw-repo/install_zk_sw.sh | sudo bash (which will cause a reboot on its own) and check again.

If you’d like, you can post the contents of your /boot/firmware/config.txt before and after re-installing the zkifc software just to compare them.

hi @davidgs_zymbit1
im using Raspberry Pi 4 model b with raspberrypi 6.6 bookworm

This is config.txt before reinstalling

# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]

After reinstallation

# For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]

still led blinks fast

Ok, that’s a bit puzzling. Can you check to make sure that the /var/lib/zymbit directory has been properly created, and that the zkenv.conf file is correct?

cat /var/lib/zymbit//zkenv.conf
ZK_GPIO_WAKE_PIN=575

I’ll have someone from Engineering weight in here, but it will most likely be next week before we can get much attention as many folks are out for the holidays.

Best Regards,
dg

I really appreciate your consideration.

 sudo cat /var/lib/zymbit//zkenv.conf
ZK_GPIO_WAKE_PIN=516

I am suspicious of a few things … Let’s have you run the following:

sudo apt-get update
sudo apt-get upgrade -y
sudo pip3 install zku --upgrade

Once that’s done, can you post the output of dpkg -l | grep -i zym here? I want to ensure that everything is up to date.

Then run:

sudo su
wake_pin=`grep GPIO4 /sys/kernel/debug/gpio | sed -r 's/[^0-9]*([0-9]*).*/\1/'`
echo "wake_pin=$wake_pin"   # sanity check value is set
echo "ZK_GPIO_WAKE_PIN=$wake_pin" > /var/lib/zymbit/zkenv.conf
sudo systemctl restart zkifc
systemctl status zkifc

And post the output from those commands as well. We will get this sorted out for you!

Best Regards,
dg

here’s the result of dpkg -l | grep -i zym

ii  libzk                                1.1-22                              arm64        Zymkey Base Communications Library
ii  libzymkeyssl                         1.0-11                              arm64        Zymkey SSL Engine Library
ii  zkapputilslib                        1.1-25                              arm64        Zymkey User API
ii  zkbootrtc                            1.1-15                              arm64        Zymkey RTC retrieval standalone app
ii  zkifc                                1.2-36                              arm64        Zymkey Interface Connector
ii  zkpkcs11                             1.0-3                               arm64        Zymkey PKCS11 Library
ii  zksaapps                             1.0-16                              arm64        Stand alone zymkey apps

output of the given commands

root@raspberrypi:/home/migara# wake_pin=`grep GPIO4 /sys/kernel/debug/gpio | sed -r 's/[^0-9]*([0-9]*).*/\1/'`
root@raspberrypi:/home/migara# echo "wake_pin=$wake_pin"
wake_pin=516
root@raspberrypi:/home/migara# echo "ZK_GPIO_WAKE_PIN=$wake_pin" > /var/lib/zymbit/zkenv.conf
root@raspberrypi:/home/migara# sudo systemctl restart zkifc
root@raspberrypi:/home/migara# systemctl status zkifc
● zkifc.service - Zymkey Interface Connector
     Loaded: loaded (/etc/systemd/system/zkifc.service; enabled; preset: enabled)
     Active: active (running) since Thu 2025-01-02 02:48:37 GMT; 13s ago
    Process: 2586 ExecStartPre=/bin/bash -c mkdir -p /run/zkstatus && chown -R zymbit:zymbit /run/zkstatus (code=exited>
    Process: 2589 ExecStartPre=/bin/sleep 0.5 (code=exited, status=0/SUCCESS)
   Main PID: 2590 (zkifc)
      Tasks: 3 (limit: 1580)
        CPU: 50ms
     CGroup: /system.slice/zkifc.service
             └─2590 /usr/bin/zkifc -s /var/lib/zymbit/

Jan 02 02:48:36 raspberrypi systemd[1]: Starting zkifc.service - Zymkey Interface Connector...
Jan 02 02:48:37 raspberrypi systemd[1]: Started zkifc.service - Zymkey Interface Connector.

Thank you.

Hi @mnm, I’m sure this is frustrating, but we are narrowing down the list of possibilities here. :slight_smile:

Can you make sure that you can see the /dev tree?

ls -l /dev/i2c*

Should give you a list of I2C devices in the tree. Can you please post the output of that?

Then, you can try running the zkifc with strace by running:

sudo systemctl stop zkifc
ZK_GPIO_WAKE_PIN=516 strace -e trace=open,openat,close,read,write,connect,accept zkifc -s /var/lib/zymbit

And posting the output here. This should tell us a) if there are the proper I2C devices enumerated, and b) exactly where the zkifc process is having trouble.

I fear that if none of this works, we may have to revert to a fresh install of Bookworm and starting over. If you happen to have an extra microSD card lying around you can always try doing a fresh install on that and using it to:

sudo raspi-config

to turn on I2C (it’s not enough to simply uncomment the dtparam=i2c_arm=on line in /boot/firmware/config.txt!) and then re-installing the zkifc packages.

Let me know how it goes!

Best Regards,
dg

One other thing: Do you have NTP set up for clock setting? It would be interesting to see what time the Pi thinks it is vs. what time it actually is, and what the time-zone settings are as well.

dg