• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 27844
  • Last Modified:

Starting Bluetooth Programming in C++

Hi,

I have bought the ericsson bluetooth application tool kit and was going to do a simple program on data transmittion.
I have diffculties on starting the programming for the bluetooth. There seems to be many protocols and API involved and i am confused on which to start with.
I try some functions like HCI_ReqStart to start the commmunication to the HCI but when complie it gives alot of errors.

Can anyone guide me on which to start, SCM, HCI or RFCOMM to talk to the bluetooth device. How to start on it?

Thanks.
0
PsychoMantis
Asked:
PsychoMantis
  • 5
  • 5
  • 2
1 Solution
 
kuganCommented:

I havent worked with bluetooth application tool kit but in general you use HCI commands to talk to the BT device

you basically have to initialise the BT device, look for the correct APIs that does this then read the BD address to make sure that you have communication between BT device and your host. then you can do the rest

http://www.palowireless.com/bluetooth/ has more information , might be a good starting point

0
 
PsychoMantisAuthor Commented:
Yup i have visited the website that you recommanded. You said that HCI commands are used to talk to the BT device, but i was asking one how to set them talking because the SCM, HCI and RFCOMM provides some ways to talk to the bluetooth device also.
0
 
kuganCommented:
Ok , I am not sure about what is your setup there, what are you using as HOST / develeopment enviorenment.

since you are using BT kit

|RFCOMM        |

|L2CAP         |  This is on the host

| HCI          |

|Serial device |

| HCI on BT KIT|

| and rest of the|
|BT Layers       |

Here i am assuming it is serial RS232 but it can be anythink.

if you see the Bluetooth specification for HCI, you will find what are the HCI command you should give for each setup , there are HCI commands for setting up RFCOMM but you will have to follow a sequence

Since you are using APIs i assume you dont need to go this low , may be you might have an API to initialise the BT KIT that will do all the low level initialisation then you might have an other API for setting up RFCOMM that will do all the relaven think,

If you are interested in all the communication that happens for RFCOMM setup you should read the BT Core specifiaction and you can also have a look at Bluez and opensource stack BT stack for linux.

As for Erricson APIs I am not familiar with it
0
A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

 
PsychoMantisAuthor Commented:
My first step is to develop a program to send and receive data between the two BT devices. Yup, i am using the serial RS232.By the way i am doing for windows platform communication, the programming part should be quite the same with linux except the kernal right..?

Hmm... so if i have an API then all i need to do is to focus on either the HCI and the L2CAP layers is it?

THanks
0
 
kuganCommented:
probably you will have to look for APIs like
1) Initialise the BT device
2) Put one device inquirable and pagable mode
3) Do Bt inquary from one device and find the other device
3) Service discovery Need not be done ( If you are sure about the service on the other device)
4) Setup an Rfcomm connection between

once you have an rfcomm channel it will be like having two PC connected with serial cable , you can send data

Probably when you start now dont worry about SDP , Pairing etc.
0
 
PsychoMantisAuthor Commented:
Hmm.. ok i think i will look into the BT API (tried hundred times, but errors keep coming...).

By the way just asking, have you done a program on BT?
0
 
kuganCommented:
I did in linux with openBT and CSR BC01, but an year back
0
 
kuganCommented:
I did in linux with openBT and CSR BC01, but an year back

May be you should post the error msg you are getting
0
 
PsychoMantisAuthor Commented:
Hmm.. found out that the error message are some variable declarations faults. I'll work it out, thanks :).
Hmmm seems late guess its time for you to turn in...

Really thanks for the help :)
0
 
PsychoMantisAuthor Commented:
-Testing the time-
0
 
Superman7Commented:
PsychoMantis,

I'm so glad that I saw your post regarding this Ericsson BT kit.  I'm actually doing my final year project on this device.  Till now, I still haven't an idea how to get it to work.  I mean writing my own program in C++ to actually do a inquiry scan.  Have you manage to get the source codes?  What kind of API are you using? Ericsson API ? Is it possible to give me your email so we could keep in touch? thanx :)
0
 
Superman7Commented:
nobody replying ???
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 5
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now