Elecfreaks Bluetooth Modem User manual

Bluetooth
Bluetooth
Bluetooth
Bluetooth Modem
Modem
Modem
Modem User
User
User
User Guide
Guide
Guide
Guide
Bluetooth
Bluetooth
Bluetooth
Bluetooth Modem
Modem
Modem
Modem Introduction
Introduction
Introduction
Introduction
The Bluetooth
Bluetooth
Bluetooth
Bluetooth Modem
Modem
Modem
Modem is the latest Bluetooth wireless serial cable! This
version of the popular Bluetooth uses the HC-05/HC-06 module. These
modems work as a serial (RX/TX) pipe. Any serial stream from 9600 to
115200bps can be passed seamlessly from your computer to your target.
The remote unit can be powered from 3.3V
3.3V
3.3V
3.3V up
up
up
up to
to
to
to 6V
6V
6V
6V for easy battery
attachment. All signal pins on the remote unit are 3V-6V tolerant. No level
shifting is required. Do
Do
Do
Do not
not
not
not attach this device directly to a serial port. You will
need an RS232 to TTL converter circuit if you need to attach this to a computer.
You can either solder a 6-pin header or individual wires.
Power
Power
Power
Power Supply
Supply
Supply
Supply Voltage
Voltage
Voltage
Voltage :
:
:
: 3.3V-5V
3.3V-5V
3.3V-5V
3.3V-5V
IO
IO
IO
IO Voltage
Voltage
Voltage
Voltage :
:
:
: 3.3V/TTL
3.3V/TTL
3.3V/TTL
3.3V/TTL

Hardware
Hardware
Hardware
Hardware and
and
and
and Software
Software
Software
Software Preparation
Preparation
Preparation
Preparation
Part
Part
Part
Part 1
1
1
1 Communication
Communication
Communication
Communication Between
Between
Between
Between Bluetooth
Bluetooth
Bluetooth
Bluetooth Modem
Modem
Modem
Modem and
and
and
and
Bee
Bee
Bee
Bee Adapter
Adapter
Adapter
Adapter

1. Set the Bee Adapter Switch in H Port to enter AT Mode
2. Set to IO Voltage 3V3
3. Assemble the Bee Adapter and Bluetooth Modem with Jumper Wire, and
then connect to PC (make sure Bluetooth Modem LED blink slowly in
AT
Mode)
�KEY connect to KEY
�VCC connect to VCC
�GND connect to GND
�TX connect to RX
�RX connect to TX
4. Open Serial
Tool
sscom32 and set the BaudRate as 38400. Type
AT,
and it
would respond OK. With Bee Adapter, you can achieve AT Command control
not need of programming code.

Part
Part
Part
Part 2
2
2
2 Communication
Communication
Communication
Communication Between
Between
Between
Between Bluetooth
Bluetooth
Bluetooth
Bluetooth Modem
Modem
Modem
Modem and
and
and
and
Arduino
Arduino
Arduino
Arduino
�Set to IO Voltage 3V3, and make sure Bluetooth Modem LED blink slowly
in
AT
Mode.
�Connect Bluetooth and UNO with jumper wire as below, and then link to
PC
�Bluetooth KEY link to UNO V(VCC), so as to enter AT Mode .
�Bluetooth VCC to UNO V( VCC)
�Bluetooth GND to UNO G(GND)
�Bluetooth TX to UNO D2
�Bluetooth RX to UNO D3

Step
Step
Step
Step 1.
1.
1.
1. Achieve
Achieve
Achieve
Achieve Manually
Manually
Manually
Manually AT
AT
AT
AT Command
Command
Command
Command Control
Control
Control
Control
1. Open the Arduino IDE 1.0.X, and copy the code from Elecfreaks wiki to it.
2. Import library of SoftwareSerial, because library of NewSoftSerial is just
suitable of edition before ArduinoIDE 1.0, such as IDE 0022 , IDE 0023.
3. Delete the library of NewSoftSerial and modify the NewSoftSerial into
SoftwareSerial.
4. Download TimerOne from
http://code.google.com/p/arduino-timerone/downloads/list
5. Compiling sketch until Done compiling appears
6. Upload code until Done uploading appears
7.O pen sscom32 and set BaudRate as 38400
8. Manually input AT and it would re sp ond OK
9. Input AT+ROLE? And it would respond +ROLE=0, therefore, We default the
Bluetooth Modem as SLAVE Mode
10. Input AT+ROLE=1, we can set it as Master Mode
11.
Input AT+ROLE=0, we can set it back as SLAVE Mod e

Step
Step
Step
Step 2.
2.
2.
2. Achieve
Achieve
Achieve
Achieve Automatically
Automatically
Automatically
Automatically AT
AT
AT
AT Command
Command
Command
Command Control
Control
Control
Control
1. Modify the code (Remove // before Timer1) and then upload it again in
Arduino IDE 1.0.X
2. It can automatically respond OK for
AT
Command

Part
Part
Part
Part 3.
3.
3.
3. Communication
Communication
Communication
Communication Between
Between
Between
Between Android
Android
Android
Android and
and
and
and Arduino
Arduino
Arduino
Arduino with
with
with
with
Bluetooth
Bluetooth
Bluetooth
Bluetooth
�Remove the KEY PIN jumper wire to enter Communication Mode . In
Communication Mode, make sure the Bluetooth Modem LED blink quickly.
If necessary, re-plug the USB Cable.
�Modify the code (add // before Timer1, especially replace the BaudRate
from 38400 to 9600 ) , and then upload the code again .

Step
Step
Step
Step 1.
1.
1.
1. Android
Android
Android
Android Installation
Installation
Installation
Installation
1. Download APP for EF _BluetoothBeeV1.1 from
http://elecfreaks.com/store/download/datasheet/Bluetooth/EF_BluetoothBeeV1.1.zip
2. Install the APK file to your Android phone.
Step
Step
Step
Step 2.
2.
2.
2. Android
Android
Android
Android Communication
Communication
Communication
Communication
1. Click the icon of ElecFreaks BluetoothBee as above and then open
Bluetooth.
2. Click As Client and start scanning
3. When it scan out HC-05, click HC-05 .
4. Type the Bluetooth pairing PIN 1234 .
5. Input hello,elecfreaks in mobile, and the PC would display hello,elecfreaks
from mobile. (For sscom32, remember to set the BaudRate as 9600.)
6. Input hello from PC, mobile would also respond hello.

Q&A
Q&A
Q&A
Q&A
If you use Arduino M e g a 1280/25 6 0 or Freaduino ADK there are some
differen ce . Please note the NewSoftSerial library about M e g a 2560 explanation
in SoftwareSerial.cpp :
// Specifically for the Arduino Mega 2560 (or 1280 on the original Arduino Mega)
// majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):
// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
That mean s the library do not support D0-D7 as receiv ing pins, and you just
could use pins:10,
11,
12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 for
receiv ing . So there are two way to resolve it, but they all need external jumper
wires.
First
First
First
First method
method
method
method : Change the define of rxPin and txPin. Jumper wires connect to
DOUT-D10, DIN-D11.
#define rxPin 10
#define txPin 11
Second
Second
Second
Second method
method
method
method : Use the other Hardware Serial port because M ega has 4
hardware serial port s . Jumper wires connect to DOUT-RX1(D19)
DIN-TX1(D18)