CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Location
    Gothenburg
    Posts
    12

    Bluetooth sockets not working

    Hello,
    I'm trying to create a simple client/server app using bluetooth. I've had no problem with the server app running on my laptop but I'm having major issues with the client that's supposed to run on my Pocket PC (Windows Mobile 6 Classic). For some reason the call to

    socket (AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM)

    always results in a 10047 error == not supported even though the built in bluetooth apps work just fine.

    Does anyone know how to solve this or know of some other practical way to communicate over bluetooth in C++?

    /spacewarp

  2. #2
    Join Date
    Dec 2007
    Posts
    33

    Re: Bluetooth sockets not working

    I have no experience with bluetooth programming, so my advice is as following:
    Obviously you're doing something different than the built in bluetooth app or other apps that works.
    Try monitoring a bluetooth app that works, see what api functions it calls what parameters etc...
    And then see what you are doing different, and when it will take you.

  3. #3
    Join Date
    Jul 2009
    Location
    Gothenburg
    Posts
    12

    Re: Bluetooth sockets not working

    Thanks for the reply. Unfortunately I have absolutely no idea how to do that. Any tips?

  4. #4
    Join Date
    Jul 2009
    Location
    Gothenburg
    Posts
    12

    Re: Bluetooth sockets not working

    Solved
    I figured out how to use the virtual COM ports which work perfectly. I still think the pocket pc is a bit weird because according to some tests I ran there isn't even a bluetooth stack so I'm not sure how the bluetooth actually works on it... But it works now anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured