Skip to content

DF BluetoothV3_Bluetooth_module_(SKU_TEL0026)

Angelo edited this page Sep 21, 2016 · 3 revisions

DF-Bluetooth Module - Version 3

Introduction

This DF-Bluetooth module offers an affordable way to let your microcontroller talk to your Bluetooth devices such as Bluetooth mobile phones, laptop, and Bluetooth adapter. The Bluetooth module provides TTL level UART interface which is supported by almost every microcontroller in the market.

It is also designed to be compatible with most popular Arduino controller. Simply plug into Arduino IO Expansion Shield, a Bluetooth Arduino is ready to use.

Specification

  • Chips: CSR BC417143
  • Bluetooth Protocol: Bluetooth Specification v2.0 +EDR
  • Working Frequency: 2.4-2.48GHz unlicensed ISM Band
  • Modulation Mode: GFSK (Gaussian Frequency Shift Keying)
  • Power: ≤4dBm, Class 2
  • Transmission Distance: 20-30 in free space
  • Sensitivity: ≤-84 dBm at 0.1% BER
  • Transmission rate: Asynchronous: 2.1 Mbps (Max)/160 kbps; Synchronous: 1Mbps/1Mbps
  • Security: Authentication and encryption
  • Support profiles: Bluetooth serial port
  • LED indicator: LINK
  • Power Supply: +3.5V-+8V DC/50 mA
  • Working Temperature: -20°C-+55°C
  • Dimension: 43x19.3x11mm

PinOut

| 150px | | | | |---------|----------------| | Pin | Definition | | GND | GND | | VCC | 3.5-8V DC | | RXD | RX (TTL Level) | | TXD | TX (TTL Level) | |

Set module in AT mode

How to enter into AT mode

The DF-Bluetooth V3 module has two switches on the module.

  • The NO.1 switch is used to set the LINK-LED on/off for power saving.
  • The NO.2 switch(AT mode) is used to control the Bluetooth module
    • In AT mode
    • In Functional mode

So if you turn the NO.2 switch on, you can use the AT mode to set the Bluetooth module, e.g. name, baud rate, master/slave mode etc.

Preparation

Steps

Part 1: Ready to go


USB to TTL module

  1. Plug the Bluetooth module into the USB to TTL module;
  2. Turn on the AT mode switch of the Bluetooth module;
  3. Connect the USB to TTL module to your computer;
  4. Install the driver for the USB to Serial module if it can't be recognized.

:Part 2: Setting


After connecting the module to computer, we can use CoolTerm software to talk with Bluetooth module.

  1. Click Connection --> Choose Options to set several parameters in CoolTerm.

  2. Set Serial Port

    1. Port: the port number can be got from the Device Manager of the computer
    2. Baudrate: 38400
    3. Data Bits: 8
    4. Parity : none
    5. Stop Bits: 1
  3. Set Terminal

    1. Terminal Mode: Line Mode
    2. Key Emulation: CR+LF

Image:Coolterm Preferences 38400.png|Set Serial Port Image:Coolterm Preferences BT.png|Set Terminal

:Part 3: Setting


Send AT command & return value Now use the CoolTerm to send AT commands to the Bluetooth Module and see what information the Bluetooth will answer to the computer.

For example:

  • Input: at

Return: OK

  • Input: at+name=DFRobot

Return: OK

  • Input: at+name?

Return:+name: DFRobot OK

  • Input: at+role=0

Return: OK

  • Input: at+role?

Return: +role:0 OK

  • AT+PSWD?

+PSWD:1234 OK

  • AT+ORGL (Restore the default setting:)

Return: OK

  • AT+UART=115200,0,0 Return: OK
    • Param1: baud rate (bits/s) 4800/ 9600/ 19200/ 38400/ 57600/ 115200/ 230400/ 460800/ 912600/ 1382400
    • Param2: stop bit , 0- 1 bit/ 1- 2 bits
    • Param3: parity bit, 0- None/ 1- Odd/ 2- Even
  • AT+RESET

