ODROID N2+ compatibility


I’ve seen this thread from 2018:

and other places where ZymBit has said they have prototyped and gotten the ZymKey working on an ODROID. I’m looking to use it on an ODROID N2+ running Ubuntu 20.04. The bullseye installer runs fine, but then the system log is filled with this error:
May 05 23:18:59 odroid kernel: export_store: invalid GPIO 4
I’ve poked around and it looks like the code to interface with the GPIO pins is in /usr/lib/libzk.so, according to strings:

root@odroid:/usr/lib# strings libzk.so | grep "gpio"

My /sys/class/gpio/ does not look like this though:

root@odroid:/sys/class/gpio# ls *
export  unexport

base  device  label  ngpio  power  subsystem  uevent

base  device  label  ngpio  power  subsystem  uevent
root@odroid:/sys/class/gpio# ls gpiochip410/*
gpiochip410/base  gpiochip410/label  gpiochip410/ngpio  gpiochip410/uevent

driver  driver_override  gpio  gpiochip1  modalias  of_node  power  subsystem  uevent

autosuspend_delay_ms  control  runtime_active_time  runtime_status  runtime_suspended_time

export  gpiochip410  gpiochip496  unexport

I’m not sure which gpiochip I need to use, but I think I’ll need a patched version of libzk.so in order to make this work. Does anyone else have experience using a ZymKey on a more recent ODROID with the same /sys/class/gpio/ layout?

This document explains how to access and address the ODROID N2+ GPIO pins using the sysfs interface:

My mistake here, the normal Hardkernel image is actually compatible with the ZymKey. I had just misunderstood how to setup the /sys/class/gpio/ file. All I needed to do was create /var/lib/zymbit/zkenv.conf with the contents ZK_GPIO_WAKE_PIN=473, and now it’s working.