Bluetooth Bee v2.0
113050013
Bluetooth Bee is an easy to use Bluetooth SPP module compatible with existing Xbee sockets, designed for transparent wireless serial connection setup.
Serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR(Enhanced Data Rate) 3Mbps Modulation with complete 2.4GHz radio transceiver and baseband.
It uses CSR Bluecore 04-External single chip Bluetooth system with CMOS technology and with AFH(Adaptive Frequency Hopping Feature).It even has the smallest footprint as small as 12.7mmx27mm. Hope it will simplify your overall design/development cycle.
Features
Hardware Features
Typical -80dBm sensitivity.
Up to +4dBm RF transmit power.
Fully Qualified Bluetooth V2.0+EDR 3Mbps Modulation.
Low Power 1.8V Operation, 1.8 to 3.6V I/O.
PIO control.
UART interface with programmable baud rate.
Integrated PCB antenna.
Bee compatible headers.
Software Features
Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity, Data control: has.
Supported baud rate: 9600,19200,38400,57600,115200,230400,460800.
Use CTS and RTS to control the data stream.
When a rising pulse is detected in PIO0, device will be disconnected.
Status instruction port PIO1: low-disconnected, high-connected;
PIO10 is connected to red led, PIO11 is connected to green led. When master and slave are paired, red and green led blinks 1time / 2s in interval, while disconnected only green led blinks 2 times/ s.
Auto-connect the last device on power as default.
Permit matched device connect by default.
Default PINCODE:0000.
Auto-reconnect in 30 min when disconnected as a result of beyond the range of connection.
The supply voltage of this module is 3.3V, higher than this may cause permanent damage to the device.
c;;;
Hardware Installation
Connecting Bluetooth to PC through Uart Bee
Connecting Bluetooth to Arduino
Since the hardware UART of Seeedino was used as debug with PC, We choose D2 and D3 to simulate software UART to communicate with Bluetooth. please refer to the jumper setting on below picture
Software Instruction
Conventions
Factory default setting:
Name: HMSoft;
Baud: 9600, N, 8, 1;
Pin code: 1234;
transmit Version.
AT Command format:
Uppercase AT command format. string format, without any other symbol. (e.g. \r or \n).
- Any incorrect command would be no response.
AT Commands(to be continued...)
1. Test Command
Send | Receive | Parameter |
---|---|---|
AT | OK | None |
2. Query/Set baud rate
3. Query/Set Parity bit
4. Query/Set Stop bit
5. Query/Set Baud rate, parity bit, stop bit
6. Module self check command
8. Query module temperature command
10. Query/Set PIO0 function (System KEY)
12. Query/Set module PIO Pins output status
Programming
Configure the Bluetooth module with Serial Port under Windows
This section shows how to configure Bluetooth with PC, some basic methods of setting could be learn.
Set up hardware connection refer to “Hardware Installation” section. You will find the blue LED on the module flashes illustrate no connection is set up.
Open a serial terminal and set Baud Rate:9600, Databits: 8, Stopbits: 1 and No Flow Control. Send “AT” to Bluetooth with the serial terminal and “OK” will be return if all goes well. The Bluetooth only respond AT commands when no connection was set up, or all commands were seen as string and sent out. You can distinguish the status through LED indicates.
Then some useful configurations could be sent. Here’s are some samples of commands and response.
Test serial connection, send “AT”, will return “OK”.
Obtain firmware version, send “AT+VERSION?”, return “OK+VERSION:HMSoft V621”.
Restore factory settings, send “AT+DEFAULT”, return “OK+DEFAULT”.
Restart module, send “AT+RESTART”, return ”OK+RESTART”.
Reset baud rate of serial port, send “AT+BAUD4”, return “OK+Set:9600”.
Enable authentication, send “AT+AUTH1”, return “OK+SetAuth:1”.
Query module address , send “AT+LADD?”, return “OK+LADD:000EEACF1A57”.
Query Last Connected Device Address , send “AT+RADD?”, return “OK+RADD:000000000000”.
Set Module name, send “AT+NAMEHM-01”, return “OK+Set:HM-01”.
Set Pin Code, send “AT+PIN8888”, return “OK+SetPin:8888”.
Enable notify information of connection, send “AT+NOTI1”, return “OK+Set:1”.
Set to master mode, send “AT+ROLEM”, return “OK+Set:M”.
Or Set to Slave mode, send “AT+ROLES”, return “OK+Set:S”.
We use two Bluetooth connected with PC, one was set as Central while the other is Peripheral. Several seconds later they find each other and the LED stop flash, connected!
Communicate with Android
This kind of Bluetooth module is compatible with Bluetooth Specification V2.1+EDR、V2.0+EDR、V2.1、V2.0, it can communicate with any device has one of these protocols. We use a Android phone to demonstrate how to use a cellphone to interact with Bluetooth module.
Power the module and configure it as Slave role(send “AT+ROLES” to module). Search and install an APP called “Bluetooth SPP pro” in Android phone. Launch the app, it will scan all Bluetooth device automatically. Select “HMSoft” and touch “Connect” button, and then “Byte stream mode”. Then we can send data to PC, write some words in the text field at the bottom of the Phone and hit send button. Also PC can transfer data to phone with serial terminal.
Data transmission between Two Arduinos
Are you ready to code? It’s time to do something after practice. Prepare a pair of Bluetooth, and Arduino or other platform to control them. Here we use two Arduino Uno. Set up the connection as mentioned in section “Hardware Installation”.
The program of Central and Peripheral use the same code, the only difference is the micro define at the beginning of the program. To assign the Bluetooth to Central role, Just need to modify the text to “#define MASTER 1”, or “#define MASTER 1” if Peripheral role was assigned.
The initialization program flow please refer to the following flow chart. First of all we need to distinguish the presetting baud rate of the Bluetooth. After this, send commands to restore factory settings, and change baud rate from 115200 to 9600 since software serial will not working well at high baud rate. Then other parameters were configured to the Bluetooth with Reset command in the final.
After the initialization, the Central and Peripheral will do different things, the Central will send message to Peripheral interval and print what received from Peripheral while the Peripheral only responds the Central.
After downloading program, open two serial terminal windows, the LEDs on Bluetooth will flash, several seconds later, they stop to flash and keep on, this indicates that they connected to each other. According to the program is written, the Central sends message to the Peripheral continually and get feedback every time.
Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.