×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    29

    Question Connect Bluetooth device

    I am trying to connect with a bluetooth device using Carbide c++ SDK s603rdFP1. I have done the code for device discovery, using RHostResolver::GetByAddress()and Next(), I look for the devices I have in range until I discover the device I am interrested on.Everything works ok, but I have several problems:
    1. When I have any bluetooth device my application closes but with Sock_19, how can i solve this?
    2. When I have discovered my device, I want to connect to it, but i don't know how I have to do it, I have a TNameEntry structure and i have tried to do the following, but it doesn't work, my application on emulator closes inmediatly:

    TBTSockAddr testBTSockAddr= entry().iAddr;
    iSomeSocket.Connect (testBTSockAddr,status);

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Connect Bluetooth device

    Note that sockets connect to a given port. If you use RHostResolver+TNameEntry, you get the BT address of a device, but I am almost sure that the port (channel in BT terminology) is 0.
    You should discover the available services using the SDP protocol. Check what various BT examples do with CSdpAgent.

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    29

    Re: Connect Bluetooth device

    But why i need to discover the services on remote device? i know this device has the service i need. I am working with a sensor device with serial port profile, so i need to make code for a RFCOMM connection? this port is the server channel, i need to look for this information on remote device?

    Thanks

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: Connect Bluetooth device

    If you already know the channel, you do not have to dig for it. Just use testBTSockAddr.SetPort.

Similar Threads

  1. Local bluetooth device
    By noxo in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-07-21, 16:18
  2. Connect to internet through bluetooth
    By g00011431 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-03-17, 09:50
  3. Canyon Bluetooth adapter not working with PC Suite?
    By sNNooPY in forum Bluetooth Technology
    Replies: 6
    Last Post: 2006-08-10, 08:43
  4. how to connect and notice a bluetooth device automatic and quickly?
    By helloeveryone in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-23, 07:23
  5. Using non-UI guided Bluetooth device inquiry -- issues
    By tkedem in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-03-30, 02:55

Posting Permissions

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