Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. About Search Blutooth devices in C#

About Search Blutooth devices in C#

Scheduled Pinned Locked Moved Mobile
tutorialcsharpalgorithmshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amin Najafi
    wrote on last edited by
    #1

    How to searching bluetooth devices in c#.net? using InTheHand.Net; using InTheHand.Net.Sockets; using InTheHand.Net.Bluetooth; BluetoothRadio.PrimaryRadio.Mode = RadioMode.Discoverable; BluetoothRadio myRadio = BluetoothRadio.PrimaryRadio; lblSearch.Text = "" + myRadio.LocalAddress.ToString(); bluetoothClient = new BluetoothClient(); Cursor.Current = Cursors.WaitCursor; BluetoothDeviceInfo[] bluetoothDeviceInfo = { }; bluetoothDeviceInfo = bluetoothClient.DiscoverDevices(100000); comboBox1.DataSource = bluetoothDeviceInfo; comboBox1.DisplayMember = "DeviceName"; comboBox1.ValueMember = "DeviceAddress"; comboBox1.Focus(); Cursor.Current = Cursors.Default; this code run but the code finish at a second and can't find any mobile bluetooth device. i want search bluetooth in period of time . for example search device for 10 second and find any bluetooth devices. thanks for your help and your guide. best regards.

    T 1 Reply Last reply
    0
    • A Amin Najafi

      How to searching bluetooth devices in c#.net? using InTheHand.Net; using InTheHand.Net.Sockets; using InTheHand.Net.Bluetooth; BluetoothRadio.PrimaryRadio.Mode = RadioMode.Discoverable; BluetoothRadio myRadio = BluetoothRadio.PrimaryRadio; lblSearch.Text = "" + myRadio.LocalAddress.ToString(); bluetoothClient = new BluetoothClient(); Cursor.Current = Cursors.WaitCursor; BluetoothDeviceInfo[] bluetoothDeviceInfo = { }; bluetoothDeviceInfo = bluetoothClient.DiscoverDevices(100000); comboBox1.DataSource = bluetoothDeviceInfo; comboBox1.DisplayMember = "DeviceName"; comboBox1.ValueMember = "DeviceAddress"; comboBox1.Focus(); Cursor.Current = Cursors.Default; this code run but the code finish at a second and can't find any mobile bluetooth device. i want search bluetooth in period of time . for example search device for 10 second and find any bluetooth devices. thanks for your help and your guide. best regards.

      T Offline
      T Offline
      the bugness
      wrote on last edited by
      #2

      I don't know the complete answer to your question, 'cause I'm not very literate in C#, however... I don't see any timers, and I don't see you returning anything to verify something was found. I would have expected to see at least a 'for' loop. Also, is the radio even turned on? BluetoothRadio.PrimaryRadio.Mode would set it I think. Sorry for not helping your exact question, but I think this might get you on the right path. Maybe an expert could chime in and help more (Or at least let you know if I was completely off-base here...lol). Herb

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups