Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Bluetooth AUBTM-20 communication

Status
Not open for further replies.

binojkumar

Full Member level 3
Full Member level 3
Joined
Jul 19, 2004
Messages
151
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Location
Bangalore
Activity points
983
Hi friends im working on blue tooth AUBTM20 modules, Using AT command im able to pair both modules and connection establishing. But im not able send /recive any data through serial..
Advanced thanks

binoj
 

Hi ,
I am able to send recieve charcters serially , just check you are in master mode ? it should be, then in at+con command check you selected profile as SPP,
I want to connect now in OPP profile , is it possible using AUBTM-20 ? how ? I am switching profile using at+bprofile and while connecting giving same profile in at+con="address","profile ..."
plz suggest...
 

Hello A. Rashad can you please tell me how to transfer the data from aubtm 20 serially i am not able to run the AT+BPROFILE command, I write AT+BPROFILE= it instantaneously Give OK and again when i give this command AT+BPROFILE=? it gives error.

I am not able to enter SSP mode i need the solution urgently my deadline is this weekend. Please help. Thank you.
 

Hello A. Rashad can you please tell me how to transfer the data from aubtm 20 serially i am not able to run the AT+BPROFILE command, I write AT+BPROFILE= it instantaneously Give OK and again when i give this command AT+BPROFILE=? it gives error.

I am not able to enter SSP mode i need the solution urgently my deadline is this weekend. Please help. Thank you.


hi abhaya ,
We can send charcters/data serially from hyperterminal of PC , (Aubtm-20 connected to Serial COM port through Max232 ,BE SURE RX OF MODULE RECIEVES 3.3 V
ONLY ,BECAUSE MAX232 GIVES 5 V)once the connection is established between Aubtm-20 and remote device.
I hope you are done till here and some of AT commands are working


Please follow the below steps exactly and carefully


now important thing:


YOU DO NOT NEED TO CHANGE PROFILE OF AUBTM-20, as it supports only SPP profile by default.If you read AT+bprofile command's syntax properly you will see 2.headset and 3.handsfree are "Future" implemented ,means you don need to worry about setting module in spp profile ,It is already bydefault remains in SPP .leave this BPROFILE command as it is (it does not work sometimes for this reason may be...leave it ), you just need to give profile number in AT+CON command...

okkk so now we proceed ,

Remember following sequence of commands you need to feed to btm-20,

1:AT+MODE=1(Master mode :as aubtm will initiate a request for connection to other bluetooth device device.So aubtm must be in master mode)
2:AT+INQ(It results with the other nearby bluetooth device address like e.g.+inq:00:15:83:44:78:3d ,copy this address,as you would need to send data to this device )
3:AT+CON="00:15:83:44:78:3d",2 -->(THIS IS IMPORTANT AS here we gives the address found in above command of AT+INQ,and the profile in which we want to connect i.e SPP ,which is having number "2")

if you receive
ok
+CON:1 as a result of this third command ,you are done!!! cheer
now whatever you will type in hyperterminal that will be replicated/transmitted to the connected bluetooth device's serial port,you can use a usb bluetooth dongle
which are easily available in market and connect it to usb ,then in bluetooth setting of this device(via.Control panel ->>Bluetooth devices->properties) you can see in property window of blutooth devices there is one tab "COM ports",there you can see the com port assigned to bluetooth device/dongle connected at usb,
Now use this dongle's address and connect to aubtm-20 ,following the above three steps,

then create a second hyperterminal connection and connect it to the COM port assigned to usb bluetooth dongle ,at 9600 baud rate.(which we found in com port tab of bluetooth properties/settings window)

As you type a charcter in aubtm-20 hyperterminal window it will be available in usb bt dongle's hyperterminal ....

IT SEEMS BIG but its so simple dude ,,,,
just follow the steps....
ask if u have any other query...
 
A.Rashad thank you for valuable information. would you help me to send AT commands to AUBTM-20 via ATmega8???
 

A.Rashad thank you for valuable information. would you help me to send AT commands to AUBTM-20 via ATmega8???

HELLO ,
As first ATMEGA 8's TX pin gives 5V and your AUBTM-20 needs max 3.3 Volt so put a voltage translator circuit in between these lines,
as far as software code is concerned ,you will have to do following stages to send AT commands to ATMEGA 8
1. Set up necessary Registers for UART for Baud Rate 9600.i.e write a function to initialize uart of Atmega 8, Lets say Uart_init(); ==>(write the code yourself or you can easily take from Internet)

2.create function lets say uart_send_char(unsigned char); ==>(write the code yourself or you can easily take from Internet)

3. create function to receive data from UART , lets say unsigned char uart_rec_char(); ==>(write the code yourself or you can easily take from Internet)

