Ejemplo n.º 1
0
        public string GetRemoteName(InquiryResult device)
        {
            var data = new byte[10];
            var ret  = String.Empty;

            data[0] = (byte)(device.BDAddr & 0xFF);
            data[1] = (byte)((device.BDAddr & 0xFF00) >> 8);
            data[2] = (byte)((device.BDAddr & 0xFF0000) >> 16);
            data[3] = (byte)((device.BDAddr & 0xFF000000) >> 24);
            data[4] = (byte)((device.BDAddr & 0xFF00000000) >> 32);
            data[5] = (byte)((device.BDAddr & 0xFF0000000000) >> 40);
            data[6] = device.PageScanRepetitionMode;
            data[8] = (byte)(device.ClockOffset & 0xFF);
            data[9] = (byte)((byte)((device.ClockOffset & 0xFF00) >> 8) | (byte)0x80);

            var opcode = new Opcode(OpcodeGroupField.LinkControl, OpcodeCommandField.RemoteNameRequest);

            _SendHCICommand(opcode, data);

            if (_commandData.ContainsKey(opcode))
            {
                ret = _commandData[opcode] as string;
                _commandData.Remove(opcode);
            }

            return(ret);
        }
Ejemplo n.º 2
0
 public InquiryInfo(InquiryResult result, string remoteName)
 {
     Result = result;
       RemoteName = remoteName;
 }
Ejemplo n.º 3
0
 public void Connect(InquiryResult result)
 {
     Connect(result.BDAddr, result.PageScanRepetitionMode, result.ClockOffset);
 }
Ejemplo n.º 4
0
        public string GetRemoteName(InquiryResult device)
        {
            var data = new byte[10];
              var ret = String.Empty;

              data[0] = (byte)(device.BDAddr & 0xFF);
              data[1] = (byte)((device.BDAddr & 0xFF00) >> 8);
              data[2] = (byte)((device.BDAddr & 0xFF0000) >> 16);
              data[3] = (byte)((device.BDAddr & 0xFF000000) >> 24);
              data[4] = (byte)((device.BDAddr & 0xFF00000000) >> 32);
              data[5] = (byte)((device.BDAddr & 0xFF0000000000) >> 40);
              data[6] = device.PageScanRepetitionMode;
              data[8] = (byte)(device.ClockOffset & 0xFF);
              data[9] = (byte)((byte)((device.ClockOffset & 0xFF00) >> 8) | (byte)0x80);

              var opcode = new Opcode(OpcodeGroupField.LinkControl, OpcodeCommandField.RemoteNameRequest);
              _SendHCICommand(opcode, data);

              if (_commandData.ContainsKey(opcode))
              {
            ret = _commandData[opcode] as string;
            _commandData.Remove(opcode);
              }

              return ret;
        }
Ejemplo n.º 5
0
 public void Connect(InquiryResult result)
 {
     Connect(result.BDAddr, result.PageScanRepetitionMode, result.ClockOffset);
 }
Ejemplo n.º 6
0
 public InquiryInfo(InquiryResult result, string remoteName)
 {
     Result     = result;
     RemoteName = remoteName;
 }