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. General Programming
  3. C#
  4. Bluetooth set as com port in c#

Bluetooth set as com port in c#

Scheduled Pinned Locked Moved C#
csharpcomhelpquestion
11 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.
  • J Jan 1947

    Hi Guys me again, old man again ;) .. I have used Scanner set as com port and I like to change it to use Bluetooth, used as com port. I have register device and change it to use it as com port in Windows 11. I am using SerialPort and add

    SerialErrorReceivedEventHandler

    . This event never happens. I cannot find any suggestion. Can you help me please ? Regards John

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #2

    Jan 1947 wrote:

    This event never happens.

    Perhaps there are no errors.

    J 1 Reply Last reply
    0
    • L Lost User

      Jan 1947 wrote:

      This event never happens.

      Perhaps there are no errors.

      J Offline
      J Offline
      Jan 1947
      wrote on last edited by
      #3

      Hi Richard. no errors, The Receive Data Event not working. the com port is in /foreach(string port in ports) / as well it shows as com port in Device Manager as 'Standard Serial over Bluetooth link (COM4)'. I use standard Serial port structure . It works as HID, when I scan barcode while in Note Pad ?!!?? In device manager I have its HID disabled. When I change the driver to do as com port, my software works. I have an issue with the com port driver supplied with the scanner, and this is the reason I like to change it. Regards John

      L 1 Reply Last reply
      0
      • J Jan 1947

        Hi Richard. no errors, The Receive Data Event not working. the com port is in /foreach(string port in ports) / as well it shows as com port in Device Manager as 'Standard Serial over Bluetooth link (COM4)'. I use standard Serial port structure . It works as HID, when I scan barcode while in Note Pad ?!!?? In device manager I have its HID disabled. When I change the driver to do as com port, my software works. I have an issue with the com port driver supplied with the scanner, and this is the reason I like to change it. Regards John

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #4

        If it is a problem with the device you are connecting to then there is very little anyone here can do to help.

        J 1 Reply Last reply
        0
        • L Lost User

          If it is a problem with the device you are connecting to then there is very little anyone here can do to help.

          J Offline
          J Offline
          Jan 1947
          wrote on last edited by
          #5

          Hi Richard maybe I have not been clear. I do not want to use the faulty driver as it has problems. This is why I like to use Scanner via Bluetooth and redirected to operate as com port. The Bluetooth driver is Microsoft and redirection is done via Windows 11, so no faulty driver to be used. regards John

          L 1 Reply Last reply
          0
          • J Jan 1947

            Hi Richard maybe I have not been clear. I do not want to use the faulty driver as it has problems. This is why I like to use Scanner via Bluetooth and redirected to operate as com port. The Bluetooth driver is Microsoft and redirection is done via Windows 11, so no faulty driver to be used. regards John

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #6

            Sorry, maybe I am being dense, but I still do not understand what you are asking for.

            J 1 Reply Last reply
            0
            • L Lost User

              Sorry, maybe I am being dense, but I still do not understand what you are asking for.

              J Offline
              J Offline
              Jan 1947
              wrote on last edited by
              #7

              Hi Richard I want to use Bluetooth connection and use it to communicate as serial port with to operate. Maybe I am asking for something which cannot be done appreciate you help regards John

              L 2 Replies Last reply
              0
              • J Jan 1947

                Hi Richard I want to use Bluetooth connection and use it to communicate as serial port with to operate. Maybe I am asking for something which cannot be done appreciate you help regards John

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #8

                The documentation for that is at SerialDataReceivedEventHandler Delegate (System.IO.Ports) | Microsoft Learn[^].

                J 1 Reply Last reply
                0
                • J Jan 1947

                  Hi Richard I want to use Bluetooth connection and use it to communicate as serial port with to operate. Maybe I am asking for something which cannot be done appreciate you help regards John

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #9

                  I just found this article which may help you Bluetooth Simulation in C# with Serial Ports[^].

                  J 1 Reply Last reply
                  0
                  • L Lost User

                    I just found this article which may help you Bluetooth Simulation in C# with Serial Ports[^].

                    J Offline
                    J Offline
                    Jan 1947
                    wrote on last edited by
                    #10

                    Hi Richard great, yes this is how I use it, only I would like to use DataReceiveEvent. I will try to do it using the loop, may be this is the solution. Thanks you very much Regards John

                    1 Reply Last reply
                    0
                    • L Lost User

                      The documentation for that is at SerialDataReceivedEventHandler Delegate (System.IO.Ports) | Microsoft Learn[^].

                      J Offline
                      J Offline
                      Jan 1947
                      wrote on last edited by
                      #11

                      Hi Richard Yes this is what I am using, but the event is never triggered. Serial port exists. thanks again regards John

                      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