- 2.Hardware Installation
- 3.Test your BTBEE using AT mode
- 4.Communication between computers
- 5.Communication between microcontroller and computer
Bluetooth BEE BlueBee wireless module is adapts from XBEE design. The pinout is compatible with XBEE which is suitable for all kinds of microcontroller systems which have 3.3V power out. The current version of BTBEE module only can be use to check whether the module is working or not. The Bluetooth BEE modules comes with an on-board antenna, the antenna provides better signal quality. It acts like a transparent serial port, which works with a variety of Bluetooth adapter and Bluetooth phone. Bluetooth BEE is compatible with XBEE starter kit, so you may use SKXBEE-BOARD for BTBEE communication. The BTBEE, bluetooth bee is only a slave module. Communication among two BTBEE will not work.
2.0 Hardware Installation
2.1 SKXBEE-BOARD Hardware installation
- Put the BTBEE module on SKXBEE-BOARD.
- Connect USB B Type to SKXBEE-BOARD and the other end to USB port of computer or laptop. Computer/laptop will detect COM port for the 1st time using. You may check the COM port at hardware device. For this example, the COM port for BTBEE USB Serial port is COM79.
2.2 UC00B Hardware installation
A driver for UC00B need to install before we can use it. The driver can be download from here
- Put the BTBEE module on XBEE Breakout board.
- Using female to female jumper wires, connect pin from XBEE Breakout board to UC00B. The pins used are VCC, GND, Tx and Rx pin. Tx and Rx pins should be cross connected between them. In other words, Tx pin of BTBEE should be connected to Rx pin of UC00B and Rx pin of BTBEE should be connected to Tx pin of UC00B.
- Ensure 3.3V is select on UC00B.
- Connect USB of UC00B into USB port of computer/laptop. Wait a minute for driver devices detect the COM port. The COM port should be different with SKXBEE-BOARD COM port.
3.0 Test your BTBEE using AT mode
BTBEE has a small switch used for AT command and communication. For this current version, AT mode is only can be use to test whether the BTBEE module is able to communicate or not. Only 38400bps baudrate can be used. To test the BTBEE:
- Set a small switch on BTBEE module to AT mode.
- Setup hardware installation refer to section 2.1 or 2.2
- Now, open hyperterminal software. Setting hyperterminal using 38400 baudrate. Only 38400 baudrate can be used to test the your BTBEE.
- At properties, click setting and then ASCII Setup. Tick “Send line ends with line feeds” and “Echo typed characters locally”
- To test whether the BTBEE is working or not, send AT to BTBEE module and hyperterminal will receive OK. You may try once again if error is received.
4.0 Communication between computers
Now, we go to BTBEE communication. Bear in mind that the current version of BTBEE is only a slave module and communication among two BTBEE is not work. It can be communicate with other host like bluetooth handphone, SKKCA and other bluetooth devices. For the current version of BTBEE, 9600bps is only the baud rate to use in communication mode. Below is example communication between BTBEE and bluetooth dongle. For this example, we will using 2 computers. Computer A as a host to BTBEE and Computer B as a host to bluetooth dongle. BTBEE is used SKXBEE-BOARD or UC00B to communicate with computer A and bluetooth dongle will use BlueSoleil software to communicate with computer B.
4.1 Computer A Setup
You need SKXBEE-BOARD or UC00B to setup computer A.
- Set a small switch on BTBEE module is set to communication as shown at figure below.
- Setup hardware installation refer to section 2.1 or 2.2
- Open and setup hyperterminal for computer A. For this example, port setting for computer A is COM 79 and the baudrate is 9600. It is different with BTBEE AT mode.
4.2 Computer B Setup
You need Bluetooth dongle and BlueSoleil software to communicate with computer B. First of all, install you BlueSoleil software into your computer or laptop. The BlueSoleil software can be downloaded from here
- Connect bluetooth dongle into USB port.
- Turn on bluetooth with display classic view and following figure should appears. Bluetooth icon can be found at icon and notification taskbar (right and bottom pf computer).
- Press “F5” to start searching for Bluetooth device near by. If BTBEE is working properly, it will appear as a Bluetooth node in BlueSoleil window as shown in following figure.
- Right click on Bluetooth_V3 icon and click pair device. The software will appear a window to Enter Bluetooth Passkey. Enter the passkey and click OK. The passkey should be “1234″.
- Now, double click on the Bluetooth_V3 icon (BTBEE), Bluesoleil will start inquiring for available service or profile offered by BTBEE. After some time (around 1 to 3 seconds) Bluetooth Serial Port Service should be highlighted as shown in below figure.
- Double click on Bluetooth Serial Port Service. If everything is working perfectly, a window will pop up showing the virtual COM port which is connected to computer B. In this case, a COM51 has been created.
- BlueSoleil will try to create Bluetooth Wireless link with BTBEE and offer serial port service.
- LED on BTBEE (computer A) will light ON if the Bluetooth Wireless link success to create.
- Open and setup hyperterminal for computer B. For this example port setting for bluetooth is COM51 and the baudrate is 9600. It is different with BTBEE AT mode.
- The data sent from computer A will be received by computer B and data sent from computer B will be received by computer A.
5.0 Communication between microcontroller and computer
Previous section we have learn computer is used as a host to BTBEE to communicate with other computer. This section, we will continue with microcontroller which is used as a host to BTBEE to communicate with other bluetooth device (bluetooth dongle). Figure below shown example BTBEE communication between microcontroller and computer.
5.1 Example Sample program
Sample program for this example is provided. You may download the sample program at the attachments. This example is to show communication between BTBEE and USB bluetooth dongle. The PC can be used to control a 7 segment connected to the microcontroller. PC will send data 0-9 through bluetooth wireless link to microcontroller and microcontroller will display the data at 7 segment. Below is example schematic and hardware for microcontroller connection.
Example schematic of BTBEE and microcontroller
Besides using SKXBEE board, you may use XBEE Breakout board but extra circuit needed to regulate voltage to 3.3V for BTBEE module and UART pin. To get started with this communication you may follow schematic above for microcontroller connection. For computer connection with Bluetooth dongle, you may refer section 4.2. Don’t forget to setting your hyperterminal. After all hardware setup is complete, you may start test the communication.
Switch on your SK40C power supply. LCD will display “BTBEE&BLUETOOTH” at the 1st line and “Type OK” at the 2nd line. So you need to type “OK” on hyperterminal. This characters will send to microcontroller and once the characters is received, microcontroller will send the massage on hyperterminal. The massages need you to press any number from 0-9. The number pressed will send to microcontroller to display on 7 segment and LCD. When the number is received, microcontroller will send “OK” to hyperterminal. All the data is sent and received through bluetooth wireless link.
7 is received and display on 7-Segment
6.0 BTBEE Pinout
* if you want faster response from the author, please do post your inquiry/feedback in our technical forum as we seldom check the comments section in tutorial site 🙂