Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6079353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:56:12+00:00 2026-05-23T10:56:12+00:00

Just a quick question, how do I get the local Bluetooth devices that have

  • 0

Just a quick question, how do I get the local Bluetooth devices that have already been paired using the Motorola’s EMDK 2.4 for an MC75 device? Seems I can get the RemoteDevice list but there is no method to see the local stack and what’s been paired already, this way I can read what serial port it has already been assigned and open up a SerialPort object automatically for the user.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:56:13+00:00Added an answer on May 23, 2026 at 10:56 am

    The answer is you don’t or can’t…you instead use the Microsoft Bluetooth. Download this for windows mobile bluetooth on a motorola device…may work on other devices too. You can get from the mobile samples, I found it here on my hard drive…C:\Program Files (x86)\Windows Mobile 6 SDK\Samples\Common\CS\Bluetooth. I added this to my project then all I had to do was this to add all the currently paired devices to a listBox

    BluetoothRadio radio = new BluetoothRadio();
    listBox1.DataSource = radio.PairedDevices;
    listBox1.DisplayMember = "Name";
    

    And then when one was selected you can access it as a BlueTooth device like this:

    BluetoothDevice device = listBox1.SelectedItem as BluetoothDevice;
    

    You then start stream by

        if (device != null) {
             BTConnectionManager.Instance.startThread(
                        StandardServices.SerialPortServiceGuid,
                        new ThreadStart(StreamProcessor));
    
        if (BTConnectionManager.Instance.Connect(device)) { 
            ...Do something...
    

    I had to modifiy the StreamProcessor and BTConnectionManager a bit to work for me but here is my version of it without the form references in it.

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Text;
    using System.Threading;
    using System.Net.Sockets;
    using Microsoft.WindowsMobile.SharedSource.Bluetooth;
    
    namespace Project2 {
    /// <summary>
    /// Connection Manager to marshal the data connection and reference the
    /// data streams to push/pull data.
    /// </summary>
    public class BTConnectionManager {
        BTConnectionManager() { }
    
        /// <summary>
        /// reference the Singleton and make a singleton object out of
        /// this since we only want one for now.
        /// </summary>
        public static BTConnectionManager Instance {
            get {
                return Nested.instance;
            }
        }
    
        /// <summary>
        /// easiest way to make this a singleton that is thread safe.
        /// </summary>
        class Nested {
            static Nested() { }
            internal static readonly BTConnectionManager instance = new BTConnectionManager();
        }
    
        /// <summary>
        /// The Bluetooth radio.
        /// </summary>
        private BluetoothRadio radio = new BluetoothRadio();
    
    
        /// <summary>
        /// Guid of the Bluetooth service
        /// </summary>
        private Guid guid;
    
        /// <summary>
        /// Thread function that processes data from the stream.
        /// </summary>
        private ThreadStart streamProcessor;
    
        /// <summary>
        /// The two-way communication stream to the other Bluetooth device.
        /// </summary>
        private NetworkStream stream;
    
        /// <summary>
        /// A BinaryReader on top of this.stream
        /// </summary>
        private BinaryReader reader;
    
        /// <summary>
        /// A BinaryWriter on top of this.stream
        /// </summary>
        private BinaryWriter writer;
    
        /// <summary>
        /// Should we stop the service thread, in preparation for 
        /// exiting the app?
        /// </summary>
        private bool exiting = false;
    
        /// <summary>
        /// The Bluetooth service.
        /// </summary>
        private BluetoothService bluetoothService;
    
        /// <summary>
        /// A BinaryWriter used to write to the other Bluetooth device.
        /// </summary>
        public BinaryWriter Writer {
            get { return writer; }
        }
    
        /// <summary>
        /// A BinaryReader used to read from the other Bluetooth device.
        /// </summary>
        public BinaryReader Reader {
            get { return reader; }
        }
    
        /// <summary>
        /// Gets a value indicating whether a connection is established with 
        /// the other Bluetooth device.
        /// </summary>
        public bool Connected {
            get { return stream != null; }
        }
    
    
        /// <summary>
        /// The two-way communication stream to the other Bluetooth device.
        /// </summary>
        private NetworkStream Stream {
            get { return stream; }
            set {
                stream = value;
                if (stream == null) {
                    if (writer != null) {
                        writer.Close();
                        writer = null;
                    }
                    if (reader != null) {
                        reader.Close();
                        reader = null;
                    }
                } else {
                    writer = new BinaryWriter(stream);
                    reader = new BinaryReader(stream);
                }
            }
        }
    
    
        /// <summary>
        /// Creates a new instance of a ConnectionManager.
        /// </summary>
        /// <param name="guid">The Bluetooth service guid.</param>
        /// <param name="streamProcessor">A callback function that will read and process data from the stream.</param>
        public void startThread(Guid guid, ThreadStart dataProcessor) {
            this.guid = guid;
            this.streamProcessor = dataProcessor;
            Thread t = new Thread(new ThreadStart(ServiceThread));
            t.Start();
        }
    
    
    
        /// <summary>
        /// The thread that listens for Bluetooth connections, and processes
        /// the data read from a connection once established.
        /// </summary>
        private void ServiceThread() {
            bluetoothService = new BluetoothService(this.guid);
    
            while (!exiting) {
                if (!bluetoothService.Started) {
                    bluetoothService.Start();
                }
                try {
                    this.Stream = bluetoothService.AcceptConnection();
                } catch (System.Net.Sockets.SocketException) {
                    // bluetoothService.Stop() was called.  
                    // Treat this like a graceful return from AcceptConnection().
                }
                if (!exiting) {
                    // Call the streamProcessor to handle the data from the stream.
                    streamProcessor();
                }
            }
            exiting = false;
    
        }
    
        /// <summary>
        /// Force the service thread to exit.
        /// </summary>
        public void Exit() {
            // This will cause us to fall out of the ServiceThread() loop.
            exiting = true;
    
            if (!Connected) {
                // We must be waiting on AcceptConnection(), so we need to
                // force an exception to break out.
                bluetoothService.Stop();
            }
        }
    
    
        /// <summary>
        /// Connect to another Bluetooth device.
        /// </summary>
        public bool Connect(BluetoothDevice device) {
            if (device != null) {
                try {
                    this.Stream = device.Connect(this.guid);
                } catch (System.Net.Sockets.SocketException) {
                    // Couldn't connect.
                }
    
                if (this.Stream == null) {
                    System.Windows.Forms.MessageBox.Show("Could not connect to device " + device.Name);
                    return false;
                } else {
                    // Forcibly break out of the AcceptConnection in 
                    // ServiceThread(), and continue on to streamProcessor().
                    bluetoothService.Stop();
                    return true;
                }
            }
            return false;
        }
    
        /// <summary>
        /// Disconnect from the other Bluetooth device.
        /// </summary>
        public void Disconnect() {
            Stream = null;
        }
    
    
    
        internal void Disconnect(BluetoothDevice device) {
            Disconnect();
        }
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just have a quick question about how to get the length of a
Working with JQuery Validator and just have a quick question. I'm using addMethod to
Just a quick regex question...hopefully I have a string that looks something like this:
I just have a quick question. I've noticed that I don't have stdafx.h in
just a quick question: I am a CS undergrad and have only had experience
just a quick question, if I have a matrix has n rows and m
Just a quick question about best practice in MVC development. Let's say that I've
Just a quick question here. I have a program in which I need to
Just a quick question for those of you that know. Is it possible to
I just have a quick question about how to generate id's on-the-fly for HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.