EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Bluetooth modules

Started by Mohammed El Korek April 4, 2007
Hello,

I am looking at a Bluetooth OEM module called the KC-21. This module has a
24 pin IC which allows interfacing options to an SPI and a UART (SCI in
hcs12 terms).

I was wondering on options regarding having an application where one
bluetooth module is connected through the serial port to a workstation while
the other module is interfaced to a microcontroller. No need for a fancy
application; just seeing on the hyperterminal of the host station that the
PC has indeed detected the presence of a bluetooth "device".

Now, for the questions:

* The datasheet of the KC-21 said that it supported TTL level UART
communication. I am quite sure that we might need to raise the voltage up a
bit in order to interface the module with SCI1 of the Minidragon+
(9s12dp2656b) board we have. Any information on an optimum level-shifter
circuit ? (believe it or not, we are finding trouble finding a proper IC and
we need to know the VIH, VIL, VOH, and VOL of the general purpose digital
I/O pins available on the uc).

* If we configure the SCI to operate at 115200 kbps to be in sync with the
default baud rate of the bluetooth module, can we still write a program in C
to write AT commands to the module? Normally, a user writes a .txt file and
sends it to the module through the hypterminal of a PC. Now, we want to have
the ability to initiate AT commands from the minidragon to the interfaced
module.
(I was thinking .. this will be doner after a connection has been made
between Tx and Rx of the minidragon and those of the module... )

Your feedback and any past experiences you had will be of great help!

Mohammed El Korek
--- In 6..., "Mohammed El Korek"
wrote:

> * The datasheet of the KC-21 said that it supported TTL level UART
> communication. I am quite sure that we might need to raise the
> voltage up a
> bit in order to interface the module with SCI1 of the Minidragon+
> (9s12dp2656b) board we have.

Well you didn't mention the voltage of the KC-21, although TTL used to
mean 5V (which would work of course), I really think TTL does not tell
us if it is a 3V product.
> * If we configure the SCI to operate at 115200 kbps to be in sync
> with the default baud rate of the bluetooth module, can we still
> write a program in C to write AT commands to the module? Normally, a
> user writes a .txt file and sends it to the module through the
> hypterminal of a PC. Now, we want to have the ability to initiate AT
> commands from the minidragon to the interfaced module.

Well to me that's a strange question. Are you a student too? You might
not be because you didn't put "URGENT!!" on your subject heading ;)

What does communicating at 115200 kbps have to do with what
programming language you can use? Oh well, I'll just assume that your
KC-21 is at 115200 kbps and that it accepts AT commands (only you'd
know that), but then what is your question?
> > * If we configure the SCI to operate at 115200 kbps to be in sync
> > with the default baud rate of the bluetooth module, can we still
> > write a program in C to write AT commands to the module? Normally, a
> > user writes a .txt file and sends it to the module through the
> > hypterminal of a PC. Now, we want to have the ability to initiate AT
> > commands from the minidragon to the interfaced module.
>
> Well to me that's a strange question. Are you a student too? You might
> not be because you didn't put "URGENT!!" on your subject heading ;)
>
> What does communicating at 115200 kbps have to do with what
> programming language you can use? Oh well, I'll just assume that your
> KC-21 is at 115200 kbps and that it accepts AT commands (only you'd
> know that), but then what is your question?

Jeff , you missed my point! What i meant was.. can i hard code the AT
commands on the minidragon+ so i can write a program that self-configures
the bluetooth module WITHOUT the user needing to open the hyperterminal on a
PC and issuing those commands?

Ultimately, I would like a micro-c to communicate with a host PC
automatically.. it's going to be my job to figure out the works of each AT
command..the pairing process., etc... but I need the module to be
condfigurable through the microcontroller... not through hypterminal..
that's why i was asking if i can use the sci on the hcs12 as a conduit for
at commands between my C program (which can be developed say on icc12) and
the module

hope i am clear now ;-)

and i am recent graduate so ... but that does'nt mean that it's less urgent
this time :-D

Mohammed El Korek
--- In 6..., "Mohammed El Korek"
wrote:
> Jeff , you missed my point! What i meant was.. can i hard code the
> AT commands on the minidragon+ so i can write a program that
> self-configures the bluetooth module WITHOUT the user needing to
> open the hyperterminal on a PC and issuing those commands?

Ahah, I did understand your point. I apologize though for playing
around, but you did miss my point. I guess to get right to the point,
the answer is "of course... why not?"
> Ultimately, I would like a micro-c to communicate with a host PC
> automatically.. it's going to be my job to figure out the works of
> each AT command..the pairing process., etc... but I need the module
> to be condfigurable through the microcontroller... not through
> hypterminal.. that's why i was asking if i can use the sci on the
> hcs12 as a conduit for at commands between my C program (which can
> be developed say on icc12) and the module

After all, it is an MCU... fully programmable means automatic... not
just memorizing a simple list of steps, but being smart about it. This
is what these babies are made for :)

Of course we can't help with the PC software. I'll be an expert on
that soon, though. We use a terminal program to upload firmware to our
robot modules, but I need to automate it so our production crew won't
need so much training. Even the best-trained still come and ask me if
a simple setting in PowerLab gets changed.

Have fun

The 2024 Embedded Online Conference