Exemple #1
0
        //--
        void ReadVersions()
        {
            if (_doneVersions)
            {
                return;
            }
            var vers = new Structs.hci_version(HciVersion.Unknown);
            var ret  = NativeMethods.hci_read_local_version(_dd, ref vers, _fcty.StackTimeout);

            BluezUtils.Assert(ret, "hci_read_local_version");
            if (BluezUtils.IsSuccess(ret))
            {
                _versions = vers;
            }
            _doneVersions = true; // Always set, as unlikely to work second time if failed first time.
            //
            var arr = new byte[8];

            ret = NativeMethods.hci_read_local_features(_dd, arr, _fcty.StackTimeout);
            if (BluezUtils.IsSuccess(ret))
            {
                _lmpFeatures = (LmpFeatures)BitConverter.ToInt64(arr, 0);
            }
        }
Exemple #2
0
 internal static extern BluezError hci_read_local_version(int dd, ref Structs.hci_version ver, int to);