Solved

Starting Bluetooth Programming in C++

Posted on 2002-07-18
12
27,815 Views
Last Modified: 2013-12-14
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
Comment
Question by:PsychoMantis
  • 5
  • 5
  • 2
12 Comments
 

Expert Comment

by:kugan
ID: 7163975

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
 

Author Comment

by:PsychoMantis
ID: 7163984
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
 

Expert Comment

by:kugan
ID: 7164049
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
 

Author Comment

by:PsychoMantis
ID: 7164074
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
 

Accepted Solution

by:
kugan earned 50 total points
ID: 7164136
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
 

Author Comment

by:PsychoMantis
ID: 7164205
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
Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

 

Expert Comment

by:kugan
ID: 7164229
I did in linux with openBT and CSR BC01, but an year back
0
 

Expert Comment

by:kugan
ID: 7164231
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
 

Author Comment

by:PsychoMantis
ID: 7164270
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
 

Author Comment

by:PsychoMantis
ID: 7164284
-Testing the time-
0
 

Expert Comment

by:Superman7
ID: 12963261
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
 

Expert Comment

by:Superman7
ID: 13038146
nobody replying ???
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Multi-source agreements are important because they set standards that all manufacturers should follow to ensure that devices are compatible with multiple vendors. The multi-source agreement (MSA) is an agreement that establishes how multiple vendors…
Working settings for French ISP Orange "Prêt à Surfer" SIM cards for data connections only. Can't be found anywhere else !
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now