package com.seewo.remote.g;

import android.util.Log;
import com.cvte.vman.instance.InvokeCmd;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;

/* JADX INFO: compiled from: OPSRS232Checker.java */
/* JADX INFO: loaded from: classes.dex */
public class m {
    public static boolean a() {
        try {
            Socket socket = new Socket();
            try {
                socket.setSoTimeout(100);
                socket.connect(new InetSocketAddress(InetAddress.getByName("192.168.153.254"), InvokeCmd.CMD_AV_MANAGER_SET_MIC_ALGORITHM_PARAMETERS), 100);
                socket.close();
                return true;
            } finally {
            }
        } catch (Exception unused) {
            return false;
        }
    }

    public static boolean b(com.seewo.remote.e.f.a aVar) {
        if (!a()) {
            return false;
        }
        int iH = aVar.h();
        byte bC = aVar.c();
        if (!(bC == 65 && iH == 32)) {
            return true;
        }
        Log.w("@OPSRS232Checker", "needIntercept mainCode: " + ((int) bC) + ", value: " + iH + ", not intercept.");
        return false;
    }
}
