how does arduino and bluesmirf communication work?

how do i read the tx data and make out what it is sending and receiving? like example i want to read each address and save it..

bwrussell4 years ago
What are you transmitting to the device?
Bluetooth communication is Serial communication. You can find the available serial functions and some examples over HERE at the arduino website.

Reading and saving serial communications should be pretty simple and there is likely a example that will show you exactly how to do it.
abdul3 (author)  bwrussell4 years ago
thank you bwrussell

i was just wondering how i would reading multiple mac addresses and save them.. and then also know when inquiry is done.. so in general i wan to know how bluetooth outputs and what it outputs exactly after each command... so i can read it and determine what it is...
When you plug a BT module into Arduino it doesn't do anything by default. To send and receive data the module needs to be paired and connected to another BT enabled device, like a phone. Once it's connected it still doesn't do anything unless you tell the Arduino to transmit through serial or you tell the paired device to transmit through BT serial. Where are you trying to read the addresses from, or what are you sending them with?

The BT module is receiving a the data one bit at a time. when a character is sent, say A, it receives a starting bit and then the bits 1,0,0,0,0,1, and finally an ending bit. If more than one character is sent then this is repeated. To capture the data properly the arduino needs to save the input in the same variable type as was sent. If you transmit a byte then save as a byte, if you transmit a string, save a string. You can have the arduino monitor the serial input and it can give you an indication when it is empty, i.e not receiving any data.