This page was last modified 17:45, 10 May 2008.
How to connect to a particular Bluetooth address
From Forum Nokia Wiki
Overview
This code snippet shows how we can connect to a Bluetooth device over RFCOMM when we know the address. If we know the address and channel number of interested service then it can be connected directly. If we don't know the channel number then we need to find it as usual way and then we can connect.
TBTDevAddr devAddr(MAKE_TINT64(0x0019, 0x79fa2193)); // 001979fa2193 is target BT address divided into two parts TBTSockAddr asocket; asocket.SetBTAddr(devAddr); asocket.SetPort(5); //Assuming the expected service is advertised on channel 5
When Channel number is not known
TBTDevAddr devAddr(MAKE_TINT64(0x0019, 0x79fa2193)); iState = EGettingService; iStatus = KRequestPending; iServiceSearcher->FindServiceL(iStatus, devAddr); SetActive();
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Beginner Question: Symbian 60 Bluetooth App | butching314 | Bluetooth Technology | 1 | 2008-01-18 01:55 |
| Connecting Nokia 6681 via WAP gateway | dda | General Browsing | 2 | 2005-09-28 10:45 |
| bluetooth device address | murmur20 | Bluetooth Technology | 1 | 2005-03-17 13:05 |
| how to Retrieve the Bluetooth Address of the Nokia 7650 | zikman9 | Bluetooth Technology | 3 | 2003-07-21 14:00 |
| gprs Static IP Address | pankaj2000 | Bluetooth Technology | 1 | 2005-12-26 14:18 |
