Menú
Foros
Nuevos mensajes
Buscar en foros
Novedades
Nuevos mensajes
Nuevos recursos
Última actividad
Recursos
Últimas revisiones
Buscar recursos
Acceder
Registrarse
Novedades
Buscar
Buscar
Buscar sólo en títulos
De:
Nuevos mensajes
Buscar en foros
Menú
Acceder
Registrarse
Install the app
Instalar
Foros
Diseño digital
Interfaces y Programación
Windows 10 bluetooth codigo de emparejamiento codigo C#
JavaScript está desactivado. Para una mejor experiencia, por favor, activa JavaScript en el navegador antes de continuar.
Estás usando un navegador obsoleto. No se pueden mostrar este u otros sitios web correctamente.
Se debe actualizar o usar un
navegador alternativo
.
Responder al tema
Mensaje
[QUOTE="RALDTech, post: 1238189, member: 353577"] hola gracias por responder tan pronto mas que estoy contratiempo.... sabes si hay alguna manera de poder ver el pin que envia windows para poder emparejar el celular con el programa? tienes alguna idea de como podria conectar el bluetooth del celular para enviar archivos a la PC sin complicarme mucho? gracias por cierto este es mi codigo [CODE=csharp]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using InTheHand; using InTheHand.Net; using InTheHand.Net.Ports; using InTheHand.Net.Sockets; using InTheHand.Net.Bluetooth; using System.Threading; namespace bluetooth_4 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } BluetoothClient pc = new BluetoothClient(); BluetoothDeviceInfo[] info = null; private void Form1_Load(object sender, EventArgs e) { if (!BluetoothRadio.IsSupported) { MessageBox.Show("no hay bluetooth"); } if(BluetoothRadio.PrimaryRadio.Mode == RadioMode.PowerOff) {//descubrir como apagar y encender el bluetooth BluetoothRadio.PrimaryRadio.Mode = RadioMode.Connectable; MessageBox.Show(BluetoothRadio.PrimaryRadio.Name.ToString()); MessageBox.Show(BluetoothRadio.PrimaryRadio.Mode.ToString()); } else { MessageBox.Show(BluetoothRadio.PrimaryRadio.Name.ToString()); MessageBox.Show(BluetoothRadio.PrimaryRadio.Mode.ToString()); } info = pc.DiscoverDevices(10); foreach (BluetoothDeviceInfo device in info) { listBox1.Items.Add(device.DeviceName + " - " + device.DeviceAddress); device.Update(); device.Refresh(); device.SetServiceState(BluetoothService.ObexObjectPush, true); } } BluetoothDeviceInfo deviceinfo; private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { deviceinfo = info.ElementAt(listBox1.SelectedIndex); MessageBox.Show(deviceinfo.DeviceName); if (!deviceinfo.Authenticated) { if (!BluetoothSecurity.PairRequest(deviceinfo.DeviceAddress, "0000")) { MessageBox.Show("error de autenticacion"); } else { MessageBox.Show("autenticado"); } } } } } [/CODE] [/QUOTE]
Verificación
Responder
Foros
Diseño digital
Interfaces y Programación
Windows 10 bluetooth codigo de emparejamiento codigo C#
Arriba