Hardware Reference
In-Depth Information
Once you're in command mode, you can get some basic
information about the radio by typing D , just as you did in
Chapter 2. You'll get the radio's status, which includes its
address:
This is handy when you want only the other Bluetooth
Mates in the area. As you might have guessed, the device
code is 001F00. The IN command also eliminates the
text names, so you can get just the addresses and device
codes.
***Settings***
Now that you have the address of your other Bluetooth
radio (which should have shown in the lists above, if you
have it plugged into the other Arduino), you can connect
to it like so:
BTA=000666112233
BTName=FireFly-7256
Baudrt(SW4)=115K
Parity=None
Mode =Slav
Authen=0
Encryp=0
PinCod=1234
Bonded=0
Rem=NONE SET
C, 000666481ADF\r
Replace 000666481ADF with the address of the radio
attached to Arduino #2. Radio #1 will respond:
TRYING
The first line beginning with BTA= is the radio's address
in hexadecimal notation. Write down this address or copy
it to a text document—you'll need it in a moment. Next,
check its connection status by typing GK\r . It will respond
like so:
Once it makes a good connection, the green connect light
on both Bluetooth Mates should come on, the radios will
shift automatically to data mode, and you should see the
message from Arduino #2 as follows:
Hello Bluetooth!
Hello Bluetooth!
Hello Bluetooth!
0
When it's connected and you do this, it will respond with 1
instead.
The connection goes both ways, of course. Anything you
type in the serial terminal window gets sent to Arduino #2.
It's not programmed to respond, though, so you won't see
anything come back from it. When you're ready to close
the connection, you first have to get back into command
mode by typing:
Now you want to see which other radios are available. Type
the following (the capital letter i):
I\r
The radio will respond with a list of radios, as it did in
Chapter 2:
$$$\r
The radio will give you a CMD again, after which you type:
Found 2
442A60F61837,Tom Igoe...s MacBook Air,38010C
000666481ADF,RN42-1FDF,1F00
Inquiry Done
K,
The connection will be broken, and you'll see:
You can see that each device has a different address,
name, and device code. You can get a list of only the ones
with a particular address code by typing:
KILL
There are other status commands as well, but these ones
are most important at first.
X
IN 0,001F00\r
 
Search WWH ::




Custom Search