Exemple #1
0
        public bool connect_rfcomm_str(string btaddr, shake_type device_type)
        {
            if (connected)
                close();

            dev = shake_init_device_rfcomm_str(btaddr, (int) device_type);
            if (dev.ToInt32() == 0)
                return false;

            connected = true;
            register_nav_callback();
            register_audio_callback();
            return true;
        }
Exemple #2
0
        public bool connect(int com_port, shake_type device_type)
        {
            if(connected)
                close();

            dev = shake_init_device(com_port, (int) device_type);
            if (dev.ToInt32() == 0)
                return false;

            connected = true;
            register_nav_callback();
            register_audio_callback();
            return true;
        }