0 like 0 dislike
466 views
in T20 by Q&A Freshman (107 points)

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!

by Q&A Freshman (107 points)
0 0
For enyone reading this using

private var gpIORd: WiegandRd2Dept? = null
gpIORd = WiegandRd2Dept(this)
val ret = gpIORd?.getINDGpioLevel(0)

is enough

Please log in or register to answer this question.

1 Answer

0 like 0 dislike
by Q&A Engineer (5.4k points)

Related questions

0 like 0 dislike
1 answer 386 views
asked in T20 by zigic Q&A Freshman (107 points)
0 like 0 dislike
1 answer 412 views
asked in T20 by gvpata Q&A Freshman (102 points)
0 like 0 dislike
1 answer 559 views
0 like 0 dislike
1 answer 570 views
asked in T20 by andres_enigoo_cz Q&A Freshman (106 points)
0 like 0 dislike
1 answer 1.5k views
1 like 0 dislike
0 answers 337 views
0 like 0 dislike
1 answer 311 views
asked in T20 by frankv1234 Q&A Freshman (102 points)
0 like 0 dislike
1 answer 382 views
asked in T20 by Ashtechgroup Q&A Freshman (102 points)
0 like 0 dislike
1 answer 482 views
asked in T20 by jalcantar Q&A Freshman (102 points)
0 like 0 dislike
1 answer 453 views
Welcome to Telpo Q&A,

If you have a technical question ,please ask here, in English.

If you have faulty devices need be repaired,please create a issue ticket.

Please inquiry your ticket.

Notice :If you have an urgent question or cannot register account of Q&A, you can contact the online support in below jivochat .

Categories

...