4. write a test code , in which use these functions i.e first call Uart_init();
then uart_send_char('A'); // this will print A on UART (check by connecting rx tx of ATMEGA8 to PC's serial port (Through MAX232 ) )
then call uart_rec_char() function and store the return char from this function in some character variable lets say
r=uart_rec_char();
pass this 'r' to uart_send_char(r); Note : No '' for r , as we want to pass value inside r , not r . You can see on hyperterminal , whatever you type will get printed twice (Please enable Echo in hyperterminal setting)

.
Once you have created these functions in C , now follow
suppose u want to send AT+INQ command
uart_send_char(0x0d); // for cr
uart_send_char(0x0a); //for lf
uart_send_char('A'); //for lf
uart_send_char('T'); //for lf
uart_send_char('+'); //for lf
uart_send_char('I'); //for lf
uart_send_char('N'); //for lf
uart_send_char('Q'); //for lf
uart_send_char(0x0d); //for lf
uart_send_char(0x0a); //for lf



check first on hyperterminal whether you get this command , then connect to AUBTM-20

now you have to call uart_rec_char(); function and check whether you receive characters O and K ,

Due to companies policies I can not Post here the complete ATMEGA 8 code ,
We have designed AUBTM-20's Board which directly connects to AVR microcontroller without voltage level translation,
I am Attaching data sheet of our "BluCOM" Module , we also have direct AVR board which has a smart BluCOM connector , so your work will become easy in that case , please see attachment
 

Attachments

  • AVR_BluBoard_schematic.pdf
    52.8 KB · Views: 152
  • BluCOM-18.pdf
    1.7 MB · Views: 199
Last edited:
in receiving code should i have to give lf and cr code???

---------- Post added at 22:09 ---------- Previous post was at 22:03 ----------

in aubtm-20 datasheet the response form is <cr><lf>ok<cr><lf>. i am not getting any response. so please guide me how to deal with this.

---------- Post added at 22:15 ---------- Previous post was at 22:09 ----------

in aubtm-20 datasheet the response form is <cr><lf>ok<cr><lf>. i am not getting any response. so please guide me how to deal with this.
 

in receiving code should i have to give lf and cr code???

---------- Post added at 22:09 ---------- Previous post was at 22:03 ----------

in aubtm-20 datasheet the response form is <cr><lf>ok<cr><lf>. i am not getting any response. so please guide me how to deal with this.

---------- Post added at 22:15 ---------- Previous post was at 22:09 ----------

in aubtm-20 datasheet the response form is <cr><lf>ok<cr><lf>. i am not getting any response. so please guide me how to deal with this.

call receive function and send received character to LCD connected to Micro controller and check what You receives after issuing command , then you can see exact response , and parse this stream of characters and remove cr lf and check only for O and K ,
can u share your project ? what you are working on ? which company?
 

call receive function and send received character to LCD connected to Micro controller and check what You receives after issuing command , then you can see exact response , and parse this stream of characters and remove cr lf and check only for O and K ,
can u share your project ? what you are working on ? which company?

i am working on my final year project "BLUETOOTH BASED DATA EXTRACTION SYSTEM". I am using ATmega8 controlling. i am making code in BASCOM AVR. i have checked tx/rx code it is working. when i connect my Bluetooth module to ATmega8 via UART. It is not showing any response. please help me.
 

hi
would you please tell me what should i do to receive response from Bluetooth to my ATmega8 controller. i just connect the module with ATmega via UART. in bascome there is a command "input" to get serial in put. i am just writing this code.
 

hi binojkumar,
i also working on bluetooth module AUBTM20, but unable to send AT command, how u send AT commands, i connect this module to arduino & dont have serial port on my laptop, & want to send AT commands via usb port, how i can do this work
 

hey binojkumar,
how i can send AT commands for bluetooth module using arduino programming, i dont have serial port on my laptop.
 

i am not able to use (AT+BPROFILE=? OR AT+BPROFILE=) commands kindly say step by step please help me out:( :( :(
 

Hi friends im working on blue tooth AUBTM20 modules, Using AT command im able to pair both modules and connection establishing. But im not able send /recive any data through serial..
Advanced thanks

binoj

your module should be in master mode& in spp profile
 

how you are sending data to Bluetooth module? using Hyperterminal on PC? or using Mobile?
 

how you are sending data to Bluetooth module? using Hyperterminal on PC? or using Mobile?


From hyper terminal only. we u want u can transfer from mobile.But there should be Bluetooth app on Ur mobile to support spp.
 

i am able to connect it to nokia 7210. however the moment i try sending anything it disconnects immediately and i get a message +DCON:1
plz help
 

i am able to connect it to nokia 7210. however the moment i try sending anything it disconnects immediately and i get a message +DCON:1
plz help



Does ur mobile contain any app to support spp profile.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top