how do i go about connecting usb bluetooth to PIC ?

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

phatali
Posts: 10
Joined: Sun Nov 19, 2006 12:57 am
Contact:

how do i go about connecting usb bluetooth to PIC ?

Postby phatali » Tue Jan 02, 2007 2:13 pm

hi
my primary goal is to be able to connect my mobile phone with a PIC via bluetooth inorder to get rid of cables and that any phone can connect to the PIC. i wanted to use a bluetooth dongle usb. but iv heard that these need a host, so how do i go about making a PIC have a host ? :shock:

any replies will be greatful
cheers
:wink:

User avatar
Benj
Matrix Staff
Posts: 14243
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4369 times
Been thanked: 4103 times
Contact:

Postby Benj » Tue Jan 02, 2007 3:52 pm

Hi Phatali

Thats a tricky one!

I guess what you need to do is to try to emulate what the PC host is doing on the PIC. This will probably include:

Initializing the Bluetooth dongle
setting up the Address
Looking for the remote address
Pairing with the remote address
Starting a service with the remote Bloutooth device
Passing data through the service protocall

Unfortunatley this is something I have never attempted so if you have any progress then let us know.

User avatar
Steve
Matrix Staff
Posts: 3073
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Postby Steve » Tue Jan 02, 2007 4:05 pm

If you look in our E-Blocks range, we sell a Bluetooth E-Block board which will work with most PICmicros (those with a USART). This will allow a mobile phone to communicate with a PICmicro.

phatali
Posts: 10
Joined: Sun Nov 19, 2006 12:57 am
Contact:

Postby phatali » Tue Jan 02, 2007 4:23 pm

hi
thanks for both of your quick replies :D
i will look into what you have said ben about what the pc host is doing.
steve i shall look at the E-block range you were talking about.
the thing is its a uni project sooo the cost has to be kept to a min :cry:
thanks for the help il let you guys know for sure if i make any progress with this .
:D

tian
Posts: 5
Joined: Thu Sep 20, 2007 9:17 am
Location: Indonesia
Contact:

Re: how do i go about connecting usb bluetooth to PIC ?

Postby tian » Fri Feb 01, 2008 8:05 pm

i don't know how to use it to but friend of mine use serial bluetooth modul for his final project.
so he can communicate between cellphone and AT89S51.

Is it easy?

User avatar
Benj
Matrix Staff
Posts: 14243
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4369 times
Been thanked: 4103 times
Contact:

Re: how do i go about connecting usb bluetooth to PIC ?

Postby Benj » Mon Feb 04, 2008 10:50 am

Hello Tian

Our Bluetooth E-Block has a serial Bluetooth module. There are also functions to drive this hardware built into Flowcode.

nils
Posts: 33
Joined: Fri Nov 02, 2007 11:03 am
Contact:

Re: how do i go about connecting usb bluetooth to PIC ?

Postby nils » Sun Mar 09, 2008 7:28 pm

Hi

even if I hijack this thread a bit, but is there a description of how to set up the bluetooth E-block module for an AVR device ?
and if not, is there a short description of which port it has to be connected to. my best guess is Port D at an Atmega32 because of the USART connection.

the purpose is setting up a bluetooth communication to a PC with a bluetooth dongle on the PC side. then a terminal via USART will send commands to the microcontroller. I know how to set up an USART connection, but not the bluetooth pairing part that needs to be done before that, if I understood it right.
hope you can help, and if not in a Flowcode style, then maybe with C.

cheers,
nils
Custom_Code.c help needed? -> http://tinyurl.com/2y2mzq
Flowchart high quality vector graphic output =>>http://tinyurl.com/6sx2sx

User avatar
Benj
Matrix Staff
Posts: 14243
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4369 times
Been thanked: 4103 times
Contact:

Re: how do i go about connecting usb bluetooth to PIC ?

Postby Benj » Tue Mar 11, 2008 12:27 pm

Hello NIls

Yes the Bluetooth E-Block is compatible with the AVR boards. I think that there is a forum post that details the AVR connections for things like the UART. However if this is unavilable then you can contact sean@matrixmultimedia.co.uk who will be able to detail the connections for you.

Also our Bluetooth example files should be import straight into Flowcode AVR so you will be able to use these to get started with the programming. If you do not have these example files then Sean should be able to provide them for you.

I would do this myself but im not in work this week.

Hope this helps.