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 550861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:19:59+00:00 2026-05-13T11:19:59+00:00

i’m trying to use the Widcomm bluetooth stack by Broadcomm and it should work

  • 0

i’m trying to use the Widcomm bluetooth stack by Broadcomm and it should work but there’s one thing that still i cannot understand: HOW CAN I AUTOMATICALLY OPEN THE VIRTUAL COM WHEN I NEED TO COMMUNICATE?

i am trying to use SPP (Serial Port Profile) but the documentation with the SDK is not so exaustive.

PLEASE, I JUST CANNOT USE 32FEET!

I wrapped the SPP Server part of the API:

    [DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
    internal static extern IntPtr CreateSppServer(IntPtr pStack);

    [DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
    internal static extern void DeleteSppServer(IntPtr pServer);

    [DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
    internal static extern bool SppServerStart(IntPtr pServer, IntPtr pszServiceName);

    [DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
    internal static extern bool SppServerStop(IntPtr pServer);

    [DllImport("wcbts.dll", SetLastError = false, CharSet = CharSet.Unicode)]
    internal static extern IntPtr SppServerNotifyWindow(IntPtr pServer, IntPtr hWnd, int nMsg);

What is pszServiceName? where i can find it?
and hWnd and nMsg???

Thanks

  • 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-13T11:19:59+00:00Added an answer on May 13, 2026 at 11:19 am

    I posted a response to this earlier but it seems never to have appeared! 🙁

    Anyway, I’m the maintainer of the 32feet.NET library and the author of the Widcomm support. Firstly, as far as I know the license should not be a problem for commercial distribution. See Peter Foot’s comment at http://32feet.net/forums/t/2289.aspx:

    “32feet.NET is free for commercial or non-commercial use. If you use the binaries you can just use the library as-is, if you make modifications to the source you need to include the 32feet.NET License.txt document and ensure the file headers are not modified/removed.”

    I’ll see if Peter can post a comment here to give certainty.

    Anyway, we haven’t implemented support for the Widcomm virtual COM port functionality, (its certainly possible though no one has asked for it — apart from yourself). I’m not a big fan of virtual COM ports. It always seems much easier to use a direct ‘sockets’ connection, rather than attempt to setup a COM port, and try to find what name it was created as[1], and then have to open a SerialPort to use it, and then if the connection is lost one doesn’t know and have simply to keep retrying… Its so much easier just to do the following:

    Dim addr As BluetoothAddress _
      = BluetoothAddress.Parse("001122334455")
    '
    Dim ep As New BluetoothEndPoint(addr, BluetoothService.SerialPort)
    Dim cli As New BluetoothClient
    cli.Connect(ep)
    Dim peerStream As Stream = cli.GetStream()
    peerStream.Write/Read ...
    

    See more at http://www.alanjmcf.me.uk/comms/bluetooth/32feet.NET%20–%20User%20Guide.html

    To answer your specific Widcomm questions. Multiple instances of a Bluetooth service can be created, i.e. multiple SPP services (each using the SPP Service Class Id), each can supply a Service Name attribute to allow clients to select between them. In most cases it won’t be necessary, so just pass null or zero-length string — the Widcomm SDK docs don’t say what’s allowed. As to the Window handles, Widcomm uses C++ virtual methods (yuk — this makes direct P/Invoking mostly impossible) to implement events/callbacks, presumably Mr Figueira’s code converts those callbacks into Window messages.

    [1] Creating Bluetooth virtual COM ports is not straightforward. On MSFT+Win32, one isn’t told what name was selected for the COM port! On MSFT+WM the official API doesn’t work well on many device types. And our unofficial method of doing it requires a reboot IIRC. 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 453k
  • Answers 453k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Copy your vector of ints into a vector of something… May 15, 2026 at 9:33 pm
  • Editorial Team
    Editorial Team added an answer First, find out which script or plugin changed the meaning… May 15, 2026 at 9:33 pm
  • Editorial Team
    Editorial Team added an answer Nice question +1 I've seen the fla at work, don't… May 15, 2026 at 9:33 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.