Return: OK

  • Default setting
    1. Device class: 0
    2. Inquiry code: 0x009e8b33
    3. Device mode: Slave mode
    4. Binding mode: SPP
    5. Serial port: 38400 bits/s; 1 stop bit, no parity (In datasheet, it said the default baud rate is 9600 which is wrong.)
    6. Pairing code: “1234”
    7. Device name: “HHW-SPP-1800-2

More AT command can be obtained from the TEL0026_Datasheet.

:Part 4: Exit AT mode


Please turn the AT mode switch off and then repower the Bluetooth module.

Tutorial

The DF-Bluetooth module is based on the specification of Bluetooth V2.0, compatible with V1.1. A Bluetooth adaptor is required to communicate with the DF-Bluetooth module. When it is paired with other Bluetooth devices, the DF-Bluetooth is always set to slave mode.

The IVT BlueSoleil is recommended to manager all your Bluetooth devices.

STEPS


Step 1: Connect a Bluetooth adapter to the computer so that the computer can find the Bluetooth module.

Step 2: Put the Bluetooth module on the Arduino board

Step 3: Open BlueSoleil software (Figure 1) and right click the yellow ball in the centre screen, click “Search Devices” , an icon named EPBMX-COM will appear after few seconds. The EPBMX-COM is the DF-Bluetooth module.

Figure 1

Step 4: Right click EPBMX-COM icon, click “Pair”. A window will popup ask for PassKey which is “1234” by default (Figure 2).LINK-LED on the Bluetooth will blink if the Pair is successful and the LED is on.

Figure 2

Step 5: Right click EPBMX-COM, click “Search Service”. Then a serial port will appear and right click EPBMX-COM again and choose the choice “Connect Bluetooth Serial Port (C0MXX)” and you can see the LINK-LED on the Bluetooth will be lit if the LED switch is on.

Figure 3

Step 6: Upload test code to Arduino. Please unplug the Bluetooth module from the Arduino board while uploading test code.

void setup()
{
  Serial.begin(9600);             //Set serial baud rate to 9600
}

void loop()
{
  Serial.print("Hello!");           //print out hello string
  delay(1000);                  //1 second delay
}

Result


Plug the Bluetooth module on the Arduino board again after finishing uploading the codes. Then open the serial monitor to see what Arduino is sending to Bluetooth module. You can also use CoolTerm to check the communication.

Figure 4

NOTE:
  1. Check the serial setting! Make sure the baud rate is set to 9600 on both master and slave.
  2. When the DF-Bluetooth is used on Arduino, please make sure you disconnect the DF-Bluetooth module before uploading any code to your Arduino. Or it will fail to upload any sketch as the DF-Bluetooth module occupying the TX/RX pins. |

FAQ

'''Q2. ''' I want to use it as a wireless module on Arduino, and use my phone as a controller, can it be possible?

'''A1. ''' Welcome! For sure it is possible, and there is an article about how, How to control Arduino wirelessl/ bluetooth by phone?

'''Q2. ''' In the AT command list manual, some AT commands (e.g. AT+DISC etc.) seem to be useless cause I sent them to the device, but got "Error: (16)", is the AT commands given wrong or I missed anything?

'''A2. ''' Please check the Appendix 1: AT command error in that manual, 16 means "SPP is not initialized", so please send "AT+INIT" to initialize the SPP before sending other AT commands like you mentioned.

'''Q3. ''' How can I find or pair with this BT V3 module through my pc or phone when it was run in AT mode? i.e. the AT selection switch was put at AT side.

'''A3. ''' Please enter AT mode, send "AT+INIT" first, after a while, send "AT+DISC", wait a second, you could find the BT module in your PC/ phone Bluetooth panel. Default pairing code is: "1234". Read this post for more.

For any question/ advice/ cool idea to share with us, please visit DFRobot Forum

More

link=http://www.dfrobot.com/ get it from dfrobot store or dfrobot distributor.

category:Product Manual category:TEL Series category: Wireless category: Modules category: source

Clone this wiki locally