Hello, I'm trying to detect high voltage on some of wiegand pins.
I use demoSDK_v2.19.20240620.aar that you sent me.
As I read through SDK, I concluded that I need to use commonUtil.switchInput
and to set it to CommonConstants.InputType.DOOR_INPUT
I get result of that (same as in your demo app)
public static final int ERR_SYS_NOT_SUPPORT = 61447;
from ResultCode class.
Should I call after that commonUtil.setWiegandDirection?
And I set input listener
commonUtil.setInputListener(object : IInputListener {
override fun wiegandInput(inputData: ByteArray) {
Log.i(TAG, "Received Wiegand input: ${inputData.joinToString { String.format("%02X", it) }}")
wiegandInputFlow.tryEmit(inputData)
}
override fun input(sw: Int, status: Int) {
when (sw) {
1 -> Log.i(TAG, "Door Input: ${if (status == 1) "HIGH" else "LOW"}")
2 -> Log.i(TAG, "Physical Key Input: ${if (status == 1) "HIGH" else "LOW"}")
3 -> Log.i(TAG, "Magnetic Sensor 1: ${if (status == 1) "HIGH" else "LOW"}")
4 -> Log.i(TAG, "Magnetic Sensor 2: ${if (status == 1) "HIGH" else "LOW"}")
else -> Log.w(TAG, "Unknown input source")
}
}
})But I do not receive any data when I set high voltage on some of wiegand pins.
What I'm doing wrong? Why I receive error on start? Thanks!